From: Richard Henderson <richard.henderson@linaro.org>
To: pannengyuan@huawei.com, peter.maydell@linaro.org
Cc: qemu-trivial@nongnu.org, Euler Robot <euler.robot@huawei.com>,
qemu-arm@nongnu.org, zhang.zhanghailiang@huawei.com,
qemu-devel@nongnu.org
Subject: Re: [PATCH v2] arm/translate-a64: fix uninitialized variable warning
Date: Wed, 8 Jan 2020 13:43:23 +1000 [thread overview]
Message-ID: <f024c3a8-6685-e37a-c53f-44c6116d3268@linaro.org> (raw)
In-Reply-To: <20200108023915.52288-1-pannengyuan@huawei.com>
On 1/8/20 12:39 PM, pannengyuan@huawei.com wrote:
> From: Pan Nengyuan <pannengyuan@huawei.com>
>
> Fixes:
> target/arm/translate-a64.c: In function 'disas_crypto_three_reg_sha512':
> target/arm/translate-a64.c:13625:9: error: 'genfn' may be used uninitialized in this function [-Werror=maybe-uninitialized]
> genfn(tcg_rd_ptr, tcg_rn_ptr, tcg_rm_ptr);
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> qemu/target/arm/translate-a64.c:13609:8: error: 'feature' may be used uninitialized in this function [-Werror=maybe-uninitialized]
> if (!feature) {
>
> Reported-by: Euler Robot <euler.robot@huawei.com>
> Signed-off-by: Pan Nengyuan <pannengyuan@huawei.com>
> ---
> Changes v2 to v1:
> - add a default label to fix uninitialized warnings(suggested by Richard Henderson)
> ---
> target/arm/translate-a64.c | 2 ++
> 1 file changed, 2 insertions(+)
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Given that you are using -O2, this should probably also be reported as a GCC bug.
r~
next prev parent reply other threads:[~2020-01-08 3:44 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-08 2:39 [PATCH v2] arm/translate-a64: fix uninitialized variable warning pannengyuan
2020-01-08 3:43 ` Richard Henderson [this message]
2020-01-08 10:19 ` Philippe Mathieu-Daudé
2020-01-08 15:10 ` Laurent Vivier
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=f024c3a8-6685-e37a-c53f-44c6116d3268@linaro.org \
--to=richard.henderson@linaro.org \
--cc=euler.robot@huawei.com \
--cc=pannengyuan@huawei.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@nongnu.org \
--cc=zhang.zhanghailiang@huawei.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).