[dpdk-stable] patch 'service: fix build with gcc 4.9' has been queued to stable release 17.08.1

Yuanhan Liu yliu at fridaylinux.org
Tue Nov 21 14:15:44 CET 2017


Hi,

FYI, your patch has been queued to stable release 17.08.1

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From a1eb0d497abf5963fbbf66f1a7aec5c84b8c5282 Mon Sep 17 00:00:00 2001
From: Yi Yang <yi.y.yang at intel.com>
Date: Thu, 21 Sep 2017 09:50:43 +0800
Subject: [PATCH] service: fix build with gcc 4.9
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit ca13673513b656e632d5b348de2aa448b55ba9de ]

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")

Signed-off-by: Yi Yang <yi.y.yang at intel.com>
Acked-by: Harry van Haaren <harry.van.haaren at 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 7efb76d..57ff4c1 100644
--- a/lib/librte_eal/common/rte_service.c
+++ b/lib/librte_eal/common/rte_service.c
@@ -407,7 +407,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.7.4



More information about the stable mailing list