关于GCC警告的问题
[gsm@fedora ~]$ cat -n b.c
1 #include <stdio.h>
2 #include <string.h>
3
4 #define _(str) (str)
5 #define report_error(format, ...) \
6 do\
7 {\
8 fprintf(stderr, _("文件:%s 函數:%s 行號:%d 錯誤:"),\
9 __FILE__, __func__, __LINE__); \
10 fprintf(stderr, format, ##__VA_ARGS__); \
11 fprintf(stderr, "\n");\
12 }while(0)
13
14 int main(void)
15 {
16 report_error("test");
17 return 0;
18 }
[gsm@fedora ~]$ gcc -std=c99 -pedantic-errors -Wall b.c
b.c: In function 「main」:
b.c:16:24: 錯誤:ISO C99 需要使用剩餘的引數
如何修改代码(别告诉我修改编译参数。。。)以消除警告?