summaryrefslogtreecommitdiff
path: root/MdeModulePkg
diff options
context:
space:
mode:
authorEric Dong <eric.dong@intel.com>2014-07-28 07:52:57 +0000
committerydong10 <ydong10@6f19259b-4bc3-4df7-8a09-765794883524>2014-07-28 07:52:57 +0000
commit4e1005eca7186cbe61aaae09108f6fdf29959f22 (patch)
treef2c5494dbea5e2a19b8d05bb586845e7e42ad462 /MdeModulePkg
parentd4193108b51f5aae16805eaf753dfc9b6d7b15f2 (diff)
downloadedk2-4e1005eca7186cbe61aaae09108f6fdf29959f22.zip
edk2-4e1005eca7186cbe61aaae09108f6fdf29959f22.tar.gz
edk2-4e1005eca7186cbe61aaae09108f6fdf29959f22.tar.bz2
Update code to support VS2013 tool chain.
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15695 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg')
-rw-r--r--MdeModulePkg/Core/Dxe/Dispatcher/Dispatcher.c4
-rw-r--r--MdeModulePkg/Core/Dxe/DxeMain/DxeProtocolNotify.c4
-rw-r--r--MdeModulePkg/Core/Dxe/Hand/DriverSupport.c2
-rw-r--r--MdeModulePkg/Core/Dxe/Hand/Locate.c3
-rw-r--r--MdeModulePkg/Core/Dxe/Image/Image.c5
-rw-r--r--MdeModulePkg/Core/Dxe/SectionExtraction/CoreSectionExtraction.c5
-rw-r--r--MdeModulePkg/Library/DxeCoreMemoryAllocationLib/MemoryAllocationLib.c4
-rw-r--r--MdeModulePkg/Library/PiSmmCoreMemoryAllocationLib/MemoryAllocationLib.c4
-rw-r--r--MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiSdt.c4
-rw-r--r--MdeModulePkg/Universal/Acpi/AcpiTableDxe/AmlChild.c4
-rw-r--r--MdeModulePkg/Universal/Acpi/AcpiTableDxe/AmlNamespace.c4
-rw-r--r--MdeModulePkg/Universal/DriverSampleDxe/DriverSample.c1
-rw-r--r--MdeModulePkg/Universal/EbcDxe/EbcExecute.c3
-rw-r--r--MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.c4
-rw-r--r--MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteSmm.c4
-rw-r--r--MdeModulePkg/Universal/FaultTolerantWriteDxe/FtwMisc.c5
-rw-r--r--MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c6
-rw-r--r--MdeModulePkg/Universal/HiiDatabaseDxe/Database.c11
-rw-r--r--MdeModulePkg/Universal/Network/IScsiDxe/IScsiProto.c2
-rw-r--r--MdeModulePkg/Universal/SetupBrowserDxe/Expression.c2
-rw-r--r--MdeModulePkg/Universal/Variable/RuntimeDxe/Reclaim.c3
-rw-r--r--MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c3
-rw-r--r--MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.c8
23 files changed, 76 insertions, 19 deletions
diff --git a/MdeModulePkg/Core/Dxe/Dispatcher/Dispatcher.c b/MdeModulePkg/Core/Dxe/Dispatcher/Dispatcher.c
index a70e2e4..c378ca5 100644
--- a/MdeModulePkg/Core/Dxe/Dispatcher/Dispatcher.c
+++ b/MdeModulePkg/Core/Dxe/Dispatcher/Dispatcher.c
@@ -26,7 +26,7 @@
Depex - Dependency Expresion.
SOR - Schedule On Request - Don't schedule if this bit is set.
-Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -1142,6 +1142,8 @@ CoreFwVolEventProtocolNotify (
VOID *DepexBuffer;
KNOWN_HANDLE *KnownHandle;
+ FvHandle = NULL;
+
while (TRUE) {
BufferSize = sizeof (EFI_HANDLE);
Status = CoreLocateHandle (
diff --git a/MdeModulePkg/Core/Dxe/DxeMain/DxeProtocolNotify.c b/MdeModulePkg/Core/Dxe/DxeMain/DxeProtocolNotify.c
index e5405b3..034520c 100644
--- a/MdeModulePkg/Core/Dxe/DxeMain/DxeProtocolNotify.c
+++ b/MdeModulePkg/Core/Dxe/DxeMain/DxeProtocolNotify.c
@@ -3,7 +3,7 @@
the Dxe Core. The mArchProtocols[] array represents a list of
events that represent the Architectural Protocols.
-Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -122,6 +122,8 @@ GenericProtocolNotify (
LIST_ENTRY *Link;
LIST_ENTRY TempLinkNode;
+ Protocol = NULL;
+
//
// Get Entry from Context
//
diff --git a/MdeModulePkg/Core/Dxe/Hand/DriverSupport.c b/MdeModulePkg/Core/Dxe/Hand/DriverSupport.c
index 92218ee..33dd0bd 100644
--- a/MdeModulePkg/Core/Dxe/Hand/DriverSupport.c
+++ b/MdeModulePkg/Core/Dxe/Hand/DriverSupport.c
@@ -416,6 +416,8 @@ CoreConnectSingleController (
DriverBindingHandleBuffer = NULL;
NumberOfSortedDriverBindingProtocols = 0;
SortedDriverBindingProtocols = NULL;
+ PlatformDriverOverride = NULL;
+ NewDriverBindingHandleBuffer = NULL;
//
// Get list of all Driver Binding Protocol Instances
diff --git a/MdeModulePkg/Core/Dxe/Hand/Locate.c b/MdeModulePkg/Core/Dxe/Hand/Locate.c
index d4bc63c..d98b55a 100644
--- a/MdeModulePkg/Core/Dxe/Hand/Locate.c
+++ b/MdeModulePkg/Core/Dxe/Hand/Locate.c
@@ -1,7 +1,7 @@
/** @file
Locate handle functions
-Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -449,6 +449,7 @@ CoreLocateDevicePath (
return EFI_INVALID_PARAMETER;
}
+ Handles = NULL;
BestDevice = NULL;
SourcePath = *DevicePath;
TmpDevicePath = SourcePath;
diff --git a/MdeModulePkg/Core/Dxe/Image/Image.c b/MdeModulePkg/Core/Dxe/Image/Image.c
index 8a3e869..e7ad450 100644
--- a/MdeModulePkg/Core/Dxe/Image/Image.c
+++ b/MdeModulePkg/Core/Dxe/Image/Image.c
@@ -1,7 +1,7 @@
/** @file
Core image handling services to load and unload PeImage.
-Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -854,6 +854,9 @@ CoreUnloadAndCloseImage (
UINTN OpenInfoCount;
UINTN OpenInfoIndex;
+ HandleBuffer = NULL;
+ ProtocolGuidArray = NULL;
+
if (Image->Ebc != NULL) {
//
// If EBC protocol exists we must perform cleanups for this image.
diff --git a/MdeModulePkg/Core/Dxe/SectionExtraction/CoreSectionExtraction.c b/MdeModulePkg/Core/Dxe/SectionExtraction/CoreSectionExtraction.c
index ad3f58f..e5e3926 100644
--- a/MdeModulePkg/Core/Dxe/SectionExtraction/CoreSectionExtraction.c
+++ b/MdeModulePkg/Core/Dxe/SectionExtraction/CoreSectionExtraction.c
@@ -27,7 +27,7 @@
3) A support protocol is not found, and the data is not available to be read
without it. This results in EFI_PROTOCOL_ERROR.
-Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -513,6 +513,8 @@ VerifyGuidedSectionGuid (
VOID *Interface;
EFI_STATUS Status;
+ Interface = NULL;
+
//
// Check if there is the Guided Section GUID configuration table recorded the GUID itself.
//
@@ -1229,6 +1231,7 @@ GetSection (
EFI_COMMON_SECTION_HEADER *Section;
+ ChildStreamNode = NULL;
OldTpl = CoreRaiseTpl (TPL_NOTIFY);
Instance = SectionInstance + 1;
diff --git a/MdeModulePkg/Library/DxeCoreMemoryAllocationLib/MemoryAllocationLib.c b/MdeModulePkg/Library/DxeCoreMemoryAllocationLib/MemoryAllocationLib.c
index bbb755f..766a3d0 100644
--- a/MdeModulePkg/Library/DxeCoreMemoryAllocationLib/MemoryAllocationLib.c
+++ b/MdeModulePkg/Library/DxeCoreMemoryAllocationLib/MemoryAllocationLib.c
@@ -2,7 +2,7 @@
Support routines for memory allocation routines based
on boot services for Dxe phase drivers.
- Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -375,6 +375,8 @@ InternalAllocatePool (
EFI_STATUS Status;
VOID *Memory;
+ Memory = NULL;
+
Status = CoreAllocatePool (MemoryType, AllocationSize, &Memory);
if (EFI_ERROR (Status)) {
Memory = NULL;
diff --git a/MdeModulePkg/Library/PiSmmCoreMemoryAllocationLib/MemoryAllocationLib.c b/MdeModulePkg/Library/PiSmmCoreMemoryAllocationLib/MemoryAllocationLib.c
index a6372ed..f0f4843 100644
--- a/MdeModulePkg/Library/PiSmmCoreMemoryAllocationLib/MemoryAllocationLib.c
+++ b/MdeModulePkg/Library/PiSmmCoreMemoryAllocationLib/MemoryAllocationLib.c
@@ -1,7 +1,7 @@
/** @file
Support routines for memory allocation routines based on SMM Core internal functions.
- Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -478,6 +478,8 @@ InternalAllocatePool (
EFI_STATUS Status;
VOID *Memory;
+ Memory = NULL;
+
Status = SmmAllocatePool (MemoryType, AllocationSize, &Memory);
if (EFI_ERROR (Status)) {
Memory = NULL;
diff --git a/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiSdt.c b/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiSdt.c
index 6146a1a..93f2660 100644
--- a/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiSdt.c
+++ b/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiSdt.c
@@ -1,7 +1,7 @@
/** @file
ACPI Sdt Protocol Driver
- Copyright (c) 2010, Intel Corporation. All rights reserved. <BR>
+ Copyright (c) 2010 - 2014, Intel Corporation. All rights reserved. <BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -852,6 +852,7 @@ SdtFindPathFromNonRoot (
VOID *Buffer;
EFI_STATUS Status;
+ Buffer = NULL;
AmlHandle = (EFI_AML_HANDLE *)HandleIn;
//
@@ -912,6 +913,7 @@ SdtFindPathFromRoot (
EFI_STATUS Status;
VOID *Buffer;
+ Buffer = NULL;
AmlHandle = (EFI_AML_HANDLE *)HandleIn;
//
diff --git a/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AmlChild.c b/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AmlChild.c
index d663fea..c7e8af9 100644
--- a/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AmlChild.c
+++ b/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AmlChild.c
@@ -1,7 +1,7 @@
/** @file
ACPI Sdt Protocol Driver
- Copyright (c) 2010, Intel Corporation. All rights reserved. <BR>
+ Copyright (c) 2010 - 2014, Intel Corporation. All rights reserved. <BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -189,6 +189,8 @@ AmlGetChildFromObjectChildList (
EFI_STATUS Status;
UINT8 *CurrentBuffer;
+ CurrentBuffer = NULL;
+
if ((AmlParentHandle->AmlByteEncoding->Attribute & AML_HAS_CHILD_OBJ) == 0) {
//
// No ObjectList
diff --git a/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AmlNamespace.c b/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AmlNamespace.c
index b62256e..03b7394 100644
--- a/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AmlNamespace.c
+++ b/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AmlNamespace.c
@@ -1,7 +1,7 @@
/** @file
ACPI Sdt Protocol Driver
- Copyright (c) 2010, Intel Corporation. All rights reserved. <BR>
+ Copyright (c) 2010 - 2014, Intel Corporation. All rights reserved. <BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -300,6 +300,8 @@ AmlConstructNodeListForChild (
EFI_AML_HANDLE *AmlChildHandle;
EFI_STATUS Status;
+ CurrentBuffer = NULL;
+ AmlChildHandle = NULL;
AmlByteEncoding = AmlHandle->AmlByteEncoding;
Buffer = AmlHandle->Buffer;
BufferSize = AmlHandle->Size;
diff --git a/MdeModulePkg/Universal/DriverSampleDxe/DriverSample.c b/MdeModulePkg/Universal/DriverSampleDxe/DriverSample.c
index 84c6c9a..204c043 100644
--- a/MdeModulePkg/Universal/DriverSampleDxe/DriverSample.c
+++ b/MdeModulePkg/Universal/DriverSampleDxe/DriverSample.c
@@ -671,6 +671,7 @@ AppendAltCfgString (
UINTN ValueWidth;
EFI_STATUS Status;
+ TmpBuffer = NULL;
StringPtr = *RequestResult;
StringPtr = StrStr (StringPtr, L"OFFSET");
BlockSize = sizeof (DRIVER_SAMPLE_CONFIGURATION);
diff --git a/MdeModulePkg/Universal/EbcDxe/EbcExecute.c b/MdeModulePkg/Universal/EbcDxe/EbcExecute.c
index 29ff464..69aee07 100644
--- a/MdeModulePkg/Universal/EbcDxe/EbcExecute.c
+++ b/MdeModulePkg/Universal/EbcDxe/EbcExecute.c
@@ -1,7 +1,7 @@
/** @file
Contains code that implements the virtual machine.
-Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -1827,6 +1827,7 @@ ExecuteBREAK (
UINT64 U64EbcEntryPoint;
INT32 Offset;
+ Thunk = NULL;
Operands = GETOPERANDS (VmPtr);
switch (Operands) {
//
diff --git a/MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.c b/MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.c
index 1235bd8..f570729 100644
--- a/MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.c
+++ b/MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.c
@@ -40,7 +40,7 @@
If one of them is not satisfied, FtwWrite may fail.
Usually, Spare area only takes one block. That's SpareAreaLength = BlockSize, NumberOfSpareBlock = 1.
-Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -227,6 +227,8 @@ FaultTolerantWriteInitialize (
EFI_STATUS Status;
EFI_FTW_DEVICE *FtwDevice;
+ FtwDevice = NULL;
+
//
// Allocate private data structure for FTW protocol and do some initialization
//
diff --git a/MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteSmm.c b/MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteSmm.c
index 2b3a630..8221980 100644
--- a/MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteSmm.c
+++ b/MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteSmm.c
@@ -43,7 +43,7 @@
Caution: This module requires additional review when modified.
This driver need to make sure the CommBuffer is not in the SMRAM range.
-Copyright (c) 2010 - 2013, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2010 - 2014, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -274,6 +274,8 @@ GetFvbByAddressAndAttribute (
EFI_FVB_ATTRIBUTES_2 FvbAttributes;
EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL *Fvb;
+ HandleBuffer = NULL;
+
//
// Locate all handles of SMM Fvb protocol.
//
diff --git a/MdeModulePkg/Universal/FaultTolerantWriteDxe/FtwMisc.c b/MdeModulePkg/Universal/FaultTolerantWriteDxe/FtwMisc.c
index b3352bb..b24d66d 100644
--- a/MdeModulePkg/Universal/FaultTolerantWriteDxe/FtwMisc.c
+++ b/MdeModulePkg/Universal/FaultTolerantWriteDxe/FtwMisc.c
@@ -2,7 +2,7 @@
Internal generic functions to operate flash block.
-Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -164,6 +164,7 @@ GetFvbByAddress (
*FvBlock = NULL;
FvbHandle = NULL;
+ HandleBuffer = NULL;
//
// Locate all handles of Fvb protocol
//
@@ -1019,6 +1020,8 @@ FindFvbForFtw (
EFI_FV_BLOCK_MAP_ENTRY *FvbMapEntry;
UINT32 LbaIndex;
+ HandleBuffer = NULL;
+
//
// Get all FVB handle.
//
diff --git a/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c b/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c
index f5e054d..4caf361 100644
--- a/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c
+++ b/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c
@@ -2329,6 +2329,8 @@ GetBlockElement (
IFR_BLOCK_DATA *NextBlockData;
UINTN Length;
+ TmpBuffer = NULL;
+
//
// Init RequestBlockArray
//
@@ -4432,6 +4434,8 @@ HiiBlockToConfig (
CHAR16 *TemString;
CHAR16 TemChar;
+ TmpBuffer = NULL;
+
if (This == NULL || Progress == NULL || Config == NULL) {
return EFI_INVALID_PARAMETER;
}
@@ -4728,6 +4732,8 @@ HiiConfigToBlock (
UINTN BufferSize;
UINTN MaxBlockSize;
+ TmpBuffer = NULL;
+
if (This == NULL || BlockSize == NULL || Progress == NULL) {
return EFI_INVALID_PARAMETER;
}
diff --git a/MdeModulePkg/Universal/HiiDatabaseDxe/Database.c b/MdeModulePkg/Universal/HiiDatabaseDxe/Database.c
index 01d7f02..70c0385 100644
--- a/MdeModulePkg/Universal/HiiDatabaseDxe/Database.c
+++ b/MdeModulePkg/Universal/HiiDatabaseDxe/Database.c
@@ -2417,9 +2417,14 @@ AddPackages (
//
// Initialize Variables
//
- StringPkgIsAdd = FALSE;
- FontPackage = NULL;
- StringPackage = NULL;
+ StringPkgIsAdd = FALSE;
+ FontPackage = NULL;
+ StringPackage = NULL;
+ GuidPackage = NULL;
+ FormPackage = NULL;
+ ImagePackage = NULL;
+ SimpleFontPackage = NULL;
+ KeyboardLayoutPackage = NULL;
//
// Process the package list header
diff --git a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiProto.c b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiProto.c
index 60131b3..cb1f79b 100644
--- a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiProto.c
+++ b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiProto.c
@@ -393,6 +393,8 @@ IScsiReceiveLoginRsp (
EFI_STATUS Status;
NET_BUF *Pdu;
+ Pdu = NULL;
+
//
// Receive the iSCSI login response.
//
diff --git a/MdeModulePkg/Universal/SetupBrowserDxe/Expression.c b/MdeModulePkg/Universal/SetupBrowserDxe/Expression.c
index 1077b06..3b0172d 100644
--- a/MdeModulePkg/Universal/SetupBrowserDxe/Expression.c
+++ b/MdeModulePkg/Universal/SetupBrowserDxe/Expression.c
@@ -2372,6 +2372,8 @@ EvaluateExpression (
EFI_HII_VALUE QuestionVal;
EFI_DEVICE_PATH_PROTOCOL *DevicePath;
+ StrPtr = NULL;
+
//
// Save current stack offset.
//
diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/Reclaim.c b/MdeModulePkg/Universal/Variable/RuntimeDxe/Reclaim.c
index 1732a0c..44c56e2 100644
--- a/MdeModulePkg/Universal/Variable/RuntimeDxe/Reclaim.c
+++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/Reclaim.c
@@ -3,7 +3,7 @@
Handles non-volatile variable store garbage collection, using FTW
(Fault Tolerant Write) protocol.
-Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -47,6 +47,7 @@ GetLbaAndOffsetByAddress (
EFI_FV_BLOCK_MAP_ENTRY *FvbMapEntry;
UINT32 LbaIndex;
+ Fvb = NULL;
*Lba = (EFI_LBA) (-1);
*Offset = 0;
diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c b/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c
index 7bd9ffb..9101da3 100644
--- a/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c
+++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c
@@ -3344,6 +3344,9 @@ GetFvbInfoByAddress (
EFI_FIRMWARE_VOLUME_HEADER *FwVolHeader;
EFI_FVB_ATTRIBUTES_2 Attributes;
+ Fvb = NULL;
+ HandleBuffer = NULL;
+
//
// Get all FVB handles.
//
diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.c b/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.c
index e7b1014..7ca3326 100644
--- a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.c
+++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.c
@@ -4,7 +4,7 @@
and volatile storage space and install variable architecture protocol
based on SMM variable module.
-Copyright (c) 2010 - 2013, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2010 - 2014, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -195,6 +195,7 @@ VariableLockRequestToLock (
}
VariableNameSize = StrSize (VariableName);
+ VariableToLock = NULL;
//
// If VariableName exceeds SMM payload limit. Return failure
@@ -272,6 +273,7 @@ RuntimeServiceGetVariable (
TempDataSize = *DataSize;
VariableNameSize = StrSize (VariableName);
+ SmmVariableHeader = NULL;
//
// If VariableName exceeds SMM payload limit. Return failure
@@ -374,6 +376,7 @@ RuntimeServiceGetNextVariableName (
OutVariableNameSize = *VariableNameSize;
InVariableNameSize = StrSize (VariableName);
+ SmmGetNextVariableName = NULL;
//
// If input string exceeds SMM payload limit. Return failure
@@ -491,6 +494,7 @@ RuntimeServiceSetVariable (
}
VariableNameSize = StrSize (VariableName);
+ SmmVariableHeader = NULL;
//
// If VariableName or DataSize exceeds SMM payload limit. Return failure
@@ -561,6 +565,8 @@ RuntimeServiceQueryVariableInfo (
UINTN PayloadSize;
SMM_VARIABLE_COMMUNICATE_QUERY_VARIABLE_INFO *SmmQueryVariableInfo;
+ SmmQueryVariableInfo = NULL;
+
if(MaximumVariableStorageSize == NULL || RemainingVariableStorageSize == NULL || MaximumVariableSize == NULL || Attributes == 0) {
return EFI_INVALID_PARAMETER;
}