mirror of https://github.com/acidanthera/audk.git
UefiCpuPkg/Cpuid: Fix GCC build error
define PRINT_BIT_FIELD(Variable, FieldName) \ Print (L"%5a%42a: %x\n", #Variable, #FieldName, \ ##Variable.Bits.##FieldName); The above definition in UefiCpuPkg/Application/Cpuid/Cpuid.c will cause GCC build error. Fix it with: define PRINT_BIT_FIELD(Variable, FieldName) \ Print (L"%5a%42a: %x\n", #Variable, #FieldName, \ Variable.Bits.FieldName); The '.' has its origin meaning as a member operator in the define statement. Thus, the token-pasting operator '##' is not necessary here. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Michael Kinney <michael.d.kinney@intel.com>
This commit is contained in:
parent
fb9dd83225
commit
d2ba6f41e2
|
@ -21,7 +21,7 @@
|
|||
/// Macro used to display the value of a bit field in a register returned by CPUID.
|
||||
///
|
||||
#define PRINT_BIT_FIELD(Variable, FieldName) \
|
||||
Print (L"%5a%42a: %x\n", #Variable, #FieldName, ##Variable.Bits.##FieldName);
|
||||
Print (L"%5a%42a: %x\n", #Variable, #FieldName, Variable.Bits.FieldName);
|
||||
|
||||
///
|
||||
/// Macro used to display the value of a register returned by CPUID.
|
||||
|
|
Loading…
Reference in New Issue