net/mlx4: fix possible uninitialized variable
authorThomas Monjalon <thomas@monjalon.net>
Fri, 16 Nov 2018 16:58:52 +0000 (17:58 +0100)
committerThomas Monjalon <thomas@monjalon.net>
Fri, 23 Nov 2018 00:43:39 +0000 (01:43 +0100)
commit554f06d10b1c646f20d7011a30b26fb43507d596
tree26e68648d6ae7307d401c5024704b7e29415db95
parenta17842c1421c1b26f9deed4f6684abdba06e7a56
net/mlx4: fix possible uninitialized variable

When compiling with gcc -O1, this error appears:
drivers/net/mlx4/mlx4_ethdev.c: In function ‘mlx4_rxmode_toggle’:
rte_log.h:321:3: error:
‘mode’ may be used uninitialized in this function

The function mlx4_rxmode_toggle is never called with a value which
is not in the switch block, but GCC complains about it with -O1.
So the default case is "fixed" by setting string "undefined".

Fixes: eacaac7bae36 ("net/mlx4: restore promisc and allmulti support")
Cc: stable@dpdk.org
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
drivers/net/mlx4/mlx4_ethdev.c