这个警告在一些第三方库中出现了很多.
有没有办法在不修改代码的情况下处理它(例如忽略警告)?
如果我必须修改代码来修复它我该怎么办?
这是导致警告的代码块之一:
BOOL FBIsDeviceIPad() {
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 30200
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
return YES;
}
#endif
return NO;
}
Run Code Online (Sandbox Code Playgroud) // screen.h
#ifndef screen_h
#define screen_h
#define MAC 1
#define WIN 2
#define LNX 3
#ifdef PLATFORM
# undef PLATFORM
#endif
#define PLATFORM MAC
void screen_init();
#endif
Run Code Online (Sandbox Code Playgroud)
// screen.c
#include <string.h>
#include <stdlib.h>
#include "screen.h"
#if PLATFORM == MAC
#include <curses.h>
void screen_init(){
erase();
}
#endif
Run Code Online (Sandbox Code Playgroud)
我不明白为什么它没有在screen.h中看到我的原型
任何建议/提示表示赞赏!