This error is seen in build of type "minsize":
app/test/test_link_bonding_mode4.c:1596:41: error:
'pkt' may be used uninitialized [-Werror=maybe-uninitialized]
It looks to be a compiler issue because pkt is only used
when rte_ring_dequeue() succeeded.
The variable is initialized to allow compiling with "minsize" option.
Fixes: 5e41ab250dfa ("app/test: unit tests for bonding mode 4")
Signed-off-by: Cheryl Bansal <[email protected]>
---
app/test/test_link_bonding_mode4.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/test/test_link_bonding_mode4.c
b/app/test/test_link_bonding_mode4.c
index ff13dbed93..ce5eb60599 100644
--- a/app/test/test_link_bonding_mode4.c
+++ b/app/test/test_link_bonding_mode4.c
@@ -1566,7 +1566,7 @@ test_mode4_executor(int (*test_func)(void))
struct member_conf *port;
int test_result;
uint8_t i;
- void *pkt;
+ void *pkt = NULL;
/* Check if environment is clean. Fail to launch a test if there was
* a critical error before that prevented to reset environment. */
--
2.43.0