i use shareKit to myself program .
but in the FBConnectGlobal, there are some warning,
NSMutableArray* FBCreateNonRetainingArray() {
CFArrayCallBacks callbacks = kCFTypeArrayCallBacks;
callbacks.retain = RetainNoOp;
callbacks.release = ReleaseNoOp;
return (NSMutableArray*)CFArrayCreateMutable(nil, 0, &callbacks);
}
like this method, it warning:"No previous prototype for function FBCreateNonRetainingArray"
According to c standard, declaring the prototype as
NSMutableArray* FBCreateNonRetainingArray(void);
// ---------------> ^^^^
// Yes, with the void as the parameter
solves the issue.
To clarify Eric Dchao's answer above, someone at facebook apparently didn't put a "static" in front of that BOOL?
Anyways, changing from this
BOOL FBIsDeviceIPad() {
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 30200
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
return YES;
}
#endif
return NO;
}
to this
static BOOL FBIsDeviceIPad() {
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 30200
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
return YES;
}
#endif
return NO;
}
fixed it for me.
UPDATE: Disable warnings is not a good solution, check @Derek Bredensteiner's answer.
In Xcode 4, go to your project's Build Settings. Search for "prototype". There should be an option called "Missing Function Prototypes"; disable it.
via here
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With