[dpdk-dev] mlx: fix icc compilation error
Commit Message
Compilation errors:
mlx4:
CC mlx4.o
.../dpdk/drivers/net/mlx4/mlx4.c(5409): error #188: enumerated type
mixed with another type
priv->intr_handle.type = 0;
^
mlx5:
CC em_rxtx.o
.../dpdk/drivers/net/mlx5/mlx5_rxq.c(282):
error #188: enumerated type mixed with another type
enum hash_rxq_type type = 0;
^
.../dpdk/drivers/net/mlx5/mlx5_rxq.c(622):
error #188: enumerated type mixed with another type
if (!priv_allow_flow_type(priv, i)) {
^
.../dpdk/drivers/net/mlx5/mlx5_rxq.c(623):
error #188: enumerated type mixed with another type
priv_special_flow_disable(priv, i);
^
.../dpdk/drivers/net/mlx5/mlx5_rxq.c(625):
error #188: enumerated type mixed with another type
int ret = priv_special_flow_enable(priv, i);
^
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
drivers/net/mlx4/Makefile | 4 ++++
drivers/net/mlx5/Makefile | 4 ++++
2 files changed, 8 insertions(+)
Comments
On Tue, Jun 14, 2016 at 10:51:37AM +0100, Ferruh Yigit wrote:
> Compilation errors:
> mlx4:
> CC mlx4.o
> .../dpdk/drivers/net/mlx4/mlx4.c(5409): error #188: enumerated type
> mixed with another type
> priv->intr_handle.type = 0;
> ^
>
> mlx5:
> CC em_rxtx.o
> .../dpdk/drivers/net/mlx5/mlx5_rxq.c(282):
> error #188: enumerated type mixed with another type
> enum hash_rxq_type type = 0;
> ^
>
> .../dpdk/drivers/net/mlx5/mlx5_rxq.c(622):
> error #188: enumerated type mixed with another type
> if (!priv_allow_flow_type(priv, i)) {
> ^
>
> .../dpdk/drivers/net/mlx5/mlx5_rxq.c(623):
> error #188: enumerated type mixed with another type
> priv_special_flow_disable(priv, i);
> ^
>
> .../dpdk/drivers/net/mlx5/mlx5_rxq.c(625):
> error #188: enumerated type mixed with another type
> int ret = priv_special_flow_enable(priv, i);
> ^
>
> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
> ---
> drivers/net/mlx4/Makefile | 4 ++++
> drivers/net/mlx5/Makefile | 4 ++++
> 2 files changed, 8 insertions(+)
>
> diff --git a/drivers/net/mlx4/Makefile b/drivers/net/mlx4/Makefile
> index d2f5692..e46c85b 100644
> --- a/drivers/net/mlx4/Makefile
> +++ b/drivers/net/mlx4/Makefile
> @@ -58,6 +58,10 @@ CFLAGS += -Wno-error=cast-qual
> EXPORT_MAP := rte_pmd_mlx4_version.map
> LIBABIVER := 1
>
> +ifeq ($(CONFIG_RTE_TOOLCHAIN_ICC),y)
> +CFLAGS += -wd188 #188: enumerated type mixed with another type
> +endif
> +
> # DEBUG which is usually provided on the command-line may enable
> # CONFIG_RTE_LIBRTE_MLX4_DEBUG.
> ifeq ($(DEBUG),1)
> diff --git a/drivers/net/mlx5/Makefile b/drivers/net/mlx5/Makefile
> index 92bfa07..dd8c425 100644
> --- a/drivers/net/mlx5/Makefile
> +++ b/drivers/net/mlx5/Makefile
> @@ -70,6 +70,10 @@ CFLAGS += -Wno-error=cast-qual
> EXPORT_MAP := rte_pmd_mlx5_version.map
> LIBABIVER := 1
>
> +ifeq ($(CONFIG_RTE_TOOLCHAIN_ICC),y)
> +CFLAGS += -wd188 #188: enumerated type mixed with another type
> +endif
> +
> # DEBUG which is usually provided on the command-line may enable
> # CONFIG_RTE_LIBRTE_MLX5_DEBUG.
> ifeq ($(DEBUG),1)
Is disabling this warning the best way to deal with this error. Since the values
are enums, not ints, should they not be assigned to enum values.
/Bruce
@@ -58,6 +58,10 @@ CFLAGS += -Wno-error=cast-qual
EXPORT_MAP := rte_pmd_mlx4_version.map
LIBABIVER := 1
+ifeq ($(CONFIG_RTE_TOOLCHAIN_ICC),y)
+CFLAGS += -wd188 #188: enumerated type mixed with another type
+endif
+
# DEBUG which is usually provided on the command-line may enable
# CONFIG_RTE_LIBRTE_MLX4_DEBUG.
ifeq ($(DEBUG),1)
@@ -70,6 +70,10 @@ CFLAGS += -Wno-error=cast-qual
EXPORT_MAP := rte_pmd_mlx5_version.map
LIBABIVER := 1
+ifeq ($(CONFIG_RTE_TOOLCHAIN_ICC),y)
+CFLAGS += -wd188 #188: enumerated type mixed with another type
+endif
+
# DEBUG which is usually provided on the command-line may enable
# CONFIG_RTE_LIBRTE_MLX5_DEBUG.
ifeq ($(DEBUG),1)