当我使用 GCC 编译程序时,它会显示"警告:声明不声明任何内容 [-fpermissive]"。
有问题的代码如下:
typedef int BOOL;
如何清除警告?
您可以尝试以下操作。类似的情况对我有用,一个正在受到警告的工会。
typedef int BOOL;
...
BOOL unused;
(void)unused;
该(void)unused;
避免了后续未使用的变量警告。它可以跨所有编译器移植。