Programming/Linux_Kernel
warning: function declaration isn't a prototype
decdream
2008. 11. 5. 15:39
gcc 로 빌드하다보면 다음과 같은 warning 을 만나게 된다.
warning: function declaration isn't a prototype
신경쓰여서 찾아봤더니 다음과 같은 의미가 있다고 한다.
warning 없는 compile 을 위하여...
> gcc: gcc version 2.95.3 20010315 (release)
>
> i get these warnings on a project i'm trying to port using
> arm-linux-gcc .. is there some place i can find a more detailed
> description of what these warnings mean and how i can clean them up? i
> am having problems with my project and suspect that it is related to
> these prototypes being mis-handled as the function declaration,
> instead of just being handled as a prototype ..
The warning means that the code does something like this:
extern int foo ();
The warning message will include a file name and line number you can
use to see where this is happening.
You can turn off the warning with -Wno-strict-prototypes (or simply by
omitting -Wstrict-prototypes).
Ian