Some compilers detect this error:
error: ‘ids[0]’ may be used uninitialized in this function
ret = rte_service_map_lcore_set(i, ids[lcore_iter], 1);
It can be reproduced very easily on Fedora 21 with
gcc-4.9.2-6.fc21.x86_64.
Fixes:
21698354c832 ("service: introduce service cores concept")
Cc: stable@dpdk.org
Signed-off-by: Yi Yang <yi.y.yang@intel.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
uint32_t count = rte_service_get_count();
int32_t lcore_iter = 0;
- uint32_t ids[RTE_MAX_LCORE];
+ uint32_t ids[RTE_MAX_LCORE] = {0};
int32_t lcore_count = rte_service_lcore_list(ids, RTE_MAX_LCORE);
if (lcore_count == 0)