summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Universal
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/Universal
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/Universal')
-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
15 files changed, 52 insertions, 12 deletions
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;
}