From: Richard Henderson <richard.henderson@linaro.org>
To: "Marc-André Lureau" <marcandre.lureau@gmail.com>,
QEMU <qemu-devel@nongnu.org>
Cc: viktor.prutyanov@redhat.com,
Janosch Frank <frankja@linux.ibm.com>,
"Dr. David Alan Gilbert" <dgilbert@redhat.com>
Subject: Re: [PULL 13/13] dump/win_dump: add 32-bit guest Windows support
Date: Thu, 21 Apr 2022 10:24:22 -0700 [thread overview]
Message-ID: <0a7a4ad7-e68a-4511-9c70-7a536fa5dc33@linaro.org> (raw)
In-Reply-To: <CAJ+F1CLcQ1x0L9v8UcxL+_6bRC9pVMxAK72i4ekgx5O_cnasdQ@mail.gmail.com>
On 4/21/22 06:59, Marc-André Lureau wrote:
> - check_header(h, &local_err);
> + check_header(h, &x64, &local_err);
> if (local_err) {
> error_propagate(errp, local_err);
> return;
> }
>
> + hdr_size = x64 ? sizeof(WinDumpHeader64) : sizeof(WinDumpHeader32);
>
>
> The compiler is not smart enough here:
> ../dump/win_dump.c:416:46: error: 'x64' may be used uninitialized in this function
> [-Werror=maybe-uninitialized]
> hdr_size = x64 ? sizeof(WinDumpHeader64) : sizeof(WinDumpHeader32);
The compiler might do better with
if (!check_header(h, &x64, err)) {
return;
}
where check_header returns false on failure (which is recommended by qapi/error.h). Right
now, it can't see through error_setg() to see that local_err must be set when x64 isn't.
> I'll simply initialize the variable to true by default.
Or that.
I'll discard this pull request and expect a v2.
r~
prev parent reply other threads:[~2022-04-21 17:29 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-21 12:48 [PULL 00/13] Dump patches marcandre.lureau
2022-04-21 12:48 ` [PULL 01/13] dump: Use ERRP_GUARD() marcandre.lureau
2022-04-21 12:48 ` [PULL 02/13] dump: Remove the sh_info variable marcandre.lureau
2022-04-21 12:48 ` [PULL 03/13] dump: Introduce shdr_num to decrease complexity marcandre.lureau
2022-04-21 12:48 ` [PULL 04/13] dump: Remove the section if when calculating the memory offset marcandre.lureau
2022-04-21 12:48 ` [PULL 05/13] dump: Add more offset variables marcandre.lureau
2022-04-21 12:48 ` [PULL 06/13] dump: Introduce dump_is_64bit() helper function marcandre.lureau
2022-04-21 12:48 ` [PULL 07/13] dump: Consolidate phdr note writes marcandre.lureau
2022-04-21 12:48 ` [PULL 08/13] dump: Cleanup dump_begin write functions marcandre.lureau
2022-04-21 12:48 ` [PULL 09/13] dump: Consolidate elf note function marcandre.lureau
2022-04-21 12:48 ` [PULL 10/13] include/qemu: rename Windows context definitions to expose bitness marcandre.lureau
2022-04-21 12:48 ` [PULL 11/13] dump/win_dump: add helper macros for Windows dump header access marcandre.lureau
2022-04-21 12:48 ` [PULL 12/13] include/qemu: add 32-bit Windows dump structures marcandre.lureau
2022-04-21 12:48 ` [PULL 13/13] dump/win_dump: add 32-bit guest Windows support marcandre.lureau
2022-04-21 13:59 ` Marc-André Lureau
2022-04-21 17:24 ` Richard Henderson [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=0a7a4ad7-e68a-4511-9c70-7a536fa5dc33@linaro.org \
--to=richard.henderson@linaro.org \
--cc=dgilbert@redhat.com \
--cc=frankja@linux.ibm.com \
--cc=marcandre.lureau@gmail.com \
--cc=qemu-devel@nongnu.org \
--cc=viktor.prutyanov@redhat.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).