hash: fix icc build
authorFerruh Yigit <ferruh.yigit@intel.com>
Tue, 13 Jun 2017 16:42:12 +0000 (17:42 +0100)
committerThomas Monjalon <thomas@monjalon.net>
Wed, 14 Jun 2017 20:54:54 +0000 (22:54 +0200)
commitd2e026044522d4a5027ab0689c7a663efcb9c493
tree7edf90c202700203ba23db703859e51bc741997e
parentaee3d4d6d5a6dbfa0a503f25f0f2bec8e6476477
hash: fix icc build

build error with icc version 17.0.4 (gcc version 7.0.0 compatibility):

In file included from .../dpdk/lib/librte_hash/rte_fbk_hash.h(59),
                 from .../dpdk/lib/librte_hash/rte_fbk_hash.c(54):
.../dpdk/x86_64-native-linuxapp-icc/include/rte_hash_crc.h(480):
 error #1292: unknown attribute "fallthrough"
                __attribute__ ((fallthrough));
                                ^

In file included from .../dpdk/lib/librte_hash/rte_fbk_hash.h(59),
                 from .../dpdk/lib/librte_hash/rte_fbk_hash.c(54):
.../dpdk/x86_64-native-linuxapp-icc/include/rte_hash_crc.h(486):
 error #1292: unknown attribute "fallthrough"
                __attribute__ ((fallthrough));
                                ^
This code patch hit when gcc > 7 installed and ICC doesn't recognize
fallthrough attribute.

Fixed by disabling code when compiled with ICC.

Fixes: 3dfb9facb055 ("lib: add switch fall-through comments")

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
lib/librte_hash/rte_hash_crc.h