Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/asp.net-core/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Iphone 警告:正在传递'的参数3;objc#u setProperty';由于原型而签字_Iphone_Cocoa Touch_Xcode_Uikit - Fatal编程技术网

Iphone 警告:正在传递'的参数3;objc#u setProperty';由于原型而签字

Iphone 警告:正在传递'的参数3;objc#u setProperty';由于原型而签字,iphone,cocoa-touch,xcode,uikit,Iphone,Cocoa Touch,Xcode,Uikit,在我激活了所有类型的警告后,编译器对此进行了投诉: 我有这样一个应用程序代理: #import <UIKit/UIKit.h> @class MyViewController; @interface TestAppDelegate : NSObject <UIApplicationDelegate> { UIWindow *window; MyViewController *myViewController; } @property (nonatom

在我激活了所有类型的警告后,编译器对此进行了投诉:

我有这样一个应用程序代理:

#import <UIKit/UIKit.h>

@class MyViewController;

@interface TestAppDelegate : NSObject <UIApplicationDelegate> {
    UIWindow *window;
    MyViewController *myViewController;
}

@property (nonatomic, retain) IBOutlet UIWindow *window;
@property (nonatomic, retain) IBOutlet MyViewController *myViewController;

@end
在实现文件的末尾,编译器抱怨:

At top level:
warning: passing argument 3 of 'objc_setProperty' as signed due to prototype
warning: passing argument 5 of 'objc_setProperty' with different width due to prototype
warning: passing argument 6 of 'objc_setProperty' with different width due to prototype
warning: passing argument 3 of 'objc_setProperty' as signed due to prototype
warning: passing argument 5 of 'objc_setProperty' with different width due to prototype
warning: passing argument 6 of 'objc_setProperty' with different width due to prototype
这是什么意思?我必须为此担心吗?

是的——那是不对的。一点也不。你应该为此担心

当您在顶层收到这样的警告时,通常意味着头文件中有一些错误导致了以后的问题

那么,问题是,什么?可能是某个地方的一个定义。可以是以前的某项声明,特别是试图修复错误的某项声明,该错误可以通过#导入正确的系统提供的标题进行适当修复

添加发出这些警告的完整编译命令行(您可以在Xcode中找到它)。

是--这不对。一点也不。你应该为此担心

当您在顶层收到这样的警告时,通常意味着头文件中有一些错误导致了以后的问题

那么,问题是,什么?可能是某个地方的一个定义。可以是以前的某项声明,特别是试图修复错误的某项声明,该错误可以通过#导入正确的系统提供的标题进行适当修复


添加发出这些警告的完整编译命令行(你可以在Xcode中找到它)。

我很确定你需要向苹果公司提交一个关于这个的bug。我假设(看到这个警告)objc_setProperty(一个私有函数,afaict)用于苹果的@synthesis setter代码生成的实现中。所以此隐藏实现需要更改,以便在启用该警告标志时不会生成警告(
GCC\u WARN\u PROTOTYPE\u CONVERSION
)。这些(以及其他)条件应该在更大的代码库上验证(也考虑C++),启用更多警告。 我很确定你需要向苹果公司提交一个关于这个问题的bug。我假设(看到这个警告)objc_setProperty(一个私有函数,afaict)用于苹果的@synthesis setter代码生成的实现中。所以此隐藏实现需要更改,以便在启用该警告标志时不会生成警告(
GCC\u WARN\u PROTOTYPE\u CONVERSION
)。这些(以及其他)条件应该在更大的代码库上验证(也考虑C++),启用更多警告。 “这些(和其他)条件应该在更大的代码库上得到验证”——苹果的QA是一个笑话。他们中的每一个人都应该被解雇,并且应该雇佣一批新的人。(不是针对你——我厌倦了处理苹果的问题,也厌倦了为那些永远无法修复的东西提交错误报告)。“这些(和其他)条件应该在更大的代码库上得到验证”——苹果的QA是一个笑话。他们中的每一个人都应该被解雇,并且应该雇佣一批新的人。(不是针对你-我厌倦了处理苹果的问题,也厌倦了为那些永远无法修复的东西提交错误报告)。-Wstrict selector match-Wundeclared selector应该做这个把戏(“GCC使用的其他标志”,而不是LLVM)。当我们谈论强化编译器选项时,这里是我更喜欢使用的完整集,以便GCC的静态分析可以帮助我:-Wall-Wextra-Wconversion-Wstrict overflow-Wformat=2-Wformat security-Wno unused参数-Wstrict选择器匹配-wundecared选择器-Wstrict选择器匹配-wundecared选择器应该可以做到这一点(“其他标志”由GCC使用,而不是LLVM)。当我们讨论强化编译器选项时,这里是我更喜欢使用的完整集合,以便GCC的静态分析可以帮助我:-Wall-Wextra-Wconversion-Wstrict overflow-Wformat=2-Wformat security-Wno未使用的参数-Wstrict选择器匹配-Wundeclared选择器。
At top level:
warning: passing argument 3 of 'objc_setProperty' as signed due to prototype
warning: passing argument 5 of 'objc_setProperty' with different width due to prototype
warning: passing argument 6 of 'objc_setProperty' with different width due to prototype
warning: passing argument 3 of 'objc_setProperty' as signed due to prototype
warning: passing argument 5 of 'objc_setProperty' with different width due to prototype
warning: passing argument 6 of 'objc_setProperty' with different width due to prototype