1

一位自由职业者正在为我开发一个 Iphone 应用程序。该应用程序运行良好,但当我在 Xcode 中加载源代码时收到 37 个警告。您是否介意快速查看一下并告诉我是否有一些我应该担心的警告。

谢谢你的帮助 !

yyy Group
Semantic Issue Group
/Users/xxx/Desktop/Iphone App/yyy 3/yyy/Classes/FMDatabase/FMDatabase.m:313:74: Second argument to 'va_arg' is of promotable type 'char'; this va_arg has undefined behavior because arguments will be promoted to 'int'
/Users/xxx/Desktop/Iphone App/yyy 3/yyy/Classes/FMDatabase/FMDatabase.m:326:70: Second argument to 'va_arg' is of promotable type 'short'; this va_arg has undefined behavior because arguments will be promoted to 'int'
/Users/xxx/Desktop/Iphone App/yyy 3/yyy/Classes/FMDatabase/FMDatabase.m:329:78: Second argument to 'va_arg' is of promotable type 'unsigned short'; this va_arg has undefined behavior because arguments will be promoted to 'int'
/Users/xxx/Desktop/Iphone App/yyy 3/yyy/Classes/FMDatabase/FMDatabase.m:350:66: Second argument to 'va_arg' is of promotable type 'float'; this va_arg has undefined behavior because arguments will be promoted to 'double'
/Users/xxx/Desktop/Iphone App/yyy 3/yyy/Classes/ShareKit/Sharers/Services/JSONKit/JSONKit.m:2598:31: Direct access to objective-c's isa is deprecated in favor of object_setClass() and object_getClass()
/Users/xxx/Desktop/Iphone App/yyy 3/yyy/Classes/ShareKit/Sharers/Services/JSONKit/JSONKit.m:2599:31: Direct access to objective-c's isa is deprecated in favor of object_setClass() and object_getClass()
/Users/xxx/Desktop/Iphone App/yyy 3/yyy/Classes/ShareKit/Sharers/Services/JSONKit/JSONKit.m:2600:31: Direct access to objective-c's isa is deprecated in favor of object_setClass() and object_getClass()
/Users/xxx/Desktop/Iphone App/yyy 3/yyy/Classes/ShareKit/Sharers/Services/JSONKit/JSONKit.m:2601:31: Direct access to objective-c's isa is deprecated in favor of object_setClass() and object_getClass()
/Users/xxx/Desktop/Iphone App/yyy 3/yyy/Classes/ShareKit/Sharers/Services/JSONKit/JSONKit.m:2602:31: Direct access to objective-c's isa is deprecated in favor of object_setClass() and object_getClass()
/Users/xxx/Desktop/Iphone App/yyy 3/yyy/Classes/ShareKit/Sharers/Services/JSONKit/JSONKit.m:2605:171: Direct access to objective-c's isa is deprecated in favor of object_setClass() and object_getClass()
/Users/xxx/Desktop/Iphone App/yyy 3/yyy/Classes/ShareKit/Sharers/Services/JSONKit/JSONKit.m:2606:171: Direct access to objective-c's isa is deprecated in favor of object_setClass() and object_getClass()
/Users/xxx/Desktop/Iphone App/yyy 3/yyy/Classes/ShareKit/Sharers/Services/JSONKit/JSONKit.m:2607:171: Direct access to objective-c's isa is deprecated in favor of object_setClass() and object_getClass()
/Users/xxx/Desktop/Iphone App/yyy 3/yyy/Classes/ShareKit/Sharers/Services/JSONKit/JSONKit.m:2608:171: Direct access to objective-c's isa is deprecated in favor of object_setClass() and object_getClass()
/Users/xxx/Desktop/Iphone App/yyy 3/yyy/Classes/ShareKit/Sharers/Services/JSONKit/JSONKit.m:2609:171: Direct access to objective-c's isa is deprecated in favor of object_setClass() and object_getClass()
/Users/xxx/Desktop/Iphone App/yyy 3/yyy/Classes/ShareKit/Sharers/Services/JSONKit/JSONKit.m:2791:40: Direct access to objective-c's isa is deprecated in favor of object_setClass() and object_getClass()
/Users/xxx/Desktop/Iphone App/yyy 3/yyy/Classes/ShareKit/Sharers/Services/JSONKit/JSONKit.m:2802:45: Direct access to objective-c's isa is deprecated in favor of object_setClass() and object_getClass()
/Users/xxx/Desktop/Iphone App/yyy 3/yyy/Classes/ShareKit/Sharers/Services/Twitter/SHKTwitter.m:63:17: Receiver type 'int' is not 'id' or interface pointer, consider casting it to 'id'
/Users/xxx/Desktop/Iphone App/yyy 3/yyy/Classes/ShareKit/Sharers/Services/Twitter/SHKTwitter.m:63:16: Instance method '-boolValue' not found (return type defaults to 'id')
/Users/xxx/Desktop/Iphone App/yyy 3/yyy/Classes/ShareKit/UI/SHKFormControllerLargeTextField.m:97:120: Class method '+sharerTitle' not found (return type defaults to 'id')
/Users/xxx/Desktop/Iphone App/yyy 3/yyy/Classes/ShareKit/UI/SHKFormControllerLargeTextField.m:240:2: Instance method '-sendDidCancel' not found (return type defaults to 'id')
/Users/xxx/Desktop/Iphone App/yyy 3/yyy/Classes/ShareKit/UI/SHKFormControllerLargeTextField.m:246:5: Instance method '-sendForm:' not found (return type defaults to 'id')
Format String Issue Group
/Users/xxx/Desktop/Iphone App/yyy 3/yyy/Classes/FMDatabase/FMDatabase.m:943:45: Format specifies type 'int' but the argument has type 'long'
/Users/xxx/Desktop/Iphone App/yyy 3/yyy/Classes/ShareKit/Sharers/Services/JSONKit/JSONKit.m:745:180: Format specifies type 'unsigned long' but the argument has type 'NSUInteger' (aka 'unsigned int')
/Users/xxx/Desktop/Iphone App/yyy 3/yyy/Classes/ShareKit/Sharers/Services/JSONKit/JSONKit.m:746:134: Format specifies type 'unsigned long' but the argument has type 'NSUInteger' (aka 'unsigned int')
/Users/xxx/Desktop/Iphone App/yyy 3/yyy/Classes/ShareKit/Sharers/Services/JSONKit/JSONKit.m:752:98: Format specifies type 'unsigned long' but the argument has type 'NSUInteger' (aka 'unsigned int')
/Users/xxx/Desktop/Iphone App/yyy 3/yyy/Classes/ShareKit/Sharers/Services/JSONKit/JSONKit.m:773:114: Format specifies type 'unsigned long' but the argument has type 'NSUInteger' (aka 'unsigned int')
/Users/xxx/Desktop/Iphone App/yyy 3/yyy/Classes/ShareKit/Sharers/Services/JSONKit/JSONKit.m:786:114: Format specifies type 'unsigned long' but the argument has type 'NSUInteger' (aka 'unsigned int')
/Users/xxx/Desktop/Iphone App/yyy 3/yyy/Classes/ShareKit/Sharers/Services/JSONKit/JSONKit.m:795:114: Format specifies type 'unsigned long' but the argument has type 'NSUInteger' (aka 'unsigned int')
/Users/xxx/Desktop/Iphone App/yyy 3/yyy/Classes/ShareKit/Core/Helpers/OAuth/OAMutableURLRequest.m:194:48: Format specifies type 'int' but the argument has type 'time_t' (aka 'long')
/Users/xxx/Desktop/Iphone App/yyy 3/yyy/Classes/ShareKit/Core/SHK.m:523:54: Format specifies type 'int' but the argument has type 'NSTimeInterval' (aka 'double')
/Users/xxx/Desktop/Iphone App/yyy 3/yyy/Classes/ShareKit/Sharers/Services/Facebook/SHKFacebook.m:87:53: Format specifies type 'int' but the argument has type 'NSTimeInterval' (aka 'double')
/Users/xxx/Desktop/Iphone App/yyy 3/yyy/Classes/ShareKit/Sharers/Services/Flickr/LFHTTPRequest.m:460:72: Format specifies type 'unsigned long' but the argument has type 'NSUInteger' (aka 'unsigned int')
/Users/xxx/Desktop/Iphone App/yyy 3/yyy/Classes/ShareKit/Sharers/Services/Flickr/LFHTTPRequest.m:469:72: Format specifies type 'unsigned long' but the argument has type 'NSUInteger' (aka 'unsigned int')
/Users/xxx/Desktop/Iphone App/yyy 3/yyy/Classes/ShareKit/Sharers/Services/Google Reader/SHKGoogleReader.m:245:65: Format specifies type 'int' but the argument has type 'NSTimeInterval' (aka 'double')
Cocoa API Issue Group
/Users/xxx/Desktop/Iphone App/yyy 3/yyy/Classes/ShareKit/Sharers/Services/Facebook/FBRequest.m:152:29: Using 'stringWithString:' with a literal is redundant
/Users/xxx/Desktop/Iphone App/yyy 3/yyy/Classes/ShareKit/Sharers/Services/Facebook/FBRequest.m:161:29: Using 'stringWithString:' with a literal is redundant
/Users/xxx/Desktop/Iphone App/yyy 3/yyy/Classes/ShareKit/Sharers/Services/Twitter/SHKTwitter.m:610:21: Using 'stringWithString:' with a literal is redundant
/Users/xxx/Desktop/Iphone App/yyy 3/yyy/Classes/ShareKit/Sharers/Services/Vkontakte/SHKVkontakte.m:409:20: Using 'stringWithString:' with a literal is redundant
4

1 回答 1

5

这些警告中的大多数似乎来自项目中使用的第三方库,例如 JSONKit 和 ShareKit。尽管就我个人而言,没有什么太重要的事情突然出现在我身上。可以在不同版本的 Xcode 之间产生警告。

于 2012-09-18T14:36:27.880 回答