qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: qemu-devel@nongnu.org
Cc: kvm@vger.kernel.org, "Paolo Bonzini" <pbonzini@redhat.com>,
	"Richard Henderson" <richard.henderson@linaro.org>,
	"Philippe Mathieu-Daudé" <philmd@linaro.org>
Subject: [PATCH 2/3] accel/kvm: Silent -Wmissing-field-initializers warning
Date: Tue, 20 Dec 2022 15:35:31 +0100	[thread overview]
Message-ID: <20221220143532.24958-3-philmd@linaro.org> (raw)
In-Reply-To: <20221220143532.24958-1-philmd@linaro.org>

Silent when compiling with -Wextra:

  ../accel/kvm/kvm-all.c:2291:17: warning: missing field 'num' initializer [-Wmissing-field-initializers]
        { NULL, }
                ^

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 accel/kvm/kvm-all.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c
index e86c33e0e6..acf1ef84f7 100644
--- a/accel/kvm/kvm-all.c
+++ b/accel/kvm/kvm-all.c
@@ -2282,13 +2282,13 @@ static int kvm_init(MachineState *ms)
     static const char upgrade_note[] =
         "Please upgrade to at least kernel 2.6.29 or recent kvm-kmod\n"
         "(see http://sourceforge.net/projects/kvm).\n";
-    struct {
+    const struct {
         const char *name;
         int num;
     } num_cpus[] = {
         { "SMP",          ms->smp.cpus },
         { "hotpluggable", ms->smp.max_cpus },
-        { NULL, }
+        { /* end of list */ }
     }, *nc = num_cpus;
     int soft_vcpus_limit, hard_vcpus_limit;
     KVMState *s;
-- 
2.38.1



  parent reply	other threads:[~2022-12-20 14:36 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-20 14:35 [PATCH 0/3] accel: Silent few -Wmissing-field-initializers warning Philippe Mathieu-Daudé
2022-12-20 14:35 ` [PATCH 1/3] tcg: Silent " Philippe Mathieu-Daudé
2022-12-20 14:43   ` Daniel P. Berrangé
2022-12-20 14:35 ` Philippe Mathieu-Daudé [this message]
2022-12-20 14:44   ` [PATCH 2/3] accel/kvm: " Daniel P. Berrangé
2022-12-20 14:35 ` [PATCH 3/3] softmmu: " Philippe Mathieu-Daudé
2022-12-20 14:44   ` Daniel P. Berrangé
2022-12-20 14:42 ` [PATCH 0/3] accel: Silent few " Daniel P. Berrangé
2022-12-20 14:58   ` Philippe Mathieu-Daudé

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=20221220143532.24958-3-philmd@linaro.org \
    --to=philmd@linaro.org \
    --cc=kvm@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.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).