From: Jeff Law <jeffreyalaw@gmail.com>
To: pan2.li@intel.com, gcc-patches@gcc.gnu.org
Cc: juzhe.zhong@rivai.ai, kito.cheng@sifive.com, yanzhang.wang@intel.com
Subject: Re: [PATCH] Mode-Switching: Fix local array maybe uninitialized warning
Date: Fri, 19 May 2023 22:23:57 -0600 [thread overview]
Message-ID: <f440f221-906e-ade6-5eb8-dbd9ff1aaaef@gmail.com> (raw)
In-Reply-To: <20230519235618.4078456-1-pan2.li@intel.com>
On 5/19/23 17:56, pan2.li@intel.com wrote:
> From: Pan Li <pan2.li@intel.com>
>
> There are 2 local array in function optimize_mode_switching. It will be
> initialized conditionally at the beginning but then always consumed in
> another loop. It may trigger the warning maybe-uninitialized, and may
> result in build failure when enable werror, aka warning as error.
>
> This patch will initialize the local array to zero explictly when
> declaration.
>
> Signed-off-by: Pan Li <pan2.li@intel.com>
>
> gcc/ChangeLog:
>
> * mode-switching.cc (entity_map): Initialize the array to zero.
> (bb_info): Ditto.
OK.
jeff
next prev parent reply other threads:[~2023-05-20 4:24 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-19 23:56 pan2.li
2023-05-20 4:23 ` Jeff Law [this message]
2023-05-20 9:59 ` Li, Pan2
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=f440f221-906e-ade6-5eb8-dbd9ff1aaaef@gmail.com \
--to=jeffreyalaw@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=juzhe.zhong@rivai.ai \
--cc=kito.cheng@sifive.com \
--cc=pan2.li@intel.com \
--cc=yanzhang.wang@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 read-only IMAP folder(s) and NNTP newsgroup(s).