FileSize = ftell (InFile);\r
fseek (InFile, 0, SEEK_SET);\r
DebugMsg (NULL, 0, 9, "Input section files", \r
- "the input section name is %s and the size is %d bytes", InputFileName[Index], FileSize); \r
+ "the input section name is %s and the size is %u bytes", InputFileName[Index], (unsigned) FileSize); \r
\r
//\r
// Check this section is Te/Pe section, and Calculate the numbers of Te/Pe section.\r
SectHeader->Size[2] = (UINT8) ((Offset & 0xff0000) >> 16);\r
}\r
DebugMsg (NULL, 0, 9, "Pad raw section for section data alignment", \r
- "Pad Raw section size is %d", Offset);\r
+ "Pad Raw section size is %u", (unsigned) Offset);\r
\r
Size = Size + Offset;\r
}\r
\r
int\r
main (\r
- INT32 argc,\r
+ int argc,\r
CHAR8 *argv[]\r
)\r
/*++\r
goto Finish;\r
}\r
if (LogLevel > 9) {\r
- Error (NULL, 0, 1003, "Invalid option value", "Debug Level range is 0-9, current input level is %d", LogLevel);\r
+ Error (NULL, 0, 1003, "Invalid option value", "Debug Level range is 0-9, current input level is %d", (int) LogLevel);\r
goto Finish;\r
}\r
SetPrintLevel (LogLevel);\r
VerboseMsg ("Fv File type is %s", mFfsFileType [FfsFiletype]);\r
VerboseMsg ("Output file name is %s", OutputFileName);\r
VerboseMsg ("FFS File Guid is %08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X", \r
- FileGuid.Data1,\r
+ (unsigned) FileGuid.Data1,\r
FileGuid.Data2,\r
FileGuid.Data3,\r
FileGuid.Data4[0],\r
//\r
InputFileAlign[Index] = 1;\r
}\r
- VerboseMsg ("the %dth input section name is %s and section alignment is %d", Index, InputFileName[Index], InputFileAlign[Index]);\r
+ VerboseMsg ("the %dth input section name is %s and section alignment is %u", Index, InputFileName[Index], (unsigned) InputFileAlign[Index]);\r
}\r
\r
//\r
if ((FfsFiletype == EFI_FV_FILETYPE_SECURITY_CORE || \r
FfsFiletype == EFI_FV_FILETYPE_PEI_CORE ||\r
FfsFiletype == EFI_FV_FILETYPE_DXE_CORE) && (PeSectionNum != 1)) {\r
- Error (NULL, 0, 2000, "Invalid parameter", "Fv File type %s must have one and only one Pe or Te section, but %d Pe/Te section are input", mFfsFileType [FfsFiletype], PeSectionNum);\r
+ Error (NULL, 0, 2000, "Invalid parameter", "Fv File type %s must have one and only one Pe or Te section, but %u Pe/Te section are input", mFfsFileType [FfsFiletype], PeSectionNum);\r
goto Finish;\r
}\r
\r
//\r
// Update FFS Alignment based on the max alignment required by input section files \r
//\r
- VerboseMsg ("the max alignment of all input sections is %d", MaxAlignment); \r
+ VerboseMsg ("the max alignment of all input sections is %u", (unsigned) MaxAlignment); \r
for (Index = 0; Index < sizeof (mFfsValidAlign) / sizeof (UINT32) - 1; Index ++) {\r
if ((MaxAlignment > mFfsValidAlign [Index]) && (MaxAlignment <= mFfsValidAlign [Index + 1])) {\r
break;\r
if (FfsAlign < Index) {\r
FfsAlign = Index;\r
}\r
- VerboseMsg ("the alignment of the genreated FFS file is %d", mFfsValidAlign [FfsAlign + 1]); \r
- FfsFileHeader.Attributes = FfsAttrib | (FfsAlign << 3);\r
+ VerboseMsg ("the alignment of the generated FFS file is %u", (unsigned) mFfsValidAlign [FfsAlign + 1]); \r
+ FfsFileHeader.Attributes = (EFI_FFS_FILE_ATTRIBUTES) (FfsAttrib | (FfsAlign << 3));\r
\r
//\r
// Now FileSize includes the EFI_FFS_FILE_HEADER\r
//\r
FileSize += sizeof (EFI_FFS_FILE_HEADER);\r
- VerboseMsg ("the size of the genreated FFS file is %d bytes", FileSize);\r
+ VerboseMsg ("the size of the generated FFS file is %u bytes", (unsigned) FileSize);\r
FfsFileHeader.Size[0] = (UINT8) (FileSize & 0xFF);\r
FfsFileHeader.Size[1] = (UINT8) ((FileSize & 0xFF00) >> 8);\r
FfsFileHeader.Size[2] = (UINT8) ((FileSize & 0xFF0000) >> 16);\r