[dpdk-dev,3/4] examples/*: -Wno-switch required for weird ioctl() ID's

Message ID 1405914461-19335-4-git-send-email-mhall@mhcomputing.net (mailing list archive)
State Rejected, archived
Headers

Commit Message

Matthew Hall July 21, 2014, 3:47 a.m. UTC
  Signed-off-by: Matthew Hall <mhall@mhcomputing.net>
---
 examples/multi_process/client_server_mp/mp_client/Makefile | 1 +
 examples/multi_process/client_server_mp/mp_server/Makefile | 1 +
 examples/multi_process/l2fwd_fork/Makefile                 | 1 +
 examples/multi_process/simple_mp/Makefile                  | 1 +
 examples/multi_process/symmetric_mp/Makefile               | 1 +
 examples/netmap_compat/Makefile                            | 2 ++
 examples/netmap_compat/bridge/Makefile                     | 1 +
 examples/vhost/Makefile                                    | 1 +
 8 files changed, 9 insertions(+)
  

Comments

Thomas Monjalon July 21, 2014, 1:45 p.m. UTC | #1
2014-07-20 20:47, Matthew Hall:
> +CFLAGS += -Wno-switch

As I said for patch 1/4,
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
  

Patch

diff --git a/examples/multi_process/client_server_mp/mp_client/Makefile b/examples/multi_process/client_server_mp/mp_client/Makefile
index 2688fed..ba2481d 100644
--- a/examples/multi_process/client_server_mp/mp_client/Makefile
+++ b/examples/multi_process/client_server_mp/mp_client/Makefile
@@ -43,6 +43,7 @@  APP = mp_client
 SRCS-y := client.c
 
 CFLAGS += $(WERROR_FLAGS) -O3
+CFLAGS += -Wno-switch
 CFLAGS += -I$(SRCDIR)/../shared
 
 include $(RTE_SDK)/mk/rte.extapp.mk
diff --git a/examples/multi_process/client_server_mp/mp_server/Makefile b/examples/multi_process/client_server_mp/mp_server/Makefile
index c29e478..bf96c30 100644
--- a/examples/multi_process/client_server_mp/mp_server/Makefile
+++ b/examples/multi_process/client_server_mp/mp_server/Makefile
@@ -52,6 +52,7 @@  SRCS-y := main.c init.c args.c
 INC := $(wildcard *.h)
 
 CFLAGS += $(WERROR_FLAGS) -O3
+CFLAGS += -Wno-switch
 CFLAGS += -I$(SRCDIR)/../shared
 
 # for newer gcc, e.g. 4.4, no-strict-aliasing may not be necessary
diff --git a/examples/multi_process/l2fwd_fork/Makefile b/examples/multi_process/l2fwd_fork/Makefile
index ff257a3..2c5a808 100644
--- a/examples/multi_process/l2fwd_fork/Makefile
+++ b/examples/multi_process/l2fwd_fork/Makefile
@@ -46,5 +46,6 @@  SRCS-y := main.c flib.c
 
 CFLAGS += -O3
 CFLAGS += $(WERROR_FLAGS)
+CFLAGS += -Wno-switch
 
 include $(RTE_SDK)/mk/rte.extapp.mk
diff --git a/examples/multi_process/simple_mp/Makefile b/examples/multi_process/simple_mp/Makefile
index 31ec0c8..dd43814 100644
--- a/examples/multi_process/simple_mp/Makefile
+++ b/examples/multi_process/simple_mp/Makefile
@@ -46,5 +46,6 @@  SRCS-y := main.c mp_commands.c
 
 CFLAGS += -O3
 CFLAGS += $(WERROR_FLAGS)
+CFLAGS += -Wno-switch
 
 include $(RTE_SDK)/mk/rte.extapp.mk
diff --git a/examples/multi_process/symmetric_mp/Makefile b/examples/multi_process/symmetric_mp/Makefile
index c789f3c..9f1d184 100644
--- a/examples/multi_process/symmetric_mp/Makefile
+++ b/examples/multi_process/symmetric_mp/Makefile
@@ -46,5 +46,6 @@  SRCS-y := main.c
 
 CFLAGS += -O3
 CFLAGS += $(WERROR_FLAGS)
+CFLAGS += -Wno-switch
 
 include $(RTE_SDK)/mk/rte.extapp.mk
diff --git a/examples/netmap_compat/Makefile b/examples/netmap_compat/Makefile
index d398e5f..4ee8c60 100644
--- a/examples/netmap_compat/Makefile
+++ b/examples/netmap_compat/Makefile
@@ -38,6 +38,8 @@  unexport RTE_SRCDIR RTE_OUTPUT RTE_EXTMK
 
 DIRS-y += bridge
 
+CFLAGS += -Wno-switch
+
 .PHONY: all clean $(DIRS-y)
 
 all: $(DIRS-y)
diff --git a/examples/netmap_compat/bridge/Makefile b/examples/netmap_compat/bridge/Makefile
index 50d96e8..f91a634 100644
--- a/examples/netmap_compat/bridge/Makefile
+++ b/examples/netmap_compat/bridge/Makefile
@@ -56,6 +56,7 @@  SRCS-y += compat_netmap.c
 
 CFLAGS += -O3 -I$(SRCDIR)/../lib -I$(SRCDIR)/../netmap
 CFLAGS += $(WERROR_FLAGS)
+CFLAGS += -Wno-switch
 
 include $(RTE_SDK)/mk/rte.extapp.mk
 
diff --git a/examples/vhost/Makefile b/examples/vhost/Makefile
index f45f83f..2c1f0ba 100644
--- a/examples/vhost/Makefile
+++ b/examples/vhost/Makefile
@@ -53,6 +53,7 @@  SRCS-y := main.c virtio-net.c vhost-net-cdev.c
 
 CFLAGS += -O2 -I/usr/local/include -D_FILE_OFFSET_BITS=64 -Wno-unused-parameter
 CFLAGS += $(WERROR_FLAGS)
+CFLAGS += -Wno-switch
 LDFLAGS += -lfuse
 
 include $(RTE_SDK)/mk/rte.extapp.mk