[dpdk-dev,1/4] l3fwd: some functions are unused in l3fwd-acl
Commit Message
Signed-off-by: Matthew Hall <mhall@mhcomputing.net>
---
examples/l3fwd/Makefile | 1 +
1 file changed, 1 insertion(+)
Comments
Hi,
2014-07-20 20:47, Matthew Hall:
> +CFLAGS += -Wno-unused-function
I think it's better to fix the code instead of removing a warning.
If there is a very good reason to not do it, it would appear in the log.
Thanks
The same code is used in l3fwd and l3fwd-acl. When it is reused in l3fwd-acl a packet processing function from original l3fwd is not used any more.
> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Matthew Hall
> Sent: Sunday, July 20, 2014 8:48 PM
> To: dev@dpdk.org
> Subject: [dpdk-dev] [PATCH 1/4] l3fwd: some functions are unused in l3fwd-acl
>
> Signed-off-by: Matthew Hall <mhall@mhcomputing.net>
> ---
> examples/l3fwd/Makefile | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/examples/l3fwd/Makefile b/examples/l3fwd/Makefile
> index 68de8fc..5cd7396 100644
> --- a/examples/l3fwd/Makefile
> +++ b/examples/l3fwd/Makefile
> @@ -46,6 +46,7 @@ SRCS-y := main.c
>
> CFLAGS += -O3 $(USER_FLAGS)
> CFLAGS += $(WERROR_FLAGS)
> +CFLAGS += -Wno-unused-function
>
Rather than disabling the warnings, would it not be better to remove the functions entirely from the compile? I would assume that these are functions for one leg of the l3fwd code (e.g. hash lookup vs lpm lookup) that are not used in the other leg of the code, in which case the proper fix should be to add some more #ifdefs, right?
/Bruce
@@ -46,6 +46,7 @@ SRCS-y := main.c
CFLAGS += -O3 $(USER_FLAGS)
CFLAGS += $(WERROR_FLAGS)
+CFLAGS += -Wno-unused-function
# workaround for a gcc bug with noreturn attribute
# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12603