i40e: compile fix on ICC 13.0.0
PATCH 1/1 i40e: compile fix on ICC 13.0.0
Below compile error can be found on ICC 13.0.0, which is a warning treated as error. Forcedly disabling the warning can fix it.
Error log:
lib/librte_pmd_i40e/i40e/i40e_nvm.c(1022): error #188: enumerated type mixed with another type
hw->aq.asq_last_status = old_asq_status;
^--- lib/librte_pmd_i40e/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
lib/librte_pmd_i40e/Makefile +1 -1
@@ -48,7 +48,7 @@ LIBABIVER := 1 # to disable warnings # ifeq ($(CC), icc) -CFLAGS_BASE_DRIVER = -wd593 +CFLAGS_BASE_DRIVER = -wd593 -wd188 else ifeq ($(CC), clang) CFLAGS_BASE_DRIVER += -Wno-sign-compare CFLAGS_BASE_DRIVER += -Wno-unused-value
Signature · 1 line
1.8.1.4
PATCH v2 2/2 i40e/base: compile fix on clang 3.3
In reply to Helin ZhangBelow compile error can be found on clang 3.3, which is a warning treated as error. Forcedly disabling the warning can fix it.
Error log: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[] = {
^--- lib/librte_pmd_i40e/Makefile | 1 + 1 file changed, 1 insertion(+)
lib/librte_pmd_i40e/Makefile +1 -0
@@ -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
Signature · 1 line
1.8.1.4
v2 cover compile fixes on ICC and clang
In reply to Helin ZhangCompile warnings on ICC and clang can be found, and treated as errors. Disabling those warnings forcedly can fix them.
v2 changes:
Added the fix for the compile error on clang.
Helin Zhang (2):
i40e: compile fix on ICC 13.0.0
i40e: compile fix on clang 3.3
lib/librte_pmd_i40e/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
Signature · 1 line
1.8.1.4
PATCH v2 1/2 i40e/base: compile fix on ICC 13.0.0
Below compile error can be found on ICC 13.0.0, which is a warning treated as error. Forcedly disabling the warning can fix it.
Error log:
lib/librte_pmd_i40e/i40e/i40e_nvm.c(1022): error #188: enumerated type mixed with another type
hw->aq.asq_last_status = old_asq_status;
^--- lib/librte_pmd_i40e/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
lib/librte_pmd_i40e/Makefile +1 -1
@@ -48,7 +48,7 @@ LIBABIVER := 1 # to disable warnings # ifeq ($(CC), icc) -CFLAGS_BASE_DRIVER = -wd593 +CFLAGS_BASE_DRIVER = -wd593 -wd188 else ifeq ($(CC), clang) CFLAGS_BASE_DRIVER += -Wno-sign-compare CFLAGS_BASE_DRIVER += -Wno-unused-value
Signature · 1 line
1.8.1.4
Re: [PATCH v2 1/2] i40e/base: compile fix on ICC 13.0.0
Quoted 10 lines · Helin Zhang
Below compile error can be found on ICC 13.0.0, which is a warning treated as error. Forcedly disabling the warning can fix it.
Error log:
lib/librte_pmd_i40e/i40e/i40e_nvm.c(1022): error #188: enumerated type mixed with another typehw->aq.asq_last_status = old_asq_status; ^Signed-off-by Helin Zhang <[email protected]>
Quoted 20 lines
--- lib/librte_pmd_i40e/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)lib/librte_pmd_i40e/Makefile +1
-1@@ -48,7 +48,7 @@ LIBABIVER := 1 # to disable warnings # ifeq ($(CC), icc) -CFLAGS_BASE_DRIVER = -wd593 +CFLAGS_BASE_DRIVER = -wd593 -wd188 else ifeq ($(CC), clang) CFLAGS_BASE_DRIVER += -Wno-sign-compare CFLAGS_BASE_DRIVER += -Wno-unused-valueSignature · 1 line
1.8.1.4
Re: [PATCH v2 2/2] i40e/base: compile fix on clang 3.3
In reply to Helin ZhangQuoted 10 lines · Helin Zhang
Below compile error can be found on clang 3.3, which is a warning treated as error. Forcedly disabling the warning can fix it.
Error log:
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[] = { ^Signed-off-by Helin Zhang <[email protected]>
Quoted 19 lines
--- lib/librte_pmd_i40e/Makefile | 1 + 1 file changed, 1 insertion(+)lib/librte_pmd_i40e/Makefile +1
-0@@ -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-valueSignature · 1 line
1.8.1.4
Re: [PATCH v2 1/2] i40e/base: compile fix on ICC 13.0.0
In reply to Bruce RichardsonQuoted 10 lines · Bruce Richardson
Quoted 9 lines · Helin Zhang
Below compile error can be found on ICC 13.0.0, which is a warning treated as error. Forcedly disabling the warning can fix it.
Error log:
lib/librte_pmd_i40e/i40e/i40e_nvm.c(1022): error #188: enumerated type mixed with another typehw->aq.asq_last_status = old_asq_status; ^
Quoted 4 lines
Quoted 1 line
Signed-off-by Helin Zhang <[email protected]>Acked-by Bruce Richardson <[email protected]>
Fix works, but you probably should reword the title to start with "fix".
For future reference, it would also be nice to reference the commit that broke things.
Quoted 20 lines
Quoted 20 lines
--- lib/librte_pmd_i40e/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)lib/librte_pmd_i40e/Makefile +1
-1@@ -48,7 +48,7 @@ LIBABIVER := 1 # to disable warnings # ifeq ($(CC), icc) -CFLAGS_BASE_DRIVER = -wd593 +CFLAGS_BASE_DRIVER = -wd593 -wd188 else ifeq ($(CC), clang) CFLAGS_BASE_DRIVER += -Wno-sign-compare CFLAGS_BASE_DRIVER += -Wno-unused-valueSignature · 1 line
1.8.1.4
PATCH v3 1/2 i40e/base: fix compile with ICC 13.0.0
In reply to Helin ZhangBelow compile error can be found on ICC 13.0.0, which is a warning treated as error. Forcedly disabling the warning can fix it.
Error log:
lib/librte_pmd_i40e/i40e/i40e_nvm.c(1022): error #188: enumerated type mixed with another type
hw->aq.asq_last_status = old_asq_status;
^--- lib/librte_pmd_i40e/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
v3 changes:
Reworded the commit title.
lib/librte_pmd_i40e/Makefile +1 -1
@@ -48,7 +48,7 @@ LIBABIVER := 1 # to disable warnings # ifeq ($(CC), icc) -CFLAGS_BASE_DRIVER = -wd593 +CFLAGS_BASE_DRIVER = -wd593 -wd188 else ifeq ($(CC), clang) CFLAGS_BASE_DRIVER += -Wno-sign-compare CFLAGS_BASE_DRIVER += -Wno-unused-value
Signature · 1 line
1.8.1.4
v3 cover fix compile with ICC and clang
In reply to Helin ZhangCompile warnings on ICC and clang can be found, and treated as errors. Disabling those warnings forcedly can fix them.
v2 changes:
Added the fix for the compile error on clang.
v3 changes:
Reworded the commit titles.
Helin Zhang (2):
i40e: compile fix on ICC 13.0.0
i40e: compile fix on clang 3.3
lib/librte_pmd_i40e/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
Signature · 1 line
1.8.1.4
PATCH v3 2/2 i40e/base: fix compile with clang 3.3
Below compile error can be found on clang 3.3, which is a warning treated as error. Forcedly disabling the warning can fix it.
Error log: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[] = {
^--- lib/librte_pmd_i40e/Makefile | 1 + 1 file changed, 1 insertion(+)
v3 changes:
Reworded the commit title.
lib/librte_pmd_i40e/Makefile +1 -0
@@ -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
Signature · 1 line
1.8.1.4
Re: [PATCH v3 0/2] fix compile with ICC and clang
In reply to Helin ZhangQuoted 9 lines · Helin Zhang
Compile warnings on ICC and clang can be found, and treated as errors. Disabling those warnings forcedly can fix them.
v2 changes:
Added the fix for the compile error on clang.v3 changes:
Reworded the commit titles.
Quoted 10 lines
Helin Zhang (2):
i40e: compile fix on ICC 13.0.0
i40e: compile fix on clang 3.3lib/librte_pmd_i40e/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)Signature · 1 line
1.8.1.4
Series Acked-by: Bruce Richardson <[email protected]>
Re: [PATCH v2 0/2] compile fixes on ICC and clang
In reply to Helin ZhangQuoted 6 lines · Helin Zhang
Compile warnings on ICC and clang can be found, and treated as errors. Disabling those warnings forcedly can fix them.
v2 changes:
Added the fix for the compile error on clang.
Quoted 7 lines
Helin Zhang (2):
i40e: compile fix on ICC 13.0.0
i40e: compile fix on clang 3.3lib/librte_pmd_i40e/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
Thomas Monjalon
AppliedRe: [PATCH v3 0/2] fix compile with ICC and clang
In reply to Bruce Richardson2015-05-18 16:43, Bruce Richardson:
Quoted 11 lines · Helin Zhang
Quoted 8 lines
Compile warnings on ICC and clang can be found, and treated as errors. Disabling those warnings forcedly can fix them.
v2 changes:
Added the fix for the compile error on clang.v3 changes:
Reworded the commit titles.Series Acked-by: Bruce Richardson <[email protected]>
Applied, thanks
I reworded the commit message and added reference to the breaking commit:
http://dpdk.org/browse/dpdk/commit/?id=ff5c3960017cf
Please consider giving this kind of explanation when fixing things, especially for special handling of base drivers.
Re: [PATCH v3 0/2] fix compile with ICC and clang
Thomas, thank you!
- Helin
Quoted 27 lines
-----Original Message-----
From: Thomas Monjalon [mailto:[email protected]]
Sent: Tuesday, May 19, 2015 6:33 PM
To: Zhang, Helin
Cc: [email protected]; Richardson, Bruce
Subject: Re: [dpdk-dev] [PATCH v3 0/2] fix compile with ICC and clang2015-05-18 16:43, Bruce Richardson:
Quoted 2 lines · Helin Zhang
Quoted 1 line
Compile warnings on ICC and clang can be found, and treated as
errors.
Quoted 9 lines
Quoted 7 lines
Disabling those warnings forcedly can fix them.
v2 changes:
Added the fix for the compile error on clang.v3 changes:
Reworded the commit titles.Series Acked-by: Bruce Richardson <[email protected]>
Applied, thanks
I reworded the commit message and added reference to the breaking commit:http://dpdk.org/browse/dpdk/commit/?id=ff5c3960017cfPlease consider giving this kind of explanation when fixing things, especially for special handling of base drivers.