On Wed, 18 May 2022 12:16:47 +0200 David Marchand <david.march...@redhat.com> wrote:
> GCC 12 raises the following warning: > > In file included from ../drivers/crypto/cnxk/cn10k_cryptodev_ops.c:17: > In function ‘fill_sg_comp_from_iov’, > inlined from ‘cpt_kasumi_enc_prep’ at > ../drivers/crypto/cnxk/cnxk_se.h:1413:8, > inlined from ‘cpt_fc_enc_hmac_prep’ at > ../drivers/crypto/cnxk/cnxk_se.h:1635:9, > inlined from ‘fill_digest_params’ at > ../drivers/crypto/cnxk/cnxk_se.h:2524:8, > inlined from ‘cpt_sym_inst_fill’ at > ../drivers/crypto/cnxk/cn10k_cryptodev_ops.c:92:9, > inlined from ‘cn10k_cpt_fill_inst.constprop.isra’ at > ../drivers/crypto/cnxk/cn10k_cryptodev_ops.c:146:10: > ../drivers/crypto/cnxk/cnxk_se.h:208:52: error: array subscript 0 is > outside array bounds of ‘struct roc_se_buf_ptr[0]’ > [-Werror=array-bounds] > 208 | e_vaddr = (uint64_t)bufs[j].vaddr; > | ~~~~~~~^~~~~~ > ../drivers/crypto/cnxk/cnxk_se.h:209:48: error: array subscript 0 is > outside array bounds of ‘struct roc_se_buf_ptr[0]’ > [-Werror=array-bounds] > 209 | e_len = (size > bufs[j].size) ? bufs[j].size : size; > | ~~~~~~~^~~~~ > > For now, waive this warning until we have a proper fix. > > Cc: sta...@dpdk.org > > Signed-off-by: David Marchand <david.march...@redhat.com> If you fix iov_ptr_t to be flexible array this won't be needed.