Re: [RFC v2 10/10] libvduse: Fix assignment in vring_set_avail_event

2022-12-21 Thread Marcel Holtmann
Hi Yongji, >> CC libvduse.o >> libvduse.c: In function ‘vring_set_avail_event’: >> libvduse.c:603:7: error: dereferencing type-punned pointer will break >> strict-aliasing rules [-Werror=strict-aliasin] >> 603 | *((uint16_t *)&vq->vring.used->ring[vq->vring.num]) = >> htole16(val); >

Re: [RFC v2 10/10] libvduse: Fix assignment in vring_set_avail_event

2022-12-21 Thread Yongji Xie
On Wed, Dec 21, 2022 at 3:27 AM Marcel Holtmann wrote: > > CC libvduse.o > libvduse.c: In function ‘vring_set_avail_event’: > libvduse.c:603:7: error: dereferencing type-punned pointer will break > strict-aliasing rules [-Werror=strict-aliasin] > 603 | *((uint16_t *)&vq->vring.used-

[RFC v2 10/10] libvduse: Fix assignment in vring_set_avail_event

2022-12-20 Thread Marcel Holtmann
CC libvduse.o libvduse.c: In function ‘vring_set_avail_event’: libvduse.c:603:7: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasin] 603 | *((uint16_t *)&vq->vring.used->ring[vq->vring.num]) = htole16(val); | ~^~~~