summaryrefslogtreecommitdiff
path: root/BaseTools/Source/C/GenVtf/GenVtf.c
diff options
context:
space:
mode:
authorlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>2011-10-29 06:59:30 +0000
committerlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>2011-10-29 06:59:30 +0000
commit0d2711a69397d2971079121df4326d84736c181e (patch)
tree0d3c93b9db1df5a30a0d15ec9d70c75768c1f67c /BaseTools/Source/C/GenVtf/GenVtf.c
parent421fb3b504cfe18033c49a40fcd46bab45a0fb50 (diff)
downloadedk2-platforms-0d2711a69397d2971079121df4326d84736c181e.tar.xz
Sync BaseTools Trunk (version r2387) to EDKII main trunk.
Signed-off-by: lgao4 Reviewed-by: gikidy git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12602 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'BaseTools/Source/C/GenVtf/GenVtf.c')
-rw-r--r--BaseTools/Source/C/GenVtf/GenVtf.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/BaseTools/Source/C/GenVtf/GenVtf.c b/BaseTools/Source/C/GenVtf/GenVtf.c
index e56544e544..eaf2f56fed 100644
--- a/BaseTools/Source/C/GenVtf/GenVtf.c
+++ b/BaseTools/Source/C/GenVtf/GenVtf.c
@@ -1,6 +1,6 @@
/**
-Copyright (c) 1999 - 2010, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 1999 - 2011, 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
@@ -1141,7 +1141,6 @@ Returns:
EFI_STATUS Status;
UINT64 CompStartAddress;
UINT64 FileSize;
- UINT64 NumByteRead;
UINT64 NumAdjustByte;
UINT8 *Buffer;
FILE *Fp;
@@ -1189,7 +1188,7 @@ Returns:
//
// Read first 64 bytes of PAL header and use it to find version info
//
- NumByteRead = fread (Buffer, sizeof (UINT8), SIZE_OF_PAL_HEADER, Fp);
+ fread (Buffer, sizeof (UINT8), SIZE_OF_PAL_HEADER, Fp);
//
// PAL header contains the version info. Currently, we will use the header
@@ -1200,7 +1199,7 @@ Returns:
}
}
- NumByteRead = fread (Buffer, sizeof (UINT8), (UINTN) FileSize, Fp);
+ fread (Buffer, sizeof (UINT8), (UINTN) FileSize, Fp);
fclose (Fp);
//
@@ -1329,7 +1328,6 @@ Returns:
UINT64 AbsAddress;
UINTN RelativeAddress;
UINT64 FileSize;
- UINT64 NumByteRead;
UINT8 *Buffer;
FILE *Fp;
FIT_TABLE *PalFitPtr;
@@ -1367,7 +1365,7 @@ Returns:
//
// Read, Get version Info and discard the PAL header.
//
- NumByteRead = fread (Buffer, sizeof (UINT8), SIZE_OF_PAL_HEADER, Fp);
+ fread (Buffer, sizeof (UINT8), SIZE_OF_PAL_HEADER, Fp);
//
// Extract the version info from header of PAL_A. Once done, discrad this buffer
@@ -1379,7 +1377,7 @@ Returns:
//
// Read PAL_A file in a buffer
//
- NumByteRead = fread (Buffer, sizeof (UINT8), (UINTN) FileSize, Fp);
+ fread (Buffer, sizeof (UINT8), (UINTN) FileSize, Fp);
fclose (Fp);
PalStartAddress = Fv1EndAddress - (SIZE_TO_OFFSET_PAL_A_END + FileSize);
@@ -1759,7 +1757,6 @@ Returns:
UINT8 *Buffer;
UINT8 *LocalVtfBuffer;
UINTN FileSize;
- UINTN NumByteRead;
FILE *Fp;
if (!strcmp (FileName, "")) {
@@ -1784,7 +1781,7 @@ Returns:
return EFI_OUT_OF_RESOURCES;
}
- NumByteRead = fread (Buffer, sizeof (UINT8), FileSize, Fp);
+ fread (Buffer, sizeof (UINT8), FileSize, Fp);
LocalVtfBuffer = (UINT8 *) Vtf1EndBuffer - SIZE_IA32_RESET_VECT;
memcpy (LocalVtfBuffer, Buffer, FileSize);
@@ -2121,7 +2118,6 @@ Returns:
FILE *Fp;
UINT64 *StartAddressPtr;
UINTN FirstFwVSize;
- UINTN NumByte;
StartAddressPtr = malloc (sizeof (UINT64));
if (StartAddressPtr == NULL) {
@@ -2141,7 +2137,7 @@ Returns:
FirstFwVSize = _filelength (fileno (Fp));
fseek (Fp, (long) (FirstFwVSize - (UINTN) (SIZE_IA32_RESET_VECT + SIZE_SALE_ENTRY_POINT)), SEEK_SET);
- NumByte = fwrite ((VOID *) StartAddressPtr, sizeof (UINT64), 1, Fp);
+ fwrite ((VOID *) StartAddressPtr, sizeof (UINT64), 1, Fp);
if (Fp) {
fclose (Fp);