Message ID | 20110118142248.489615870@eitzenberger.org |
---|---|
State | Not Applicable, archived |
Delegated to: | David Miller |
Headers | show |
On Tue, 18 Jan 2011, holger@eitzenberger.org wrote: > The usage of the gcc option -Wunused-parameter interferes badly with > the assert() macros. In case -DNDEBUG is specified build fails with: > > cc1: warnings being treated as errors > print.c: In function 'ipset_print_family': > print.c:92: error: unused parameter 'opt' > print.c: In function 'ipset_print_port': > print.c:413: error: unused parameter 'opt' > print.c: In function 'ipset_print_proto': > > A possible fix is just to remove -Wunused, as -Wextra + -Wunused enables > -Wunused-paramter. I chose to keep the compiler flags and add the required attribute to the function parameters instead. Many thanks again, Holger! Best regards, Jozsef - E-mail : kadlec@blackhole.kfki.hu, kadlec@mail.kfki.hu PGP key : http://www.kfki.hu/~kadlec/pgp_public_key.txt Address : KFKI Research Institute for Particle and Nuclear Physics H-1525 Budapest 114, POB. 49, Hungary -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Index: ipset/configure.ac =================================================================== --- ipset.orig/configure.ac 2011-01-18 14:47:46.000000000 +0100 +++ ipset/configure.ac 2011-01-18 14:56:11.000000000 +0100 @@ -144,7 +144,6 @@ AX_CFLAGS_GCC_OPTION(-Wstrict-prototypes) AX_CFLAGS_GCC_OPTION(-Wswitch-default) AX_CFLAGS_GCC_OPTION(-Wundef) -AX_CFLAGS_GCC_OPTION(-Wunused) AX_CFLAGS_GCC_OPTION(-Wwrite-strings) dnl Checks for library functions.
The usage of the gcc option -Wunused-parameter interferes badly with the assert() macros. In case -DNDEBUG is specified build fails with: cc1: warnings being treated as errors print.c: In function 'ipset_print_family': print.c:92: error: unused parameter 'opt' print.c: In function 'ipset_print_port': print.c:413: error: unused parameter 'opt' print.c: In function 'ipset_print_proto': A possible fix is just to remove -Wunused, as -Wextra + -Wunused enables -Wunused-paramter. Signed-off-by: Holger Eitzenberger <holger@eitzenberger.org>