net/dpaa2: fix possible use of uninitialized vars
authorAndrzej Ostruszka <aostruszka@marvell.com>
Thu, 7 Nov 2019 15:03:14 +0000 (16:03 +0100)
committerThomas Monjalon <thomas@monjalon.net>
Fri, 8 Nov 2019 14:23:41 +0000 (15:23 +0100)
commit7bbc7dc431a66e81514219f1734ed263a3db3359
tree3b7a4f9862d95371861f0a172b38c21375312eee
parent1d3bb890a432e3f8b7223b1b68e658b40b1dc077
net/dpaa2: fix possible use of uninitialized vars

This patch fixes 'maybe-uninitialized' warnings reported by compiler
when using LTO.

Compiler warning pointing to this error (with LTO enabled):
error: ‘kg_cfg.extracts[0].masks[0].mask’ may be used uninitialized in
this function [-Werror=maybe-uninitialized]
    extr->masks[j].mask = cfg->extracts[i].masks[j].mask;

Fixes: 16bbc98a3e63 ("bus/fslmc: update MC to 10.3.x")
Cc: stable@dpdk.org
Signed-off-by: Andrzej Ostruszka <aostruszka@marvell.com>
drivers/net/dpaa2/base/dpaa2_hw_dpni.c
drivers/net/dpaa2/mc/dpkg.c