Cc: Liming Gao <liming....@intel.com>
Cc: Yonghong Zhu <yonghong....@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a...@intel.com>
---
 BaseTools/Source/C/Common/ParseInf.c          | 24 ++++++++++++------------
 BaseTools/Source/C/Common/SimpleFileParsing.c | 14 +++++++-------
 2 files changed, 19 insertions(+), 19 deletions(-)

diff --git a/BaseTools/Source/C/Common/ParseInf.c 
b/BaseTools/Source/C/Common/ParseInf.c
index 9e85a88..28ed1ca 100644
--- a/BaseTools/Source/C/Common/ParseInf.c
+++ b/BaseTools/Source/C/Common/ParseInf.c
@@ -1,7 +1,7 @@
 /** @file
 This contains some useful functions for parsing INF files.
 
-Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2004 - 2016, 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        
@@ -429,17 +429,17 @@ Returns:
   Index = sscanf (
             AsciiGuidBuffer,
             "%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x",
-            &Data1,
-            &Data2,
-            &Data3,
-            &Data4[0],
-            &Data4[1],
-            &Data4[2],
-            &Data4[3],
-            &Data4[4],
-            &Data4[5],
-            &Data4[6],
-            &Data4[7]
+            (INT32 *) &Data1,
+            (INT32 *) &Data2,
+            (INT32 *) &Data3,
+            (INT32 *) &Data4[0],
+            (INT32 *) &Data4[1],
+            (INT32 *) &Data4[2],
+            (INT32 *) &Data4[3],
+            (INT32 *) &Data4[4],
+            (INT32 *) &Data4[5],
+            (INT32 *) &Data4[6],
+            (INT32 *) &Data4[7]
             );
 
   //
diff --git a/BaseTools/Source/C/Common/SimpleFileParsing.c 
b/BaseTools/Source/C/Common/SimpleFileParsing.c
index 877bb6f..a99a0ea 100644
--- a/BaseTools/Source/C/Common/SimpleFileParsing.c
+++ b/BaseTools/Source/C/Common/SimpleFileParsing.c
@@ -1,7 +1,7 @@
 /** @file
 Generic but simple file parsing routines.
 
-Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2004 - 2016, 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        
@@ -547,7 +547,7 @@ Returns:
       }
 
       mGlobals.SourceFile.FileBufferPtr += 2;
-      sscanf (mGlobals.SourceFile.FileBufferPtr, "%x", &Val);
+      sscanf (mGlobals.SourceFile.FileBufferPtr, "%x", (INT32 *) &Val);
       *Value = (UINT32) Val;
       while (isxdigit ((int)mGlobals.SourceFile.FileBufferPtr[0])) {
         mGlobals.SourceFile.FileBufferPtr++;
@@ -1305,7 +1305,7 @@ Returns:
       goto Done;
     }
 
-    sscanf (TempString, "%x", &Value32);
+    sscanf (TempString, "%x", (INT32 *) &Value32);
     Value->Data1 = Value32;
     //
     // Next two UINT16 fields
@@ -1320,7 +1320,7 @@ Returns:
       goto Done;
     }
 
-    sscanf (TempString, "%x", &Value32);
+    sscanf (TempString, "%x", (INT32 *) &Value32);
     Value->Data2 = (UINT16) Value32;
 
     if (mGlobals.SourceFile.FileBufferPtr[0] != '-') {
@@ -1333,7 +1333,7 @@ Returns:
       goto Done;
     }
 
-    sscanf (TempString, "%x", &Value32);
+    sscanf (TempString, "%x", (INT32 *) &Value32);
     Value->Data3 = (UINT16) Value32;
     //
     // Parse the "AAAA" as two bytes
@@ -1348,7 +1348,7 @@ Returns:
       goto Done;
     }
 
-    sscanf (TempString, "%x", &Value32);
+    sscanf (TempString, "%x", (INT32 *) &Value32);
     Value->Data4[0] = (UINT8) (Value32 >> 8);
     Value->Data4[1] = (UINT8) Value32;
     if (mGlobals.SourceFile.FileBufferPtr[0] != '-') {
@@ -1393,7 +1393,7 @@ Returns:
       //
       TempString2[0]  = TempString[Index * 2];
       TempString2[1]  = TempString[Index * 2 + 1];
-      sscanf (TempString2, "%x", &Value32);
+      sscanf (TempString2, "%x", (INT32 *) &Value32);
       Value->Data4[Index + 2] = (UINT8) Value32;
     }
 
-- 
1.9.5.msysgit.0

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to