]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/C/GenCrc32/GenCrc32.c
Sync basetools' source and binary files with r1707 of the basetools project.
[mirror_edk2.git] / BaseTools / Source / C / GenCrc32 / GenCrc32.c
index 63900b64611489a08a2cad74031df653f71163a0..a94f9202fef831b846a9a148e5b3afd6a081eb3d 100644 (file)
@@ -22,6 +22,7 @@ Abstract:
 #include <stdlib.h>\r
 #include <string.h>\r
 \r
+#include "ParseInf.h"\r
 #include "EfiUtilityMsgs.h"\r
 #include "CommonLib.h"\r
 #include "Crc32.h"\r
@@ -104,7 +105,7 @@ Returns:
 \r
 int\r
 main (\r
-  INT32 argc,\r
+  int   argc,\r
   CHAR8 *argv[]\r
   )\r
 /*++\r
@@ -222,7 +223,7 @@ Returns:
         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
@@ -294,7 +295,7 @@ Returns:
   \r
   fread (FileBuffer, 1, FileSize, InFile);\r
   fclose (InFile);\r
-  VerboseMsg ("the size of the input file is %d bytes", FileSize);\r
+  VerboseMsg ("the size of the input file is %u bytes", (unsigned) FileSize);\r
   \r
   //\r
   // Open output file\r
@@ -318,9 +319,9 @@ Returns:
     // Done, write output file.\r
     //\r
     fwrite (&Crc32Value, 1, sizeof (Crc32Value), OutFile);\r
-    VerboseMsg ("The calculated CRC32 value is 0x%08x", Crc32Value);\r
+    VerboseMsg ("The calculated CRC32 value is 0x%08x", (unsigned) Crc32Value);\r
     fwrite (FileBuffer, 1, FileSize, OutFile);\r
-    VerboseMsg ("the size of the encoded file is %d bytes", FileSize + sizeof (UINT32));\r
+    VerboseMsg ("the size of the encoded file is %u bytes", (unsigned) FileSize + sizeof (UINT32));\r
   } else {\r
     //\r
     // Verify Crc32 Value\r
@@ -330,7 +331,7 @@ Returns:
       Error (NULL, 0, 3000, "Invalid", "Calculate CRC32 value failed!");\r
       goto Finish;\r
     }\r
-    VerboseMsg ("The calculated CRC32 value is 0x%08x and File Crc32 value is 0x%08x", Crc32Value, *(UINT32 *)FileBuffer);\r
+    VerboseMsg ("The calculated CRC32 value is 0x%08x and File Crc32 value is 0x%08x", (unsigned) Crc32Value, (unsigned) (*(UINT32 *)FileBuffer));\r
     if (Crc32Value != *(UINT32 *)FileBuffer) {\r
       Error (NULL, 0, 3000, "Invalid", "CRC32 value of input file is not correct!");\r
       Status = STATUS_ERROR;\r
@@ -340,7 +341,7 @@ Returns:
     // Done, write output file.\r
     //\r
     fwrite (FileBuffer + sizeof (UINT32), 1, FileSize - sizeof (UINT32), OutFile);\r
-    VerboseMsg ("the size of the decoded file is %d bytes", FileSize - sizeof (UINT32));\r
+    VerboseMsg ("the size of the decoded file is %u bytes", (unsigned) FileSize - sizeof (UINT32));\r
   }\r
 \r
 Finish:\r