--- edk2/BaseTools/Source/C/EfiLdrImage/EfiLdrImage.c | 4 +- edk2/BaseTools/Source/C/GenFv/GenFvInternalLib.c | 8 +++--- edk2/BaseTools/Source/C/GenFw/Elf32Convert.c | 16 +++++++------- edk2/BaseTools/Source/C/GenFw/Elf64Convert.c | 22 ++++++++++---------- edk2/BaseTools/Source/C/GenSec/GenSec.c | 4 +- edk2/BaseTools/Source/C/GenVtf/GenVtf.c | 20 +++++++++--------- .../Source/C/GnuGenBootSector/GnuGenBootSector.c | 4 +- edk2/BaseTools/Source/C/Split/Split.c | 4 +- 8 files changed, 41 insertions(+), 41 deletions(-)
diff --git a/edk2/BaseTools/Source/C/EfiLdrImage/EfiLdrImage.c b/edk2/BaseTools/Source/C/EfiLdrImage/EfiLdrImage.c index a92f76d..3bfc63b 100644 --- a/edk2/BaseTools/Source/C/EfiLdrImage/EfiLdrImage.c +++ b/edk2/BaseTools/Source/C/EfiLdrImage/EfiLdrImage.c @@ -181,7 +181,7 @@ Returns: CHAR8* OutputFileName = NULL; CHAR8* InputFileNames[MAX_PE_IMAGES + 1]; UINT8 InputFileCount = 0; - BOOLEAN QuietFlag = FALSE; + //BOOLEAN QuietFlag = FALSE; UINT64 DebugLevel = 0; UINT64 VerboseLevel = 0; EFI_STATUS Status = EFI_SUCCESS; @@ -220,7 +220,7 @@ Returns: }
if ((stricmp (argv[0], "-q") == 0) || (stricmp (argv[0], "--quiet") == 0)) { - QuietFlag = TRUE; + //QuietFlag = TRUE; argc --; argv ++; continue; diff --git a/edk2/BaseTools/Source/C/GenFv/GenFvInternalLib.c b/edk2/BaseTools/Source/C/GenFv/GenFvInternalLib.c index 189dc43..637f7ad 100644 --- a/edk2/BaseTools/Source/C/GenFv/GenFvInternalLib.c +++ b/edk2/BaseTools/Source/C/GenFv/GenFvInternalLib.c @@ -2792,7 +2792,7 @@ Returns: PE_COFF_LOADER_IMAGE_CONTEXT OrigImageContext; EFI_PHYSICAL_ADDRESS XipBase; EFI_PHYSICAL_ADDRESS NewPe32BaseAddress; - EFI_PHYSICAL_ADDRESS *BaseToUpdate; + //EFI_PHYSICAL_ADDRESS *BaseToUpdate; UINTN Index; EFI_FILE_SECTION_POINTER CurrentPe32Section; EFI_FFS_FILE_STATE SavedState; @@ -2809,7 +2809,7 @@ Returns:
Index = 0; MemoryImagePointer = NULL; - BaseToUpdate = NULL; + //BaseToUpdate = NULL; TEImageHeader = NULL; ImgHdr = NULL; SectionHeader = NULL; @@ -2974,7 +2974,7 @@ Returns: }
NewPe32BaseAddress = XipBase + (UINTN) CurrentPe32Section.Pe32Section + sizeof (EFI_PE32_SECTION) - (UINTN)FfsFile; - BaseToUpdate = &XipBase; + //BaseToUpdate = &XipBase; break;
case EFI_FV_FILETYPE_DRIVER: @@ -2990,7 +2990,7 @@ Returns: return EFI_ABORTED; } NewPe32BaseAddress = XipBase + (UINTN) CurrentPe32Section.Pe32Section + sizeof (EFI_PE32_SECTION) - (UINTN)FfsFile; - BaseToUpdate = &XipBase; + //BaseToUpdate = &XipBase; break;
default: diff --git a/edk2/BaseTools/Source/C/GenFw/Elf32Convert.c b/edk2/BaseTools/Source/C/GenFw/Elf32Convert.c index 42ae35b..64f3c52 100644 --- a/edk2/BaseTools/Source/C/GenFw/Elf32Convert.c +++ b/edk2/BaseTools/Source/C/GenFw/Elf32Convert.c @@ -738,9 +738,9 @@ WriteRelocations32 ( UINT8 *Targ; Elf32_Phdr *DynamicSegment; Elf32_Phdr *TargetSegment; - Elf_Sym *Sym; - Elf_Shdr *SymtabShdr; - UINT8 *Symtab; + //Elf_Sym *Sym; + //Elf_Shdr *SymtabShdr; + //UINT8 *Symtab;
for (Index = 0, FoundRelocations = FALSE; Index < mEhdr->e_shnum; Index++) { @@ -750,15 +750,15 @@ WriteRelocations32 ( if (IsTextShdr(SecShdr) || IsDataShdr(SecShdr)) { UINT32 RelIdx;
- SymtabShdr = GetShdrByIndex (RelShdr->sh_link); - Symtab = (UINT8*)mEhdr + SymtabShdr->sh_offset; + //SymtabShdr = GetShdrByIndex (RelShdr->sh_link); + //Symtab = (UINT8*)mEhdr + SymtabShdr->sh_offset; FoundRelocations = TRUE; for (RelIdx = 0; RelIdx < RelShdr->sh_size; RelIdx += RelShdr->sh_entsize) { Elf_Rel *Rel = (Elf_Rel *)((UINT8*)mEhdr + RelShdr->sh_offset + RelIdx); - Elf_Shdr *SymShdr; + //Elf_Shdr *SymShdr;
- Sym = (Elf_Sym *)(Symtab + ELF_R_SYM(Rel->r_info) * SymtabShdr->sh_entsize); - SymShdr = GetShdrByIndex (Sym->st_shndx); + //Sym = (Elf_Sym *)(Symtab + ELF_R_SYM(Rel->r_info) * SymtabShdr->sh_entsize); + //SymShdr = GetShdrByIndex (Sym->st_shndx);
if (mEhdr->e_machine == EM_386) { switch (ELF_R_TYPE(Rel->r_info)) { diff --git a/edk2/BaseTools/Source/C/GenFw/Elf64Convert.c b/edk2/BaseTools/Source/C/GenFw/Elf64Convert.c index fbe6ff8..73243ae 100644 --- a/edk2/BaseTools/Source/C/GenFw/Elf64Convert.c +++ b/edk2/BaseTools/Source/C/GenFw/Elf64Convert.c @@ -637,28 +637,28 @@ WriteRelocations64 ( UINT32 Index; EFI_IMAGE_OPTIONAL_HEADER_UNION *NtHdr; EFI_IMAGE_DATA_DIRECTORY *Dir; - BOOLEAN FoundRelocations; - Elf_Sym *Sym; - Elf_Shdr *SymtabShdr; - UINT8 *Symtab; + //BOOLEAN FoundRelocations; + //Elf_Sym *Sym; + //Elf_Shdr *SymtabShdr; + //UINT8 *Symtab;
- for (Index = 0, FoundRelocations = FALSE; Index < mEhdr->e_shnum; Index++) { + for (Index = 0/*, FoundRelocations = FALSE */; Index < mEhdr->e_shnum; Index++) { Elf_Shdr *RelShdr = GetShdrByIndex(Index); if ((RelShdr->sh_type == SHT_REL) || (RelShdr->sh_type == SHT_RELA)) { Elf_Shdr *SecShdr = GetShdrByIndex (RelShdr->sh_info); if (IsTextShdr(SecShdr) || IsDataShdr(SecShdr)) { UINT64 RelIdx;
- SymtabShdr = GetShdrByIndex (RelShdr->sh_link); - Symtab = (UINT8*)mEhdr + SymtabShdr->sh_offset; - FoundRelocations = TRUE; + //SymtabShdr = GetShdrByIndex (RelShdr->sh_link); + //Symtab = (UINT8*)mEhdr + SymtabShdr->sh_offset; + //FoundRelocations = TRUE; for (RelIdx = 0; RelIdx < RelShdr->sh_size; RelIdx += RelShdr->sh_entsize) { Elf_Rela *Rel = (Elf_Rela *)((UINT8*)mEhdr + RelShdr->sh_offset + RelIdx); - Elf_Shdr *SymShdr; + //Elf_Shdr *SymShdr;
- Sym = (Elf_Sym *)(Symtab + ELF_R_SYM(Rel->r_info) * SymtabShdr->sh_entsize); - SymShdr = GetShdrByIndex (Sym->st_shndx); + //Sym = (Elf_Sym *)(Symtab + ELF_R_SYM(Rel->r_info) * SymtabShdr->sh_entsize); + //SymShdr = GetShdrByIndex (Sym->st_shndx);
if (mEhdr->e_machine == EM_X86_64) { switch (ELF_R_TYPE(Rel->r_info)) { diff --git a/edk2/BaseTools/Source/C/GenSec/GenSec.c b/edk2/BaseTools/Source/C/GenSec/GenSec.c index ed34ec4..3fd61d1 100644 --- a/edk2/BaseTools/Source/C/GenSec/GenSec.c +++ b/edk2/BaseTools/Source/C/GenSec/GenSec.c @@ -915,7 +915,7 @@ Returns: { UINT32 Index; UINT32 InputFileNum; - FILE *InFile; + //FILE *InFile; FILE *OutFile; CHAR8 **InputFileName; CHAR8 *OutputFileName; @@ -944,7 +944,7 @@ Returns: SectionName = NULL; CompressionName = NULL; StringBuffer = ""; - InFile = NULL; + //InFile = NULL; OutFile = NULL; VersionNumber = 0; InputFileNum = 0; diff --git a/edk2/BaseTools/Source/C/GenVtf/GenVtf.c b/edk2/BaseTools/Source/C/GenVtf/GenVtf.c index 035c268..10e7b93 100644 --- a/edk2/BaseTools/Source/C/GenVtf/GenVtf.c +++ b/edk2/BaseTools/Source/C/GenVtf/GenVtf.c @@ -1141,7 +1141,7 @@ Returns: EFI_STATUS Status; UINT64 CompStartAddress; UINT64 FileSize; - UINT64 NumByteRead; + //UINT64 NumByteRead; UINT64 NumAdjustByte; UINT8 *Buffer; FILE *Fp; @@ -1189,7 +1189,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); + /* NumByteRead = */fread (Buffer, sizeof (UINT8), SIZE_OF_PAL_HEADER, Fp);
// // PAL header contains the version info. Currently, we will use the header @@ -1200,7 +1200,7 @@ Returns: } }
- NumByteRead = fread (Buffer, sizeof (UINT8), (UINTN) FileSize, Fp); + /* NumByteRead = */fread (Buffer, sizeof (UINT8), (UINTN) FileSize, Fp); fclose (Fp);
// @@ -1329,7 +1329,7 @@ Returns: UINT64 AbsAddress; UINTN RelativeAddress; UINT64 FileSize; - UINT64 NumByteRead; + //UINT64 NumByteRead; UINT8 *Buffer; FILE *Fp; FIT_TABLE *PalFitPtr; @@ -1367,7 +1367,7 @@ Returns: // // Read, Get version Info and discard the PAL header. // - NumByteRead = fread (Buffer, sizeof (UINT8), SIZE_OF_PAL_HEADER, Fp); + /*NumByteRead = */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 +1379,7 @@ Returns: // // Read PAL_A file in a buffer // - NumByteRead = fread (Buffer, sizeof (UINT8), (UINTN) FileSize, Fp); + /*NumByteRead = */fread (Buffer, sizeof (UINT8), (UINTN) FileSize, Fp); fclose (Fp);
PalStartAddress = Fv1EndAddress - (SIZE_TO_OFFSET_PAL_A_END + FileSize); @@ -1759,7 +1759,7 @@ Returns: UINT8 *Buffer; UINT8 *LocalVtfBuffer; UINTN FileSize; - UINTN NumByteRead; + //UINTN NumByteRead; FILE *Fp;
if (!strcmp (FileName, "")) { @@ -1784,7 +1784,7 @@ Returns: return EFI_OUT_OF_RESOURCES; }
- NumByteRead = fread (Buffer, sizeof (UINT8), FileSize, Fp); + /* NumByteRead = */fread (Buffer, sizeof (UINT8), FileSize, Fp);
LocalVtfBuffer = (UINT8 *) Vtf1EndBuffer - SIZE_IA32_RESET_VECT; memcpy (LocalVtfBuffer, Buffer, FileSize); @@ -2121,7 +2121,7 @@ Returns: FILE *Fp; UINT64 *StartAddressPtr; UINTN FirstFwVSize; - UINTN NumByte; + //UINTN NumByte;
StartAddressPtr = malloc (sizeof (UINT64)); if (StartAddressPtr == NULL) { @@ -2141,7 +2141,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); + /* NumByte = */fwrite ((VOID *) StartAddressPtr, sizeof (UINT64), 1, Fp);
if (Fp) { fclose (Fp); diff --git a/edk2/BaseTools/Source/C/GnuGenBootSector/GnuGenBootSector.c b/edk2/BaseTools/Source/C/GnuGenBootSector/GnuGenBootSector.c index 267eaa3..559c447 100644 --- a/edk2/BaseTools/Source/C/GnuGenBootSector/GnuGenBootSector.c +++ b/edk2/BaseTools/Source/C/GnuGenBootSector/GnuGenBootSector.c @@ -305,7 +305,7 @@ main ( char *argv[] ) { - CHAR8 *AppName; + //CHAR8 *AppName; INTN Index; BOOLEAN ProcessMbr; ERROR_STATUS Status; @@ -319,7 +319,7 @@ main ( ZeroMem(&InputPathInfo, sizeof(PATH_INFO)); ZeroMem(&OutputPathInfo, sizeof(PATH_INFO));
- AppName = *argv; + //AppName = *argv; argv ++; argc --;
diff --git a/edk2/BaseTools/Source/C/Split/Split.c b/edk2/BaseTools/Source/C/Split/Split.c index 930a2ad..2645b4b 100644 --- a/edk2/BaseTools/Source/C/Split/Split.c +++ b/edk2/BaseTools/Source/C/Split/Split.c @@ -229,7 +229,7 @@ Returns: CHAR8 *CurrentDir = NULL; UINT64 Index; CHAR8 CharC; - BOOLEAN QuietFlag = TRUE; + //BOOLEAN QuietFlag = TRUE; UINT64 DebugLevel = 0; UINT64 VerboseLevel = 0;
@@ -307,7 +307,7 @@ Returns: }
if ((stricmp (argv[0], "-q") == 0) || (stricmp (argv[0], "--quiet") == 0)) { - QuietFlag = TRUE; + //QuietFlag = TRUE; argc --; argv ++; continue;