From: Eric Auger <eric.auger@redhat.com>
To: eric.auger.pro@gmail.com, eric.auger@redhat.com,
pbonzini@redhat.com, richard.henderson@linaro.org, paul@nowt.org,
qemu-devel@nongnu.org, stefanha@fmail.com,
peter.maydell@linaro.org
Subject: [PATCH for 7.2?] target/i386: Remove compilation errors when -Werror=maybe-uninitialized
Date: Wed, 7 Dec 2022 14:24:39 +0100 [thread overview]
Message-ID: <20221207132439.635402-1-eric.auger@redhat.com> (raw)
Initialize r0-3 to avoid compilation errors when
-Werror=maybe-uninitialized is used
../target/i386/ops_sse.h: In function ‘helper_vpermdq_ymm’:
../target/i386/ops_sse.h:2495:13: error: ‘r3’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
2495 | d->Q(3) = r3;
| ~~~~~~~~^~~~
../target/i386/ops_sse.h:2494:13: error: ‘r2’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
2494 | d->Q(2) = r2;
| ~~~~~~~~^~~~
../target/i386/ops_sse.h:2493:13: error: ‘r1’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
2493 | d->Q(1) = r1;
| ~~~~~~~~^~~~
../target/i386/ops_sse.h:2492:13: error: ‘r0’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
2492 | d->Q(0) = r0;
| ~~~~~~~~^~~~
Signed-off-by: Eric Auger <eric.auger@redhat.com>
Fixes: 790684776861 ("target/i386: reimplement 0x0f 0x3a, add AVX")
---
Am I the only one getting this? Or anything wrong in my setup.
---
target/i386/ops_sse.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/target/i386/ops_sse.h b/target/i386/ops_sse.h
index 3cbc36a59d..b77071b8da 100644
--- a/target/i386/ops_sse.h
+++ b/target/i386/ops_sse.h
@@ -2451,7 +2451,7 @@ void glue(helper_vpgatherqq, SUFFIX)(CPUX86State *env,
#if SHIFT >= 2
void helper_vpermdq_ymm(Reg *d, Reg *v, Reg *s, uint32_t order)
{
- uint64_t r0, r1, r2, r3;
+ uint64_t r0 = 0, r1 = 0, r2 = 0, r3 = 0;
switch (order & 3) {
case 0:
--
2.37.3
next reply other threads:[~2022-12-07 13:31 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-07 13:24 Eric Auger [this message]
2022-12-07 13:29 ` [PATCH for 7.2?] target/i386: Remove compilation errors when -Werror=maybe-uninitialized Eric Auger
2022-12-07 14:09 ` Stefan Hajnoczi
2022-12-07 14:33 ` Eric Auger
2022-12-07 15:55 ` Stefan Hajnoczi
2022-12-07 16:08 ` Eric Auger
2022-12-07 18:23 ` Richard Henderson
2022-12-07 18:44 ` Eric Auger
2022-12-07 20:28 ` Peter Maydell
2022-12-07 20:39 ` Eric Auger
2022-12-07 16:55 ` Philippe Mathieu-Daudé
2022-12-07 18:22 ` Eric Auger
2022-12-07 19:11 ` Stefan Weil via
2022-12-07 19:59 ` Stefan Hajnoczi
2022-12-07 20:11 ` Eric Auger
2022-12-07 19:59 ` Compiler warnings with maximum warning level (was: Re: [PATCH for 7.2?] target/i386: Remove compilation errors when -Werror=maybe-uninitialized) Stefan Weil via
2022-12-07 20:17 ` [PATCH for 7.2?] target/i386: Remove compilation errors when -Werror=maybe-uninitialized Eric Auger
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=20221207132439.635402-1-eric.auger@redhat.com \
--to=eric.auger@redhat.com \
--cc=eric.auger.pro@gmail.com \
--cc=paul@nowt.org \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=stefanha@fmail.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).