tciuro / NanoStore

NanoStore is an open source, lightweight schema-less local key-value document store written in Objective-C for Mac OS X and iOS.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Compiler warnings

siuying opened this issue · comments

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]

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

Well, Xcode suggest a cast (unsigned long)numberOfColumns

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 almost, please also add #77

Done? ;-)

Yes! Thanks :)