fwts: build failure on fadt tests with gcc 4.6 (trusty)

Bug #1549429 reported by Colin Ian King on 2016-02-24
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Firmware Test Suite
Colin Ian King

Bug Description

const fwts_acpi_gas null_gas = { 0 } causes a build failure with older compilers, such as gcc 4.6 (on Trusty):

acpi/fadt/fadt.c: In function 'acpi_table_check_fadt_reduced_hardware':
acpi/fadt/fadt.c:447:2: error: missing initializer [-Werror=missing-field-initializers]
acpi/fadt/fadt.c:447:2: error: (near initialization for 'null_gas.register_bit_width') [-Werror=missing-field-initializers]

make null_gas a static const - this will then be initialized as all zeros just once at run time and it's compatible with older versions of gcc too. Note this is a read-only struct, so this is fine to init like this

Colin Ian King (colin-king) wrote :
Changed in fwts:
status: New → In Progress
importance: Undecided → High
assignee: nobody → Colin Ian King (colin-king)
importance: High → Critical
Changed in fwts:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers