audk/MdeModulePkg
Laszlo Ersek a78d3a279b MdeModulePkg: PCD/Pei: eliminate unused but set variable
- SVN r14866:

  MdePkg and MdeModulePkg Pcd: Add the new EFI_GET_PCD_INFO_PROTOCOL and
  EFI_GET_PCD_INFO_PPI support for PI 1.2.1 compliance.

added the "DataBase" local variable to PcdPeimInit(), and both set it and
used it.

- SVN r14869:

  MdeModulePkg and Nt32Pkg Pcd: Add the new EFI_GET_PCD_INFO_PROTOCOL and
  EFI_GET_PCD_INFO_PPI support for PI 1.2.1  compliance.

changed the PcdPeimInit() function, but "DataBase" remained both set and
used.

- SVN r17173:

  MdeModulePkg Pcd: Check the input SkuId in SetSku()

changed the function again; and this time "DataBase" became
set-but-unused. It triggers the following build error, when building
ArmVirtualizationQemu.dsc with gcc-4.8:

  MdeModulePkg/Universal/PCD/Pei/Pcd.c:150:21: error: variable 'DataBase'
  set but not used [-Werror=unused-but-set-variable]
     PEI_PCD_DATABASE  *DataBase;
                       ^
  cc1: all warnings being treated as errors

Fix the error by removing the DataBase variable, restoring the pre-r14866
state locally, when the BuildPcdDatabase() function was called, but its
return value was thrown away.

Cc: Star Zeng <star.zeng@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17179 6f19259b-4bc3-4df7-8a09-765794883524
2015-04-15 01:06:15 +00:00
..
Application MdeModulePkg DxeCore/PiSmmCore/MemoryProfileInfo: Fix EBC and VS2013 build failure. 2014-11-17 02:30:44 +00:00
Bus MdeModulePkg/NvmExpressDxe: Fix possible memory leak issue in NvmExpressDxe driver. 2015-04-10 06:02:00 +00:00
Core MdeModulePkg: Roll back report status code change in RuntimeDriverSetVirtualAddressMap. 2015-04-10 01:37:41 +00:00
Include MdeModulePkg: Add ATTRIBUTE (+/-RT, RO) support in PCD declaration in DSC file. 2015-04-10 09:01:46 +00:00
Library MdeModulePkg PiDxeS3BootScriptLib: Initialize the EFI_BOOT_SCRIPT_TABLE_HEADER.Version. 2015-04-13 01:56:57 +00:00
Logo MdeModulePkg: Convert non DOS format files to DOS format and remove unused module UNI files. 2014-09-03 08:39:12 +00:00
Universal MdeModulePkg: PCD/Pei: eliminate unused but set variable 2015-04-15 01:06:15 +00:00
Contributions.txt */Contributions.txt: Update example email address 2015-02-03 17:29:14 +00:00
License.txt Update copyright format 2012-04-24 06:49:39 +00:00
MdeModulePkg.dec MdeModulePkg: Add LzmaDecompress Guid 2015-04-03 02:49:51 +00:00
MdeModulePkg.dsc MdeModulePkg: Add two library instances 2015-04-03 02:50:57 +00:00
MdeModulePkg.uni MdeModulePkg: Add SMBIOS 64-bit support for SMBIOS 3.0. 2015-03-16 02:41:48 +00:00
MdeModulePkgExtra.uni MdeModulePkg: INF/DEC file updates to EDK II packages 2014-08-28 06:55:48 +00:00