+1
−1
Loading
This fixes incorrect warning from gcc when using --enable-asan w/o --enable-debug. Even though code explicitly references the "raw" byte array, the compiler thinks we are referencing pdu_type in the common_hdr which is only one byte. In file included from nvme_tcp.c:23: nvme_tcp.c: In function ‘nvme_tcp_qpair_write_pdu’: /test/spdk_internal/nvme_tcp.h:37:38: error: writing 1 byte into a region of size 0 [-Werror=stringop-overflow=] 37 | ((*((uint8_t *)(BUF)+1)) = (uint8_t)((uint32_t)(CRC32C) >> 8)), \ Fixes issue #3260. Signed-off-by:Jim Harris <jim.harris@samsung.com> Change-Id: I089311d71515ce41a714a97e13232da18699c9ec Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/21813 Tested-by:
SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by:
Tomasz Zawadzki <tomasz.zawadzki@intel.com> Reviewed-by:
Konrad Sztyber <konrad.sztyber@intel.com> Community-CI: Mellanox Build Bot