[coreboot] New patch to review for coreboot: d45a87a Initializer of a static member in union.

Zheng Bao (zheng.bao@amd.com) gerrit at coreboot.org
Tue May 29 07:31:36 CEST 2012


Zheng Bao (zheng.bao at amd.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/1056

-gerrit

commit d45a87a4461dc78c19b9c7ab89968abf911e91a7
Author: zbao <fishbaozi at gmail.com>
Date:   Tue May 29 14:59:38 2012 +0800

    Initializer of a static member in union.
    
    It is just me or does anybody have the same build error without
    this patch?
    ------
    src/arch/x86/boot/acpigen.c: In function 'acpigen_write_empty_PTC':
    src/arch/x86/boot/acpigen.c:347:3: error: unknown field 'resv'
    specified in initializer
    src/arch/x86/boot/acpigen.c:347:3: warning: missing braces around
     initializer
    src/arch/x86/boot/acpigen.c:347:3:warning: (near initialization
     for 'addr.<anonymous>')
    -------
    
    Anyway, I believe at least this will cause warnings.
    "resv" is a member of a union, not of acpi_addr_t. So it should be
    wrapped by a brace in the initializer.
    
    Change-Id: I72624386816c987d5bb2d3a3a64c7c58eb9af389
    Signed-off-by: Zheng Bao <zheng.bao at amd.com>
    Signed-off-by: zbao <fishbaozi at gmail.com>
---
 src/arch/x86/boot/acpigen.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/src/arch/x86/boot/acpigen.c b/src/arch/x86/boot/acpigen.c
index e7a297d..71aa10c 100644
--- a/src/arch/x86/boot/acpigen.c
+++ b/src/arch/x86/boot/acpigen.c
@@ -344,7 +344,9 @@ int acpigen_write_empty_PTC(void)
 		.space_id   = ACPI_ADDRESS_SPACE_FIXED,
 		.bit_width  = 0,
 		.bit_offset = 0,
-		.resv       = 0,
+		{
+			.resv       = 0
+		},
 		.addrl      = 0,
 		.addrh      = 0,
 	};




More information about the coreboot mailing list