Re: [Qemu-devel] [PATCH] usb-mtp: Fix build with gcc 9

2019-03-01 Thread Bandan Das
Greg Kurz writes: ... >> >> I think there's an underlying problem with this code which we >> should deal with differently. The 'dataset' local in this >> file is (I think) pointing at on-the-wire information from >> the USB device, but we're treating it as an array of >> host-order uint16_t value

Re: [Qemu-devel] [PATCH] usb-mtp: Fix build with gcc 9

2019-03-01 Thread Greg Kurz
On Fri, 1 Mar 2019 15:15:43 + Peter Maydell wrote: > On Fri, 1 Mar 2019 at 14:59, Greg Kurz wrote: > > > > On Thu, 28 Feb 2019 18:28:23 + > > Peter Maydell wrote: > > > > > On Thu, 28 Feb 2019 at 17:57, Greg Kurz wrote: > > > > +/* > > > > + * MTP Specification 3.2.3 String

Re: [Qemu-devel] [PATCH] usb-mtp: Fix build with gcc 9

2019-03-01 Thread Peter Maydell
On Fri, 1 Mar 2019 at 14:59, Greg Kurz wrote: > > On Thu, 28 Feb 2019 18:28:23 + > Peter Maydell wrote: > > > On Thu, 28 Feb 2019 at 17:57, Greg Kurz wrote: > > > +/* > > > + * MTP Specification 3.2.3 Strings > > > + * Strings in PTP (and thus MTP) consist of standard 2-byte Unic

Re: [Qemu-devel] [PATCH] usb-mtp: Fix build with gcc 9

2019-03-01 Thread Greg Kurz
On Thu, 28 Feb 2019 18:28:23 + Peter Maydell wrote: > On Thu, 28 Feb 2019 at 17:57, Greg Kurz wrote: > > > > Build fails with gcc 9: > > > > CC hw/usb/dev-mtp.o > > hw/usb/dev-mtp.c: In function ‘usb_mtp_write_metadata’: > > hw/usb/dev-mtp.c:1754:36: error: taking address of packed me

Re: [Qemu-devel] [PATCH] usb-mtp: Fix build with gcc 9

2019-02-28 Thread Peter Maydell
On Thu, 28 Feb 2019 at 17:57, Greg Kurz wrote: > > Build fails with gcc 9: > > CC hw/usb/dev-mtp.o > hw/usb/dev-mtp.c: In function ‘usb_mtp_write_metadata’: > hw/usb/dev-mtp.c:1754:36: error: taking address of packed member of ‘struct > ’ may result in an unaligned pointer value > [-Werro

[Qemu-devel] [PATCH] usb-mtp: Fix build with gcc 9

2019-02-28 Thread Greg Kurz
Build fails with gcc 9: CC hw/usb/dev-mtp.o hw/usb/dev-mtp.c: In function ‘usb_mtp_write_metadata’: hw/usb/dev-mtp.c:1754:36: error: taking address of packed member of ‘struct ’ may result in an unaligned pointer value [-Werror=address-of-packed-member] 1754 |