diff options
author | Hao Wu <hao.a.wu@intel.com> | 2016-09-22 09:57:20 +0800 |
---|---|---|
committer | Hao Wu <hao.a.wu@intel.com> | 2016-11-08 16:36:51 +0800 |
commit | 851c97ce78393d5875eec984fbd870e8e85e5fd8 (patch) | |
tree | 7bbff10ffd7ab532f1eea9835890dc1a46f64139 | |
parent | ed9ff2688a6329b0eed8bc14d287e7a644975a6c (diff) | |
download | edk2-platforms-851c97ce78393d5875eec984fbd870e8e85e5fd8.tar.xz |
BaseTools/C/Common: Fix parameter format mismatch in scanf functions
According to MSDN https://msdn.microsoft.com/en-us/library/6ttkkkhh.aspx
Format specification '%x' for scanf expects type 'int *', modify the type
of the relating variable to 'int' to keep them matched.
Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
-rw-r--r-- | BaseTools/Source/C/Common/ParseInf.c | 10 | ||||
-rw-r--r-- | BaseTools/Source/C/Common/SimpleFileParsing.c | 6 |
2 files changed, 8 insertions, 8 deletions
diff --git a/BaseTools/Source/C/Common/ParseInf.c b/BaseTools/Source/C/Common/ParseInf.c index 0a204c865f..d7845366d4 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
@@ -391,10 +391,10 @@ Returns: --*/
{
INT32 Index;
- unsigned Data1;
- unsigned Data2;
- unsigned Data3;
- unsigned Data4[8];
+ int Data1;
+ int Data2;
+ int Data3;
+ int Data4[8];
if (AsciiGuidBuffer == NULL || GuidBuffer == NULL) {
return EFI_INVALID_PARAMETER;
diff --git a/BaseTools/Source/C/Common/SimpleFileParsing.c b/BaseTools/Source/C/Common/SimpleFileParsing.c index 877bb6fd51..868c6b794b 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
@@ -530,7 +530,7 @@ Returns: --*/
{
- unsigned Val;
+ int Val;
SkipWhiteSpace (&mGlobals.SourceFile);
if (EndOfFile (&mGlobals.SourceFile)) {
@@ -1276,7 +1276,7 @@ Returns: --*/
{
- unsigned Value32;
+ INT32 Value32;
UINT32 Index;
FILE_POSITION FPos;
CHAR8 TempString[20];
|