From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 8D1C17D4E for ; Thu, 21 Sep 2017 04:05:08 +0200 (CEST) Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 20 Sep 2017 19:05:07 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.42,423,1500966000"; d="scan'208";a="130855970" Received: from unknown (HELO cran64.bj.intel.com) ([10.240.224.181]) by orsmga004.jf.intel.com with ESMTP; 20 Sep 2017 19:05:06 -0700 Date: Thu, 21 Sep 2017 09:50:00 +0800 From: "Yang, Yi" To: "Van Haaren, Harry" Cc: "dev@dpdk.org" Message-ID: <20170921014959.GA119171@cran64.bj.intel.com> References: <1505896277-125758-1-git-send-email-yi.y.yang@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Subject: Re: [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: , X-List-Received-Date: Thu, 21 Sep 2017 02:05:08 -0000 On Wed, Sep 20, 2017 at 05:00:11PM +0800, Van Haaren, Harry wrote: > > From: Yang, Yi Y > > Sent: Wednesday, September 20, 2017 9:31 AM > > To: Van Haaren, Harry > > Cc: dev@dpdk.org; Yang, Yi Y > > Subject: [PATCH] service: fix compilation error > > > > 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 > > Hi Yi, > > Would you provide a more descriptive commit title > and message please? The compilation output should not be > included in the commit message, instead a short description > of what the error is, and what steps can be taken to > reproduce the error are much more helpful. > > The code changes look OK to me - but I'd like to be able > to catch these issues in future, so steps to reproduce are > valuable to me. > > Thanks, -Harry Harry, normal DPDK make everybody does usually will trigger this on current master tree, I'm not sure if it is gcc version related. On my Fedora 21, it can be reproduced very easily. I met it when I fixed another vhost bug, I can't build DPDK without it, that is why I want to commit it to you :-) I have posted out v2 with more descriptive title and git log body per your comments. Thanks a lot for your review. > > > > --- > > 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 >