Commit a6e4385d authored by Thomas Huth's avatar Thomas Huth Committed by Cornelia Huck
Browse files

pc-bios/s390-ccw: struct tpi_info must be declared as aligned(4)



I've run into a compilation error today with the current version of GCC 8:

In file included from s390-ccw.h:49,
                 from main.c:12:
cio.h:128:1: error: alignment 1 of 'struct tpi_info' is less than 4 [-Werror=packed-not-aligned]
 } __attribute__ ((packed));
 ^
cc1: all warnings being treated as errors

Since the struct tpi_info contains an element ("struct subchannel_id schid")
which is marked as aligned(4), we've got to mark the struct tpi_info as
aligned(4), too.

CC: qemu-stable@nongnu.org
Signed-off-by: default avatarThomas Huth <thuth@redhat.com>
Message-Id: <1525774672-11913-1-git-send-email-thuth@redhat.com>
Reviewed-by: default avatarCornelia Huck <cohuck@redhat.com>
Acked-by: default avatarChristian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: default avatarCornelia Huck <cohuck@redhat.com>
parent 6e9c893e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -125,7 +125,7 @@ struct tpi_info {
    __u32 reserved3  : 12;
    __u32 int_type   : 3;
    __u32 reserved4  : 12;
} __attribute__ ((packed));
} __attribute__ ((packed, aligned(4)));

/* channel command word (type 1) */
struct ccw1 {