summaryrefslogtreecommitdiff
path: root/EdkCompatibilityPkg/Foundation/Library/RuntimeDxe
diff options
context:
space:
mode:
authorlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>2010-06-12 03:14:26 +0000
committerlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>2010-06-12 03:14:26 +0000
commit0ccabf7bab741234721a8ee78113ef191c0ce8d5 (patch)
tree77ee8361991a9ebe4eb0ef10ad2452ad573c2477 /EdkCompatibilityPkg/Foundation/Library/RuntimeDxe
parentcda8ba5ed7db9b6a4c963734915eae3f1d31b613 (diff)
downloadedk2-platforms-0ccabf7bab741234721a8ee78113ef191c0ce8d5.tar.xz
Initialize the local variable before refer to them.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10577 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'EdkCompatibilityPkg/Foundation/Library/RuntimeDxe')
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/RuntimeDxe/EfiRuntimeLib/Io.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/EdkCompatibilityPkg/Foundation/Library/RuntimeDxe/EfiRuntimeLib/Io.c b/EdkCompatibilityPkg/Foundation/Library/RuntimeDxe/EfiRuntimeLib/Io.c
index f73323cf5f..2a52906fc1 100644
--- a/EdkCompatibilityPkg/Foundation/Library/RuntimeDxe/EfiRuntimeLib/Io.c
+++ b/EdkCompatibilityPkg/Foundation/Library/RuntimeDxe/EfiRuntimeLib/Io.c
@@ -1,6 +1,6 @@
/*++
-Copyright (c) 2004, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2004 - 2010, 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
@@ -42,6 +42,7 @@ Returns:
{
UINT8 Buffer;
+ Buffer = 0;
EfiIoRead (EfiCpuIoWidthUint8, Address, 1, &Buffer);
return Buffer;
}
@@ -65,6 +66,7 @@ Returns:
{
UINT16 Buffer;
+ Buffer = 0;
EfiIoRead (EfiCpuIoWidthUint16, Address, 1, &Buffer);
return Buffer;
}
@@ -88,6 +90,7 @@ Returns:
{
UINT32 Buffer;
+ Buffer = 0;
EfiIoRead (EfiCpuIoWidthUint32, Address, 1, &Buffer);
return Buffer;
}
@@ -177,6 +180,7 @@ Returns:
{
UINT8 Buffer;
+ Buffer = 0;
EfiMemRead (EfiCpuIoWidthUint8, Address, 1, &Buffer);
return Buffer;
}
@@ -200,6 +204,7 @@ Returns:
{
UINT16 Buffer;
+ Buffer = 0;
EfiMemRead (EfiCpuIoWidthUint16, Address, 1, &Buffer);
return Buffer;
}
@@ -223,6 +228,7 @@ Returns:
{
UINT32 Buffer;
+ Buffer = 0;
EfiMemRead (EfiCpuIoWidthUint32, Address, 1, &Buffer);
return Buffer;
}
@@ -246,6 +252,7 @@ Returns:
{
UINT64 Buffer;
+ Buffer = 0;
EfiMemRead (EfiCpuIoWidthUint64, Address, 1, &Buffer);
return Buffer;
}