From: Thomas Huth <thuth@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>, qemu-devel@nongnu.org
Cc: "Michael S . Tsirkin" <mst@redhat.com>
Subject: Re: [PATCH] tests: bios-tables-test: replace memset with initializer
Date: Thu, 30 Mar 2023 15:16:09 +0200 [thread overview]
Message-ID: <76fad258-2f98-08ee-3b54-eba4d4cbe0b5@redhat.com> (raw)
In-Reply-To: <20230330131109.47856-1-pbonzini@redhat.com>
On 30/03/2023 15.11, Paolo Bonzini wrote:
> Coverity complains that memset() writes over a const field. Use
> an initializer instead, so that the const field is left to zero.
> Tests that have to write the const field already use an initializer
> for the whole struct, here I am choosing the smallest possible
> patch (which is not that small already).
>
> Cc: Michael S. Tsirkin <mst@redhat.com>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
> tests/qtest/bios-tables-test.c | 123 ++++++++++++---------------------
> 1 file changed, 43 insertions(+), 80 deletions(-)
Reviewed-by: Thomas Huth <thuth@redhat.com>
prev parent reply other threads:[~2023-03-30 13:16 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-30 13:11 [PATCH] tests: bios-tables-test: replace memset with initializer Paolo Bonzini
2023-03-30 13:16 ` Thomas Huth [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=76fad258-2f98-08ee-3b54-eba4d4cbe0b5@redhat.com \
--to=thuth@redhat.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
/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).