Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
linux-gen: pktio: avoid possibility of out of bounds warnings in lso_…
…update_custom() odp_lso_profile_create() ensures that size is one of the allowed values. But the compiler doesn't know that, and it may generate out of bounds warnings in some cases. For example, in odp-dpdk, where odp_packet_copy_to_mem() calls rte_memcpy(), this results in: /usr/lib/gcc/x86_64-redhat-linux/13/include/emmintrin.h:742:8: warning: array subscript ‘__m128i_u[0]’ is partly outside array bounds of ‘void[8]’ [-Warray-bounds=] Set the value of size to 1 if it's not one of the allowed values. Signed-off-by: Jere Leppänen <[email protected]> Reviewed-by: Petri Savolainen <[email protected]>
- Loading branch information