From patchwork Wed Sep 20 08:31:17 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Yi Yang X-Patchwork-Id: 28980 Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 869FB9FE; Wed, 20 Sep 2017 10:35:36 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 3A55423B for ; Wed, 20 Sep 2017 10:35:34 +0200 (CEST) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 20 Sep 2017 01:35:33 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos; i="5.42,420,1500966000"; d="scan'208"; a="1197093793" Received: from unknown (HELO localhost.localdomain.bj.intel.com) ([10.240.224.185]) by fmsmga001.fm.intel.com with ESMTP; 20 Sep 2017 01:35:32 -0700 From: Yi Yang To: harry.van.haaren@intel.com Cc: dev@dpdk.org, Yi Yang Date: Wed, 20 Sep 2017 16:31:17 +0800 Message-Id: <1505896277-125758-1-git-send-email-yi.y.yang@intel.com> X-Mailer: git-send-email 2.1.0 MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH] service: fix compilation error X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 --- 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)