DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] service: fix compilation error
@ 2017-09-20  8:31 Yi Yang
  2017-09-20  9:00 ` Van Haaren, Harry
  0 siblings, 1 reply; 3+ messages in thread
From: Yi Yang @ 2017-09-20  8:31 UTC (permalink / raw)
  To: harry.van.haaren; +Cc: dev, Yi Yang

  CC rte_service.o
  ./dpdk/lib/librte_eal/common/rte_service.c: In function
    ‘rte_service_start_with_defaults’:
  ./dpdk/lib/librte_eal/common/rte_service.c:449:9:
    error: ‘ids[0]’ may be used uninitialized in this
    function [-Werror=maybe-uninitialized]
   ret = rte_service_map_lcore_set(i, ids[lcore_iter], 1);

  cc1: all warnings being treated as errors
  ./dpdk/mk/internal/rte.compile-pre.mk:138:
    recipe for target 'rte_service.o' failed

Signed-off-by: Yi Yang <yi.y.yang@intel.com>
---
 lib/librte_eal/common/rte_service.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_eal/common/rte_service.c b/lib/librte_eal/common/rte_service.c
index 43716bb..e598e16 100644
--- a/lib/librte_eal/common/rte_service.c
+++ b/lib/librte_eal/common/rte_service.c
@@ -431,7 +431,7 @@ rte_service_start_with_defaults(void)
 	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)
-- 
2.1.0

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-09-21  2:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-20  8:31 [dpdk-dev] [PATCH] service: fix compilation error Yi Yang
2017-09-20  9:00 ` Van Haaren, Harry
2017-09-21  1:50   ` Yang, Yi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).