From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH] eal: fix compilation when optimization level is O1 Date: Thu, 06 Oct 2016 15:25:58 +0200 Message-ID: <26353687.pnS7phqusY@xps13> References: <1474288011-17096-1-git-send-email-olivier.matz@6wind.com> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Cc: dev@dpdk.org, sergio.gonzalez.monroy@intel.com To: Olivier Matz Return-path: Received: from mail-wm0-f43.google.com (mail-wm0-f43.google.com [74.125.82.43]) by dpdk.org (Postfix) with ESMTP id 76DCE3238 for ; Thu, 6 Oct 2016 15:26:48 +0200 (CEST) Received: by mail-wm0-f43.google.com with SMTP id 197so52710361wmk.1 for ; Thu, 06 Oct 2016 06:26:48 -0700 (PDT) In-Reply-To: <1474288011-17096-1-git-send-email-olivier.matz@6wind.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 2016-09-19 14:26, Olivier Matz: > When compiled with EXTRA_CFLAGS=3D"-O1", the compiler is not > able to detect that size is always initialized when used, and > issues a wrong warning: >=20 > eal_memory.c: In function =E2=80=98rte_eal_hugepage_attach=E2=80=99= : > eal_memory.c:1684:3: error: =E2=80=98size=E2=80=99 may be used unin= itialized in this > function [-Werror=3Dmaybe-uninitialized] > munmap(hp, size); > ^ >=20 > Workaround this issue by initializing size to 0. > Seen on gcc (Debian 5.4.1-1) 5.4.1 20160803. >=20 > Signed-off-by: Olivier Matz Applied, thanks