Xcode显示编译时警告; 如果我将它提交到App Store,我的应用会被拒绝吗?
我有一个警告,我无法解决,我想知道Apple是否可以因此而拒绝该应用程序.
警告是:
对uinavigationcontroller的开始/结束外观转换的不平衡调用
有一种数据类型
type
TDataTypeId = (DataTypeId_String, DataTypeId_SmallInt, DataTypeId_Integer, DataTypeId_Word,
DataTypeId_Boolean, DataTypeId_Float, DataTypeId_Currency,
DataTypeId_BCD, DataTypeId_FmtBCD, DataTypeId_Date,
DataTypeId_Time, DataTypeId_DateTime, DataTypeId_TimeStamp,
DataTypeId_Bytes, DataTypeId_VarBytes, DataTypeId_Blob,
DataTypeId_Memo, DataTypeId_Graphic, DataTypeId_fmtMemo,
DataTypeId_FixedChar, DataTypeId_WideChar, DataTypeId_LargeInt,
DataTypeId_Array, DataTypeId_FixedWideChar, DataTypeId_WideMemo);
Run Code Online (Sandbox Code Playgroud)
有一个函数接受包含这种类型的值之一的行,返回该值
Function GetType(str: string): TDataTypeId;
var
typeidx: TDataTypeId;
typestr: string;
begin
for typeidx := Low(TDataTypeID) to High(TDataTypeID) do
begin
typestr:=GetEnumName(TypeInfo(TDataTypeId),Ord(typeidx));
typestr:=Copy(typestr, 12, length(typestr)-11);
//Memo.Lines.Add(typestr+'\n');
if (AnsiCompareStr(str, typestr)=0) then
Result:=typeidx
end;
end;
Run Code Online (Sandbox Code Playgroud)
结果,有一个组件
[dcc32 Warning] UnloadProcs.pas(59): W1035 Return value of function 'GetType' might be undefined
Run Code Online (Sandbox Code Playgroud)
如何转换未出现警告的功能?
有一个代码
for j := 0 to mForm.ComponentCount - 1 do
if mForm.Components[j] is TableFormInfo then
//try
//table := nil;
//tempFmtable := nil;
//tForm := nil;
tForm := mForm.Components[j] as TableFormInfo;
table := TTableSpec(DBSchema.Tables.FindComponent(tForm.Table));
tempFmtable := TfmTableData.Create(MainWindow);
tempFmtable.Name := tForm.Name;
tempFmtable.tname := tForm.Table;
//tempFmtable.Caption := Utf8ToAnsi(table.Description);
tempFmtable.Left := tForm.LeftValue;
tempFmtable.Top := tForm.TopValue;
tempFmtable.Height := tForm.HeightValue;
tempFmtable.Width := tForm.WidthValue;
tempFmTable.IBQuery1.SQL.Clear;
tempFmtable.IBQuery1.SQL.Add('select * from ' + table.Name);
tempFmtable.IBQuery1.Open;
tempFmtable.DragKind:=dkDock;
tempFmtable.DragMode:=dmAutomatic;
i := 0;
querystr:='select ';
while i <= tForm.ComponentCount - 1 do
begin …Run Code Online (Sandbox Code Playgroud) 我正在使用xcode 4.5.2和LLVM 4.1.我期待我不需要合成一个类属性也不需要声明一个实例变量,但我收到的错误表明这些期望是错误的.
我的课:
@interface Test : NSManagedObject
@property (strong, nonatomic) NSString *string;
@property (strong, nonatomic) NSString *number;
@end
@implementation Test
- (NSString*)string {
return _string;
}
@end
Run Code Online (Sandbox Code Playgroud)
1)使用未声明的标识符'string'
我还在WWDC 2010 Session 144中看到了以下内容:
return self->string;
Run Code Online (Sandbox Code Playgroud)
但是这给出了一个错误,建议使用点符号.
2)在'Test*'类型的对象上找到属性'string'; 你的意思是用"."来访问它.运营商?
我也收到警告number:
3)属性'number'需要定义方法'number' - 使用@synthesize,@ dynamic或在这个类实现中提供方法实现
我完全迷失了这里发生的事情.它开始煮沸我的血液一点点.我错过了什么?
我是PHPStorm的新手,我在这个IDE中导入了一个现有的项目.现在我收到很多警告
在课堂上找不到方法'查询'
我读到了使用PHPDoc-blocks来声明当前类中未定义的变量的来源,但我无法了解我应该如何处理这种情况:
class loginModel extends Model{
public function checkLogin(){
[...]
if($this->db->query($sql)){[...]} //Warning as stated above
[...]
}
}
Run Code Online (Sandbox Code Playgroud)
$ this-> db本身是从类Model继承的:
class Model{
protected $db;
private function connect(){
$this->db = new PGSQL();
}
}
Run Code Online (Sandbox Code Playgroud)
因此可以访问名为query的公共PGSQL方法.
也许不是那么精心设计,但如何在不降低其严重性的情况下解决这些信息呢?
我制作了针对iOS 6的iPhone应用程序
我的应用程序运行非常顺利,并且在应用程序中以及应用程序中的任何位置都没有崩溃..但我的应用程序显示了一些与之相关的警告autolayout.
我试了很多来解决这个警告,但我没有成功..
NSLog中的警告:
Unable to simultaneously satisfy constraints.
Probably at least one of the constraints in the following list is one you don't want. Try this: (1) look at each constraint and try to figure out which you don't expect; (2) find the code that added the unwanted constraint or constraints and fix it. (Note: If you're seeing NSAutoresizingMaskLayoutConstraints that you don't understand, refer to the documentation for the UIView property translatesAutoresizingMaskIntoConstraints)
(
"<NSAutoresizingMaskLayoutConstraint:0xac85e50 h=-&- v=-&- …Run Code Online (Sandbox Code Playgroud) 我试图为我的班级禁用几个任意的PMD警告.
如何列出几个要忽略的PMD规则?我无法找到谷歌.
@SuppressWarnings("PMD.OnlyOneReturn")
@SuppressWarnings("PMD.ShortVariable")
public class MyClass {
Run Code Online (Sandbox Code Playgroud)
它给出了Eclipse编译时错误:
Duplicate annotation @SurpressWarnings
Run Code Online (Sandbox Code Playgroud)
这是可编译但被忽略的
@SuppressWarnings("PMD.OnlyOneReturn, PMD.ShortVariable")
Run Code Online (Sandbox Code Playgroud)
这个
@SuppressWarnings("PMD.OnlyOneReturn", "PMD.ShortVariable")
Run Code Online (Sandbox Code Playgroud)
结果是
Syntax error on token ,
Run Code Online (Sandbox Code Playgroud)
Eclipse配置为接受PMD类型:
我有一个基类,例如:
class A {
public:
virtual void methodA(int) {}
virtual void methodA(int, int, int) {}
};
Run Code Online (Sandbox Code Playgroud)
xcode发出了隐藏方法A的警告 - 所有sems都按照我的预期工作(从A派生的类可以通过A指针访问并使用方法A的任何一个).
我正在尝试编写一个简单的代码,使用java.util.LinkedList库在Java中实现Linked List.我尽力保持它没有错误.
它使用-Xlint编译(并执行):unchecked.但它产生了很多类型的警告--LL.java:25:警告:[未经检查]未经检查的调用添加(E)作为原始类型的成员LinkedList
有人可以帮助我1.理解为什么会这样?2.删除警告!
任何帮助将不胜感激...
import java.util.LinkedList;
class LL{
public static void main(String[] args){
//creating a new linked list object
LinkedList LLobj = new LinkedList();
//adding data to linked list
LLobj.add("T");
LLobj.add("H");
LLobj.add("I");
LLobj.add("S");
LLobj.add(" ");
LLobj.add("I");
LLobj.add("S");
LLobj.add(" ");
LLobj.add("A");
LLobj.add(" ");
LLobj.add("L");
LLobj.add("I");
LLobj.add("N");
LLobj.add("K");
LLobj.add("E");
LLobj.add("D");
LLobj.add("-");
LLobj.add("L");
LLobj.add("I");
LLobj.add("S");
LLobj.add("T");
//printing the linked list
System.out.println(LLobj);
//Implementing more functions to add data
LLobj.addFirst("#");
LLobj.addLast("#");
LLobj.add(5,"$");
//printing the linked list
System.out.println(LLobj);
//removing data
LLobj.remove("$");
LLobj.remove("#");
LLobj.remove("#");
//printing the …Run Code Online (Sandbox Code Playgroud) 我正在制作一个简单的文件搜索程序,它提供了一个GUI.它运行完美,但是,ActionListener当我更新输出时,我在搜索按钮中收到编译时警告JList.反正有没有避免这个警告?