test/compress: fix Wstringop-overflow warnings
Fixed warnings produced by gcc-11: compress_ut.c: In function ‘test_compress_operation’: compress_ut.c:726:9: warning: ‘_get_mbuf_array’ accessing 32 bytes in a region of size 24 [-Wstringop-overflow=] 726 | _get_mbuf_array(exp_src_mbuf, &g_expected_src_mbufs[0], SPDK_COUNTOF(exp_src_mbuf), false); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ compress_ut.c:726:9: note: referencing argument 1 of type ‘struct rte_mbuf **’ compress_ut.c:430:1: note: in a call to function ‘_get_mbuf_array’ 430 | _get_mbuf_array(struct rte_mbuf *mbuf_array[UT_MBUFS_PER_OP_BOUND_TEST], | ^~~~~~~~~~~~~~~ Fixes issue #2013. Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com> Change-Id: I04d0182169e61e87401f93f56993168d7aa42e43 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8692 Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Paul Luse <paul.e.luse@intel.com> Reviewed-by: Ziye Yang <ziye.yang@intel.com> Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
parent
ce60606dbc
commit
2ac1521581
@ -427,8 +427,8 @@ _compress_done(void *_req, int reduce_errno)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_get_mbuf_array(struct rte_mbuf *mbuf_array[UT_MBUFS_PER_OP_BOUND_TEST],
|
_get_mbuf_array(struct rte_mbuf **mbuf_array, struct rte_mbuf *mbuf_head,
|
||||||
struct rte_mbuf *mbuf_head, int mbuf_count, bool null_final)
|
int mbuf_count, bool null_final)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user