- 论坛徽章:
- 0
|
编译的适合加了:-Wredundant-decls选项,编译出现下面错误:
gcc -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wcast-align -Wunused-parameter -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -Wno-pointer-sign -c submit_request.c -g -fPIC -I./confparser -I./include -I/usr/local/include -DWLOG_ -DDEBUG_ -D_THREAD_SAFE -DLINUX_API
In file included from submit_request.c:8:0:
/usr/include/stdio.h:449:12: 错误: 对‘fscanf’冗余的重声明 [-Werror=redundant-decls]
/usr/include/stdio.h:452:12: 错误: 对‘scanf’冗余的重声明 [-Werror=redundant-decls]
/usr/include/stdio.h:454:12: 错误: 对‘sscanf’冗余的重声明 [-Werror=redundant-decls]
/usr/include/stdio.h:500:12: 错误: 对‘vfscanf’冗余的重声明 [-Werror=redundant-decls]
/usr/include/stdio.h:505:12: 错误: 对‘vscanf’冗余的重声明 [-Werror=redundant-decls]
/usr/include/stdio.h:508:12: 错误: 对‘vsscanf’冗余的重声明 [-Werror=redundant-decls]
提示错误的行在submit_request.c只是一个#include <stdio.h>而已 |
|