Re: [Qemu-devel] [PATCH] block/nvme: Remove QEMU_PACKED from naturally aligned NVMeRegs struct

2019-02-25 Thread Thomas Huth
On 25/02/2019 15.30, Peter Maydell wrote: > On Mon, 25 Feb 2019 at 14:09, Kevin Wolf wrote: >> Though I'm not sure why a compiler should warn if packed and non-packed >> result in the exact same layout anyway... > > Packed implies "and any time you see a pointer to this struct > it might not be a

Re: [Qemu-devel] [PATCH] block/nvme: Remove QEMU_PACKED from naturally aligned NVMeRegs struct

2019-02-25 Thread Peter Maydell
On Mon, 25 Feb 2019 at 14:09, Kevin Wolf wrote: > Though I'm not sure why a compiler should warn if packed and non-packed > result in the exact same layout anyway... Packed implies "and any time you see a pointer to this struct it might not be aligned". Non-packed implies "you can assume that the

Re: [Qemu-devel] [PATCH] block/nvme: Remove QEMU_PACKED from naturally aligned NVMeRegs struct

2019-02-25 Thread Kevin Wolf
Am 25.02.2019 um 12:59 hat Thomas Huth geschrieben: > The QEMU_PACKED is causing a compiler warning/error with GCC 9: > > CC block/nvme.o > block/nvme.c: In function ‘nvme_create_queue_pair’: > block/nvme.c:209:22: error: taking address of packed member of > ‘struct ’ may result in an unal

Re: [Qemu-devel] [PATCH] block/nvme: Remove QEMU_PACKED from naturally aligned NVMeRegs struct

2019-02-25 Thread Peter Maydell
On Mon, 25 Feb 2019 at 11:59, Thomas Huth wrote: > > The QEMU_PACKED is causing a compiler warning/error with GCC 9: > > CC block/nvme.o > block/nvme.c: In function ‘nvme_create_queue_pair’: > block/nvme.c:209:22: error: taking address of packed member of > ‘struct ’ may result in an unali

[Qemu-devel] [PATCH] block/nvme: Remove QEMU_PACKED from naturally aligned NVMeRegs struct

2019-02-25 Thread Thomas Huth
The QEMU_PACKED is causing a compiler warning/error with GCC 9: CC block/nvme.o block/nvme.c: In function ‘nvme_create_queue_pair’: block/nvme.c:209:22: error: taking address of packed member of ‘struct ’ may result in an unaligned pointer value [-Werror=address-of-packed-member] 209 |