4414bb6701
GCC 12 raises the following warning:
In file included from ../lib/mempool/rte_mempool.h:46,
from ../lib/mbuf/rte_mbuf.h:38,
from ../lib/vhost/vhost_crypto.c:7:
../lib/vhost/vhost_crypto.c: In function ‘rte_vhost_crypto_fetch_requests’:
../lib/eal/x86/include/rte_memcpy.h:371:9: warning: array subscript 1 is
outside array bounds of ‘struct virtio_crypto_op_data_req[1]’
[-Warray-bounds]
371 | rte_mov32((uint8_t *)dst + 3 * 32, (const uint8_t *)src + 3 * 32);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../lib/vhost/vhost_crypto.c:1178:42: note: while referencing ‘req’
1178 | struct virtio_crypto_op_data_req req;
| ^~~
Split this function and separate the per descriptor copy.
This makes the code clearer, and the compiler happier.
Note: logs for errors have been moved to callers to avoid duplicates.
Fixes:
|
||
---|---|---|
.. | ||
fd_man.c | ||
fd_man.h | ||
iotlb.c | ||
iotlb.h | ||
meson.build | ||
rte_vdpa.h | ||
rte_vhost_async.h | ||
rte_vhost_crypto.h | ||
rte_vhost.h | ||
socket.c | ||
vdpa_driver.h | ||
vdpa.c | ||
version.map | ||
vhost_crypto.c | ||
vhost_user.c | ||
vhost_user.h | ||
vhost.c | ||
vhost.h | ||
virtio_crypto.h | ||
virtio_net.c |