Compiler warnings
siuying opened this issue · 6 comments
siuying commented
I noticed following compiler warnings when I compile NanoStore on iOS:
- NOTE | [iOS 5.0] XCODEBUILD > NanoStore/Classes/Advanced/NSFNanoEngine.m:755:73: warning: format specifies type 'long' but the argument has type 'NSUInteger' (aka 'unsigned int') [-Wformat]
- NOTE | [iOS 5.0] XCODEBUILD > NanoStore/Classes/Advanced/NSFNanoEngine.m:769:72: warning: format specifies type 'long' but the argument has type 'NSUInteger' (aka 'unsigned int') [-Wformat]
- NOTE | [iOS 5.0] XCODEBUILD > NanoStore/Classes/Advanced/NSFNanoResult.m:66:83: warning: format specifies type 'long' but the argument has type 'NSUInteger' (aka 'unsigned int') [-Wformat]
- NOTE | [iOS 5.0] XCODEBUILD > NanoStore/Classes/Advanced/NSFNanoResult.m:74:83: warning: format specifies type 'long' but the argument has type 'NSUInteger' (aka 'unsigned int') [-Wformat]
- NOTE | [iOS 5.0] XCODEBUILD > NanoStore/Classes/Advanced/NSFNanoResult.m:118:77: warning: format specifies type 'long' but the argument has type 'NSUInteger' (aka 'unsigned int') [-Wformat]
- NOTE | [iOS 5.0] XCODEBUILD > NanoStore/Classes/Advanced/NSFNanoResult.m:211:79: warning: format specifies type 'long' but the argument has type 'NSUInteger' (aka 'unsigned int') [-Wformat]
- NOTE | [iOS 5.0] XCODEBUILD > NanoStore/Classes/Public/NSFNanoSearch.m:484:61: warning: format specifies type 'long' but the argument has type 'NSUInteger' (aka 'unsigned int') [-Wformat]
- NOTE | [iOS 5.0] XCODEBUILD > NanoStore/Classes/Public/NSFNanoSearch.m:489:62: warning: format specifies type 'long' but the argument has type 'NSUInteger' (aka 'unsigned int') [-Wformat]
- NOTE | [iOS 5.0] XCODEBUILD > NanoStore/Classes/Advanced/NSFNanoEngine.m:755:73: warning: format specifies type 'long' but the argument has type 'NSUInteger' (aka 'unsigned int') [-Wformat]
- NOTE | [iOS 5.0] XCODEBUILD > NanoStore/Classes/Advanced/NSFNanoEngine.m:769:72: warning: format specifies type 'long' but the argument has type 'NSUInteger' (aka 'unsigned int') [-Wformat]
- NOTE | [iOS 5.0] XCODEBUILD > NanoStore/Classes/Advanced/NSFNanoResult.m:66:83: warning: format specifies type 'long' but the argument has type 'NSUInteger' (aka 'unsigned int') [-Wformat]
- NOTE | [iOS 5.0] XCODEBUILD > NanoStore/Classes/Advanced/NSFNanoResult.m:74:83: warning: format specifies type 'long' but the argument has type 'NSUInteger' (aka 'unsigned int') [-Wformat]
- NOTE | [iOS 5.0] XCODEBUILD > NanoStore/Classes/Advanced/NSFNanoResult.m:118:77: warning: format specifies type 'long' but the argument has type 'NSUInteger' (aka 'unsigned int') [-Wformat]
- NOTE | [iOS 5.0] XCODEBUILD > NanoStore/Classes/Advanced/NSFNanoResult.m:211:79: warning: format specifies type 'long' but the argument has type 'NSUInteger' (aka 'unsigned int') [-Wformat]
- NOTE | [iOS 5.0] XCODEBUILD > NanoStore/Classes/Public/NSFNanoSearch.m:484:61: warning: format specifies type 'long' but the argument has type 'NSUInteger' (aka 'unsigned int') [-Wformat]
- NOTE | [iOS 5.0] XCODEBUILD > NanoStore/Classes/Public/NSFNanoSearch.m:489:62: warning: format specifies type 'long' but the argument has type 'NSUInteger' (aka 'unsigned int') [-Wformat]
defvol commented
Same here:
NSFNanoResult.m:66:89: warning: values of type 'NSUInteger' should not be used as format arguments; add an explicit cast to 'unsigned long' instead [-Wformat]
[description appendString:[NSString stringWithFormat:@"Number of columns : %ld\n", numberOfColumns]];
I guess, we should be using %lu instead
defvol commented
Well, Xcode suggest a cast (unsigned long)numberOfColumns
tciuro commented
Francis, could you please verify that this issue has been solved with the changes added in #76? If so, I'd like to close it. Thanks!
tciuro commented
Done? ;-)
siuying commented
Yes! Thanks :)