diff options
author | Feng, YunhuaX </o=Intel/ou=Exchange Administrative Group (FYDIBOHF23SPDLT)/cn=Recipients/cn=Feng, YunhuaX4e1> | 2018-02-02 10:34:24 +0800 |
---|---|---|
committer | Yonghong Zhu <yonghong.zhu@intel.com> | 2018-02-02 11:35:04 +0800 |
commit | 693877f8e593e51f38e67108c4db98e56f68e8d8 (patch) | |
tree | bd295f9e614767baa6cbfc761bc1e8b44703a3ed /BaseTools/Source/C/Common | |
parent | a6a0a59756173148099d66638fcb4b3bca52434b (diff) | |
download | edk2-693877f8e593e51f38e67108c4db98e56f68e8d8.zip edk2-693877f8e593e51f38e67108c4db98e56f68e8d8.tar.gz edk2-693877f8e593e51f38e67108c4db98e56f68e8d8.tar.bz2 |
BaseTools: Fix make PcdValueCommon.c failure on GCC
error message:
PcdValueCommon.c: In function '__PcdGetPtr':
PcdValueCommon.c:315:11: error: variable 'Byte'
set but not used [-Werror=unused-but-set-variable]
UINT8 Byte;
^
cc1: all warnings being treated as errors
Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Yunhua Feng <yunhuax.feng@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
Diffstat (limited to 'BaseTools/Source/C/Common')
-rw-r--r-- | BaseTools/Source/C/Common/PcdValueCommon.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/BaseTools/Source/C/Common/PcdValueCommon.c b/BaseTools/Source/C/Common/PcdValueCommon.c index 210f87b..fa12869 100644 --- a/BaseTools/Source/C/Common/PcdValueCommon.c +++ b/BaseTools/Source/C/Common/PcdValueCommon.c @@ -312,7 +312,6 @@ Returns: CHAR8 *Value;
UINT8 *Buffer;
CHAR8 *End;
- UINT8 Byte;
Index = LookupPcdIndex (SkuName, DefaultValueName, TokenSpaceGuidName, TokenName);
if (Index < 0) {
@@ -330,7 +329,7 @@ Returns: break;
case PcdDataTypePointer:
Value = &PcdList[Index].Value[1];
- for (*Size = 0, Byte = (UINT8) strtoul(Value, &End, 16); Value != End; Byte = (UINT8) strtoul(Value, &End, 16), *Size = *Size + 1) {
+ for (*Size = 0, strtoul(Value, &End, 16); Value != End; strtoul(Value, &End, 16), *Size = *Size + 1) {
Value = End + 1;
}
Buffer = malloc(*Size + 1);
|