Revision: 17179
          http://sourceforge.net/p/edk2/code/17179
Author:   lersek
Date:     2015-04-15 01:06:15 +0000 (Wed, 15 Apr 2015)
Log Message:
-----------
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.z...@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <ler...@redhat.com>
Reviewed-by: Star Zeng <star.z...@intel.com>

Revision Links:
--------------
    http://sourceforge.net/p/edk2/code/14866
    http://sourceforge.net/p/edk2/code/14869
    http://sourceforge.net/p/edk2/code/17173
    http://sourceforge.net/p/edk2/code/14866

Modified Paths:
--------------
    trunk/edk2/MdeModulePkg/Universal/PCD/Pei/Pcd.c

Modified: trunk/edk2/MdeModulePkg/Universal/PCD/Pei/Pcd.c
===================================================================
--- trunk/edk2/MdeModulePkg/Universal/PCD/Pei/Pcd.c     2015-04-14 11:56:56 UTC 
(rev 17178)
+++ trunk/edk2/MdeModulePkg/Universal/PCD/Pei/Pcd.c     2015-04-15 01:06:15 UTC 
(rev 17179)
@@ -146,10 +146,9 @@
   IN CONST EFI_PEI_SERVICES     **PeiServices
   )
 {
-  EFI_STATUS        Status;
-  PEI_PCD_DATABASE  *DataBase;
+  EFI_STATUS Status;
 
-  DataBase = BuildPcdDatabase (FileHandle);
+  BuildPcdDatabase (FileHandle);
 
   //
   // Install PCD_PPI and EFI_PEI_PCD_PPI.


------------------------------------------------------------------------------
BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises
http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
_______________________________________________
edk2-commits mailing list
edk2-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-commits

Reply via email to