Skip to contentSkip to conversation

i40e: compile fix on ICC 13.0.0

PATCH Superseded Helin Zhang 4 participants 14 messages May 18, 2015 – May 19, 2015

lore
Share & tools
lore
#0 lore raw

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
index 22f0716..911e4f5 100644
@@ -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
#5 lore raw

PATCH v2 2/2 i40e/base: compile fix on clang 3.3

In reply to 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[] = {
                   ^
---
 lib/librte_pmd_i40e/Makefile | 1 +
 1 file changed, 1 insertion(+)
lib/librte_pmd_i40e/Makefile +1 -0
index 911e4f5..4a5635b 100644
@@ -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
#1 lore raw

v2 cover compile fixes on ICC and clang

In reply to 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.

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
#2 lore raw

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
index 22f0716..911e4f5 100644
@@ -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
Acked-by on v2 1/2
#3 lore raw

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 type

hw->aq.asq_last_status = old_asq_status;
                       ^
Quoted 20 lines
---
 lib/librte_pmd_i40e/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/librte_pmd_i40e/Makefile +1 -1
index 22f0716..911e4f5 100644
@@ -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
Acked-by on v2 2/2
#6 lore raw

Re: [PATCH v2 2/2] i40e/base: compile fix on clang 3.3

In reply to Helin Zhang
Quoted 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[] = {
                   ^
Quoted 19 lines
---
 lib/librte_pmd_i40e/Makefile | 1 +
 1 file changed, 1 insertion(+)
lib/librte_pmd_i40e/Makefile +1 -0
index 911e4f5..4a5635b 100644
@@ -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
#4 lore raw

Re: [PATCH v2 1/2] i40e/base: compile fix on ICC 13.0.0

In reply to Bruce Richardson
Quoted 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 type

hw->aq.asq_last_status = old_asq_status;
                       ^
Quoted 4 lines
Quoted 1 line

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
index 22f0716..911e4f5 100644
@@ -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
#8 lore raw

PATCH v3 1/2 i40e/base: fix compile with ICC 13.0.0

In reply to 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 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
index 22f0716..911e4f5 100644
@@ -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
#7 lore raw

v3 cover fix compile with ICC and clang

In reply to 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.

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
#9 lore raw

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
index 911e4f5..4a5635b 100644
@@ -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
#10 lore raw

Re: [PATCH v3 0/2] fix compile with ICC and clang

In reply to Helin Zhang
Quoted 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.3

 lib/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]>

Acked-by on the v2 series
#13 lore raw

Re: [PATCH v2 0/2] compile fixes on ICC and clang

In reply to Helin Zhang
Quoted 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.3

 lib/librte_pmd_i40e/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
#11 lore raw

Re: [PATCH v3 0/2] fix compile with ICC and clang

In reply to Bruce Richardson

2015-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.

#12 lore raw

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 clang

2015-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=ff5c3960017cf

Please consider giving this kind of explanation when fixing things, especially for special handling of base drivers.