From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 251A021951C80 for ; Thu, 27 Apr 2017 07:25:46 -0700 (PDT) Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga105.jf.intel.com with ESMTP; 27 Apr 2017 07:25:45 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.37,384,1488873600"; d="scan'208";a="94883342" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by fmsmga006.fm.intel.com with ESMTP; 27 Apr 2017 07:25:45 -0700 Received: from fmsmsx154.amr.corp.intel.com (10.18.116.70) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 27 Apr 2017 07:25:44 -0700 Received: from fmsmsx103.amr.corp.intel.com ([169.254.2.246]) by FMSMSX154.amr.corp.intel.com ([169.254.6.147]) with mapi id 14.03.0319.002; Thu, 27 Apr 2017 07:25:44 -0700 From: "Carsey, Jaben" To: Leif Lindholm , "edk2-devel@lists.01.org" CC: Daryl McDaniel Thread-Topic: [edk2] [PATCH] StdLib: GCC 6 build fixes Thread-Index: AQHSvtb8WOSMKaibn0GYQFnmKmNHoaHZRpgg Date: Thu, 27 Apr 2017 14:25:44 +0000 Message-ID: References: <20170426214916.20784-1-leif.lindholm@linaro.org> In-Reply-To: <20170426214916.20784-1-leif.lindholm@linaro.org> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZTEzNmZjNmQtZjFlMi00YzUyLWE1ZGYtZmJmNWU3OTA1MDYzIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6IjVmQWZcL0RxSnJXWWR4NkJadG43Myt4MmJ0d0lVTUpKSHhxSlZ3RFordFlnPSJ9 x-ctpclassification: CTP_IC x-originating-ip: [10.1.200.106] MIME-Version: 1.0 Subject: Re: [PATCH] StdLib: GCC 6 build fixes X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Apr 2017 14:25:46 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Jaben Carsey > -----Original Message----- > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of > Leif Lindholm > Sent: Wednesday, April 26, 2017 2:49 PM > To: edk2-devel@lists.01.org > Cc: Carsey, Jaben ; Daryl McDaniel lists@mc2research.org> > Subject: [edk2] [PATCH] StdLib: GCC 6 build fixes > Importance: High >=20 > Resolve mainly 'misleading indentation', but also one 'defined but not us= ed' > warning when building with GCC 6 (using GCC5 profile). >=20 > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Leif Lindholm > --- >=20 > Encountered when attmpting to build AppPkg/Applications/Lua. >=20 > StdLib/LibC/Math/k_rem_pio2.c | 3 ++- > StdLib/LibC/Math/w_exp.c | 2 ++ > StdLib/LibC/Time/Time.c | 10 +++++----- > StdLib/LibC/gdtoa/dtoa.c | 8 ++++---- > 4 files changed, 13 insertions(+), 10 deletions(-) >=20 > diff --git a/StdLib/LibC/Math/k_rem_pio2.c > b/StdLib/LibC/Math/k_rem_pio2.c > index af2857778d..bceeb73cc5 100644 > --- a/StdLib/LibC/Math/k_rem_pio2.c > +++ b/StdLib/LibC/Math/k_rem_pio2.c > @@ -174,7 +174,8 @@ __kernel_rem_pio2(double *x, double *y, int e0, int > nx, int prec, const int32_t >=20 > /* compute q[0],q[1],...q[jk] */ > for (i=3D0;i<=3Djk;i++) { > - for(j=3D0,fw=3D0.0;j<=3Djx;j++) fw +=3D x[j]*f[jx+i-j]; q[i] =3D f= w; > + for(j=3D0,fw=3D0.0;j<=3Djx;j++) fw +=3D x[j]*f[jx+i-j]; > + q[i] =3D fw; > } >=20 > jz =3D jk; > diff --git a/StdLib/LibC/Math/w_exp.c b/StdLib/LibC/Math/w_exp.c > index 29a2bb2906..f2a0e39699 100644 > --- a/StdLib/LibC/Math/w_exp.c > +++ b/StdLib/LibC/Math/w_exp.c > @@ -22,9 +22,11 @@ __RCSID("$NetBSD: w_exp.c,v 1.9 2002/05/26 22:02:00 > wiz Exp $"); > #include "math.h" > #include "math_private.h" >=20 > +#ifndef _IEEE_LIBM > static const double > o_threshold=3D 7.09782712893383973096e+02, /* 0x40862E42, 0xFEFA39EF *= / > u_threshold=3D -7.45133219101941108420e+02; /* 0xc0874910, 0xD52D3051 *= / > +#endif >=20 > double > exp(double x) /* wrapper exp */ > diff --git a/StdLib/LibC/Time/Time.c b/StdLib/LibC/Time/Time.c > index 0296a5dc93..6d83986fcb 100644 > --- a/StdLib/LibC/Time/Time.c > +++ b/StdLib/LibC/Time/Time.c > @@ -464,11 +464,11 @@ time1( > for (i =3D 0; i < sp->typecnt; ++i) > seen[i] =3D FALSE; > nseen =3D 0; > - for (i =3D sp->timecnt - 1; i >=3D 0; --i) > - if (!seen[sp->types[i]]) { > - seen[sp->types[i]] =3D TRUE; > - types[nseen++] =3D sp->types[i]; > - } > + for (i =3D sp->timecnt - 1; i >=3D 0; --i) > + if (!seen[sp->types[i]]) { > + seen[sp->types[i]] =3D TRUE; > + types[nseen++] =3D sp->types[i]; > + } > for (sameind =3D 0; sameind < nseen; ++sameind) { > samei =3D types[sameind]; > if (sp->ttis[samei].tt_isdst !=3D tmp->tm_isdst) > diff --git a/StdLib/LibC/gdtoa/dtoa.c b/StdLib/LibC/gdtoa/dtoa.c > index 42098426fd..cd3b1c85d4 100644 > --- a/StdLib/LibC/gdtoa/dtoa.c > +++ b/StdLib/LibC/gdtoa/dtoa.c > @@ -526,15 +526,15 @@ dtoa > Bfree(b); > b =3D b1; > } > - if (( j =3D b5 - m5 )!=3D0) > - b =3D pow5mult(b, j); > + if (( j =3D b5 - m5 )!=3D0) > + b =3D pow5mult(b, j); > if (b =3D=3D NULL) > return NULL; > } > else > b =3D pow5mult(b, b5); > - if (b =3D=3D NULL) > - return NULL; > + if (b =3D=3D NULL) > + return NULL; > } > S =3D i2b(1); > if (S =3D=3D NULL) > -- > 2.11.0 >=20 > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel