I am getting compilation errors anywhere NSParameterAssert is used. For example:
-(instancetype)initForPlot:(CPTPlot *)plot withFunction:(CPTDataSourceFunction)function
{
NSParameterAssert([plot isKindOfClass:[CPTScatterPlot class]]);
NSParameterAssert(function);
if ( (self = [self initForPlot:plot]) ) {
dataSourceFunction = function;
}
return self;
}
The code compiles fine with Xcode 6.2 but it's giving me the following errors with Xcode 6.3:
/Users/xxxx/Project/App/Presentation/CorePlot/Source/CPTFunctionDataSource.m:110:5: Using %s directive in NSString which is being passed as a formatting argument to the formatting method
I have looked up online and have not seen information on the error message.
A temp fix I am using is the following:
#undef NSParameterAssert
#define NSParameterAssert(condition) ({\
do {\
_Pragma("clang diagnostic push")\
_Pragma("clang diagnostic ignored \"-Wcstring-format-directive\"")\
NSAssert((condition), @"Invalid parameter not satisfying: %s", #condition);\
_Pragma("clang diagnostic pop")\
} while(0);\
})
There should be a better solution for this though.