]> git.proxmox.com Git - mirror_edk2.git/commit - UefiCpuPkg/Application/Cpuid/Cpuid.c
UefiCpuPkg/Cpuid: Fix GCC build error
authorHao Wu <hao.a.wu@intel.com>
Fri, 26 Feb 2016 08:43:02 +0000 (16:43 +0800)
committerHao Wu <hao.a.wu@intel.com>
Sat, 27 Feb 2016 08:10:58 +0000 (16:10 +0800)
commitd2ba6f41e2f8cbc8dffee8bddaebbbd6f3a3b9ab
tree98ec925db1d3340ae321017b5ab85513611ee48e
parentfb9dd8322532cd71d897b3b5690a3d2268bb1603
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>
UefiCpuPkg/Application/Cpuid/Cpuid.c