i40e/base: fix build with clang
authorHelin Zhang <helin.zhang@intel.com>
Mon, 18 May 2015 15:40:56 +0000 (23:40 +0800)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Tue, 19 May 2015 10:14:46 +0000 (12:14 +0200)
When compiling with clang, it detects that a variable used for debug
is unused (debug_mask is never set):
    lib/librte_pmd_i40e/i40e/i40e_nvm.c:708:20: error: unused variable
          'i40e_nvm_update_state_str' [-Werror,-Wunused-variable]
    STATIC const char *i40e_nvm_update_state_str[] = {
                       ^
As we are not supposed to modify the base driver (except for update
synchronization from Intel), it was ignored with GCC thanks to the
option -Wno-unused-variable but clang was forgotten.

Fixes: 6b5aaf47d571 ("i40e/base: replace NVM debug logs")

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Signed-off-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Tetsuya Mukawa <mukawa@igel.co.jp>
lib/librte_pmd_i40e/Makefile

index 911e4f5..4a5635b 100644 (file)
@@ -58,6 +58,7 @@ CFLAGS_BASE_DRIVER += -Wno-format
 CFLAGS_BASE_DRIVER += -Wno-missing-field-initializers
 CFLAGS_BASE_DRIVER += -Wno-pointer-to-int-cast
 CFLAGS_BASE_DRIVER += -Wno-format-nonliteral
+CFLAGS_BASE_DRIVER += -Wno-unused-variable
 else
 CFLAGS_BASE_DRIVER  = -Wno-sign-compare
 CFLAGS_BASE_DRIVER += -Wno-unused-value