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>
(cherry picked from commit 693877f8e5
)
This commit is contained in:
committed by
Yonghong Zhu
parent
a55e485723
commit
c5c0f5e23c
@ -312,7 +312,6 @@ Returns:
|
|||||||
CHAR8 *Value;
|
CHAR8 *Value;
|
||||||
UINT8 *Buffer;
|
UINT8 *Buffer;
|
||||||
CHAR8 *End;
|
CHAR8 *End;
|
||||||
UINT8 Byte;
|
|
||||||
|
|
||||||
Index = LookupPcdIndex (SkuName, DefaultValueName, TokenSpaceGuidName, TokenName);
|
Index = LookupPcdIndex (SkuName, DefaultValueName, TokenSpaceGuidName, TokenName);
|
||||||
if (Index < 0) {
|
if (Index < 0) {
|
||||||
@ -330,7 +329,7 @@ Returns:
|
|||||||
break;
|
break;
|
||||||
case PcdDataTypePointer:
|
case PcdDataTypePointer:
|
||||||
Value = &PcdList[Index].Value[1];
|
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;
|
Value = End + 1;
|
||||||
}
|
}
|
||||||
Buffer = malloc(*Size + 1);
|
Buffer = malloc(*Size + 1);
|
||||||
|
Reference in New Issue
Block a user