ccgus / fmdb

A Cocoa / Objective-C wrapper around SQLite
Other
13.84k stars 2.77k forks source link

Declaration of instance variables in the interface is deprecated #296

Open DaleLJefferson opened 10 years ago

DaleLJefferson commented 10 years ago

I'm running with -Wobjc-interface-ivars turned on and fmdb is showing lots of warnings. Would you accept a pull request fixing some of the clang warnings?

@interface FMDatabase : NSObject  {
    sqlite3*            _db;
    NSString*           _databasePath;
    BOOL                _logsErrors;
    BOOL                _crashOnErrors;
    BOOL                _traceExecution;
    BOOL                _checkedOut;
    BOOL                _shouldCacheStatements;
    BOOL                _isExecutingStatement;
    BOOL                _inTransaction;
    NSTimeInterval      _maxBusyRetryTimeInterval;
    NSTimeInterval      _startBusyRetryTime;

    NSMutableDictionary *_cachedStatements;
    NSMutableSet        *_openResultSets;
    NSMutableSet        *_openFunctions;

    NSDateFormatter     *_dateFormat;
}
ccgus commented 10 years ago

I'm going to keep those there for the time being. Maybe they'll be taken out for FMDB 3.0

robertmryan commented 10 years ago

@ccgus How about suppressing that warning for FMDB?

#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wobjc-interface-ivars"

@interface FMDatabase
...
@end

#pragma clang diagnostic pop
ccgus commented 10 years ago

Yea, that's easy enough. (done!)