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);
>
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-
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);
| ~^~~~