From 52af5b998fbb1b0914e995fe6f21378e394914eb Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Fri, 30 Jul 2010 14:47:29 -0700 Subject: [PATCH] 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. --- configure.ac | 1 + lib/automake.mk | 3 +++ 2 files changed, 4 insertions(+) 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 += \ -- 2.30.2