Skip to content

Commit

Permalink
net/ixgbe: fix warning with GCC 9
Browse files Browse the repository at this point in the history
[ upstream commit e81b056 ]

Compiling on Fedora 30, we get the following warning, causing build failure
when Werror flag is set:

../drivers/net/ixgbe/ixgbe_rxtx.c:2141:14: warning:
‘nmb’ may be used uninitialized in this function [-Wmaybe-uninitialized]
 2141 |    rxe->mbuf = nmb;
      |    ~~~~~~~~~~^~~~~

Initializing the value to "NULL" fixes the issue.

Fixes: 8eecb32 ("ixgbe: add LRO support")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
  • Loading branch information
bruce-richardson authored and kevintraynor committed May 8, 2019
1 parent e13b2e6 commit 41be728
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ixgbe/ixgbe_rxtx.c
Expand Up @@ -2029,7 +2029,7 @@ ixgbe_recv_pkts_lro(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts,
struct ixgbe_rx_entry *next_rxe = NULL;
struct rte_mbuf *first_seg;
struct rte_mbuf *rxm;
struct rte_mbuf *nmb;
struct rte_mbuf *nmb = NULL;
union ixgbe_adv_rx_desc rxd;
uint16_t data_len;
uint16_t next_id;
Expand Down

0 comments on commit 41be728

Please sign in to comment.