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.
Other
404 stars 39 forks source link

Compiler warnings #69

Closed siuying closed 11 years ago

siuying commented 11 years ago

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 11 years ago

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 11 years ago

Well, Xcode suggest a cast (unsigned long)numberOfColumns

tciuro commented 11 years ago

Francis, could you please verify that this issue has been solved with the changes added in https://github.com/tciuro/NanoStore/pull/76? If so, I'd like to close it. Thanks!

siuying commented 11 years ago

@tciuro almost, please also add #77

tciuro commented 11 years ago

Done? ;-)

siuying commented 11 years ago

Yes! Thanks :)