DPDK patches and discussions
 help / color / mirror / Atom feed
From: Akhil Goyal <gakhil@marvell.com>
To: Kevin Traynor <ktraynor@redhat.com>, "dev@dpdk.org" <dev@dpdk.org>
Cc: "ferruh.yigit@intel.com" <ferruh.yigit@intel.com>,
	Pablo de Lara <pablo.de.lara.guarch@intel.com>
Subject: Re: [dpdk-dev] [EXT] [PATCH] crypto/zuc: fix gcc11 maybe-uninitialized warnings
Date: Mon, 17 May 2021 19:23:17 +0000	[thread overview]
Message-ID: <MW2PR18MB2284E37F52326DD4D769D010D82D9@MW2PR18MB2284.namprd18.prod.outlook.com> (raw)
In-Reply-To: <20210514150834.227474-1-ktraynor@redhat.com>

> gcc11 complains that some arrays may be uninitialized in
> process_zuc_hash_op(). This is because their initialization
> depends on num_ops being > 0.
> 
> For example:
> $ gcc --version
> gcc (GCC) 11.1.1 20210428 (Red Hat 11.1.1-1)
> 
> In file included from ../drivers/crypto/zuc/zuc_pmd_private.h:8,
>                  from ../drivers/crypto/zuc/rte_zuc_pmd.c:13:
> ../drivers/crypto/zuc/rte_zuc_pmd.c: In function ‘process_zuc_hash_op’:
> ../drivers/crypto/zuc/rte_zuc_pmd.c:279:33: error: ‘hash_keys’ may be used
> uninitialized [-Werror=maybe-uninitialized]
>   279 |         IMB_ZUC_EIA3_N_BUFFER(qp->mb_mgr, (const void
> **)hash_keys,
>       |                                 ^
> ../drivers/crypto/zuc/rte_zuc_pmd.c:279:33: note: by argument 1 of type
> ‘const void * const*’ to ‘void(const void * const*, const void * const*, const
> void * const*, const uint32_t *, uint32_t **, const uint32_t)’ {aka ‘void(const
> void * const*, const void * const*, const void * const*, const unsigned int *,
> unsigned int **, const unsigned int)’}
> ../drivers/crypto/zuc/rte_zuc_pmd.c:245:21: note: ‘hash_keys’ declared here
>   245 |         const void *hash_keys[ZUC_MAX_BURST];
>       |                     ^~~~~~~~~
> 
> This function is only called with num_ops > 0 because of
> checks in process_zuc_hash_op().
> 
> To remove the warning initialize the arrays.
> 
> Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
> ---
Removed error log from commit message.

Applied to dpdk-next-crypto

Thanks.

      reply	other threads:[~2021-05-17 19:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-14 15:08 [dpdk-dev] " Kevin Traynor
2021-05-17 19:23 ` Akhil Goyal [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=MW2PR18MB2284E37F52326DD4D769D010D82D9@MW2PR18MB2284.namprd18.prod.outlook.com \
    --to=gakhil@marvell.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=ktraynor@redhat.com \
    --cc=pablo.de.lara.guarch@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).