Skip to content

Commit

Permalink
hdata/i2c.c: fix building with gcc8
Browse files Browse the repository at this point in the history
hdata/test/../i2c.c:200:1: error: alignment 1 of ‘struct host_i2c_hdr’ is less than 4 [-Werror=packed-not-aligned]
 } __packed;
 ^

Fixes: #160
Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
  • Loading branch information
stewartsmith committed May 29, 2018
1 parent 44d0f86 commit 70d544d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hdata/i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ static bool is_zeros(const void *p, size_t size)
struct host_i2c_hdr {
const struct HDIF_array_hdr hdr;
__be32 version;
} __packed;
} __packed __align(0x4);

int parse_i2c_devs(const struct HDIF_common_hdr *hdr, int idata_index,
struct dt_node *xscom)
Expand Down

0 comments on commit 70d544d

Please sign in to comment.