From: Ben Pfaff Date: Fri, 30 Jul 2010 21:47:29 +0000 (-0700) Subject: sflow: Avoid "unused parameter" warnings from GCC 4.4. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=52af5b998fbb1b0914e995fe6f21378e394914eb;p=openvswitch sflow: Avoid "unused parameter" warnings from GCC 4.4. With GCC -Wno-unused by itself isn't enough to avoid "unused parameter" warnings, since we also use -Wunused-parameter. We also need to check for and use -Wno-unused-parameter. --- diff --git a/configure.ac b/configure.ac index dad2fb9e..04ffe6e8 100644 --- a/configure.ac +++ b/configure.ac @@ -86,6 +86,7 @@ OVS_ENABLE_OPTION([-Wmissing-prototypes]) OVS_ENABLE_OPTION([-Wmissing-field-initializers]) OVS_ENABLE_OPTION([-Wno-override-init]) OVS_CONDITIONAL_CC_OPTION([-Wno-unused], [HAVE_WNO_UNUSED]) +OVS_CONDITIONAL_CC_OPTION([-Wno-unused-parameter], [HAVE_WNO_UNUSED_PARAMETER]) AC_ARG_VAR(KARCH, [Kernel Architecture String]) AC_SUBST(KARCH) diff --git a/lib/automake.mk b/lib/automake.mk index 0588eea5..49f4e2c7 100644 --- a/lib/automake.mk +++ b/lib/automake.mk @@ -168,6 +168,9 @@ lib_libsflow_a_CFLAGS = $(AM_CFLAGS) if HAVE_WNO_UNUSED lib_libsflow_a_CFLAGS += -Wno-unused endif +if HAVE_WNO_UNUSED_PARAMETER +lib_libsflow_a_CFLAGS += -Wno-unused-parameter +endif if HAVE_NETLINK lib_libopenvswitch_a_SOURCES += \