From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Permerror (SPF Permanent Error: Two or more type TXT spf records found.) identity=mailfrom; client-ip=192.55.52.151; helo=mga17.intel.com; envelope-from=dandan.bi@intel.com; receiver=edk2-devel@lists.01.org Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) (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 92A2721106C68 for ; Mon, 3 Sep 2018 00:09:47 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 03 Sep 2018 00:09:46 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.53,324,1531810800"; d="scan'208";a="80441556" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by orsmga003.jf.intel.com with ESMTP; 03 Sep 2018 00:09:46 -0700 Received: from fmsmsx123.amr.corp.intel.com (10.18.125.38) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 3 Sep 2018 00:09:46 -0700 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by fmsmsx123.amr.corp.intel.com (10.18.125.38) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 3 Sep 2018 00:09:45 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.226]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.16]) with mapi id 14.03.0319.002; Mon, 3 Sep 2018 15:09:43 +0800 From: "Bi, Dandan" To: "Ni, Ruiyu" , "edk2-devel@lists.01.org" Thread-Topic: [PATCH] EmulatorPkg/PlatformBmLib: Fix GCC build failure Thread-Index: AQHUQy0bpMZpjzOHU0GnQg/AR685T6TeIeZg Date: Mon, 3 Sep 2018 07:09:43 +0000 Message-ID: <3C0D5C461C9E904E8F62152F6274C0BB3BB71466@shsmsx102.ccr.corp.intel.com> References: <20180903022406.25580-1-ruiyu.ni@intel.com> In-Reply-To: <20180903022406.25580-1-ruiyu.ni@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [PATCH] EmulatorPkg/PlatformBmLib: Fix GCC build failure X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Sep 2018 07:09:47 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Dandan Bi Thanks, Dandan -----Original Message----- From: Ni, Ruiyu=20 Sent: Monday, September 3, 2018 10:24 AM To: edk2-devel@lists.01.org Cc: Bi, Dandan Subject: [PATCH] EmulatorPkg/PlatformBmLib: Fix GCC build failure Some local variables are initialized but never used. GCC complains about that. The patch fixes this issue. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ruiyu Ni Cc: Dandan Bi --- EmulatorPkg/Library/PlatformBmLib/PlatformBmMemoryTest.c | 14 ------------= -- 1 file changed, 14 deletions(-) diff --git a/EmulatorPkg/Library/PlatformBmLib/PlatformBmMemoryTest.c b/Emu= latorPkg/Library/PlatformBmLib/PlatformBmMemoryTest.c index 5b39776..b07226f 100644 --- a/EmulatorPkg/Library/PlatformBmLib/PlatformBmMemoryTest.c +++ b/EmulatorPkg/Library/PlatformBmLib/PlatformBmMemoryTest.c @@ -41,26 +41,15 @@ PlatformBootManagerMemoryTest ( EFI_GENERIC_MEMORY_TEST_PROTOCOL *GenMemoryTest; UINT64 TestedMemorySize; UINT64 TotalMemorySize; - UINT64 PreviousValue; BOOLEAN ErrorOut; BOOLEAN TestAbort; EFI_INPUT_KEY Key; - CHAR16 *StrTotalMemory; - CHAR16 *Pos; - UINTN StrTotalMemorySize; =20 ReturnStatus =3D EFI_SUCCESS; ZeroMem (&Key, sizeof (EFI_INPUT_KEY)); =20 - StrTotalMemorySize =3D 128; - Pos =3D AllocateZeroPool (StrTotalMemorySize); - ASSERT (Pos !=3D NULL); - - StrTotalMemory =3D Pos; - TestedMemorySize =3D 0; TotalMemorySize =3D 0; - PreviousValue =3D 0; ErrorOut =3D FALSE; TestAbort =3D FALSE; =20 @@ -72,7 +61,6 @@ PlatformBootManagerMemoryTest ( (VOID **) &GenMemoryTest ); if (EFI_ERROR (Status)) { - FreePool (Pos); return EFI_SUCCESS; } =20 @@ -89,7 +77,6 @@ PlatformBootManagerMemoryTest ( // do the test, and then the status of EFI_NO_MEDIA will be returned b= y // "MemoryTestInit". So it does not need to test memory again, just re= turn. // - FreePool (Pos); return EFI_SUCCESS; } =20 @@ -128,6 +115,5 @@ PlatformBootManagerMemoryTest ( Done: DEBUG ((DEBUG_INFO, "%d bytes of system memory tested OK\r\n", TotalMemo= rySize)); =20 - FreePool (Pos); return ReturnStatus; } --=20 2.7.4