Re: [Qemu-devel] [PATCH v2] hw/s390/ccw.c: Don't take address of packed members

2018-12-13 Thread Thomas Huth
On 2018-12-13 13:02, Peter Maydell wrote: > Taking the address of a field in a packed struct is a bad idea, because > it might not be actually aligned enough for that pointer type (and > thus cause a crash on dereference on some host architectures). Newer > versions of clang warn about this. > >

Re: [Qemu-devel] [PATCH v2] hw/s390/ccw.c: Don't take address of packed members

2018-12-13 Thread Cornelia Huck
On Thu, 13 Dec 2018 12:02:52 + Peter Maydell wrote: > Taking the address of a field in a packed struct is a bad idea, because > it might not be actually aligned enough for that pointer type (and > thus cause a crash on dereference on some host architectures). Newer > versions of clang warn

Re: [Qemu-devel] [PATCH v2] hw/s390/ccw.c: Don't take address of packed members

2018-12-13 Thread Farhan Ali
On 12/13/2018 07:02 AM, Peter Maydell wrote: Taking the address of a field in a packed struct is a bad idea, because it might not be actually aligned enough for that pointer type (and thus cause a crash on dereference on some host architectures). Newer versions of clang warn about this.

[Qemu-devel] [PATCH v2] hw/s390/ccw.c: Don't take address of packed members

2018-12-13 Thread Peter Maydell
Taking the address of a field in a packed struct is a bad idea, because it might not be actually aligned enough for that pointer type (and thus cause a crash on dereference on some host architectures). Newer versions of clang warn about this. Avoid the problem by using local copies of the PMCW