All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: "Philippe Mathieu-Daudé" <philmd@linaro.org>
Cc: "Pierrick Bouvier" <pierrick.bouvier@linaro.org>,
	qemu-devel@nongnu.org,
	"Manos Pitsidianakis" <manos.pitsidianakis@linaro.org>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Daniel P. Berrangé" <berrange@redhat.com>,
	"Marc-André Lureau" <marcandre.lureau@redhat.com>
Subject: Re: [PATCH v3] system: Convert qemu_arch_available() to TargetInfo API
Date: Fri, 09 Jan 2026 09:18:35 +0100	[thread overview]
Message-ID: <87ldi7mc6c.fsf@pond.sub.org> (raw)
In-Reply-To: <d8792a35-340b-4a5b-8349-42ee3d050b2a@linaro.org> ("Philippe Mathieu-Daudé"'s message of "Fri, 9 Jan 2026 08:39:31 +0100")

Philippe Mathieu-Daudé <philmd@linaro.org> writes:

> On 9/1/26 07:58, Pierrick Bouvier wrote:

[...]

>> See my previous answer on v1, -Wswitch is used:
>> Reading the thread above, the only mention I find is the 3rd commit that
>> precisely change definition because -Wswitch is enabled with clang.
>> And it's not only a clang thing, gcc has it in Wall also [1].
>
> Yes I read that, I'd really like we use -Wswitch but IIUC we can not,
> so with that in mind I don't understand your request. Is that for the
> hypothetical case we can use -Wswitch in the future? Sorry I'm not
> trying to be picky here, I just fail to see the problem you raised :(

We *are* using -Wswitch.

To see that, delete the default: case in to_json()'s outer switch (patch
appended), and compile:

    ../qobject/qjson.c: In function ‘to_json’:
    ../qobject/qjson.c:154:5: warning: enumeration value ‘QTYPE_NONE’ not handled in switch [-Wswitch]
      154 |     switch (qobject_type(obj)) {
          |     ^~~~~~
    ../qobject/qjson.c:154:5: warning: enumeration value ‘QTYPE__MAX’ not handled in switch [-Wswitch]

We run gcc -Wall, which implies -Wswitch.

[...]


diff --git a/qobject/qjson.c b/qobject/qjson.c
index c858dafb5e..6287c93c67 100644
--- a/qobject/qjson.c
+++ b/qobject/qjson.c
@@ -213,8 +213,6 @@ static void to_json(JSONWriter *writer, const char *name,
         json_writer_bool(writer, name, qbool_get_bool(val));
         break;
     }
-    default:
-        abort();
     }
 }
 



  reply	other threads:[~2026-01-09  8:19 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-08 16:36 [PATCH v3] system: Convert qemu_arch_available() to TargetInfo API Philippe Mathieu-Daudé
2026-01-08 17:06 ` Alex Bennée
2026-01-09  8:35   ` Philippe Mathieu-Daudé
2026-01-08 18:57 ` Pierrick Bouvier
2026-01-09  5:53   ` Philippe Mathieu-Daudé
2026-01-09  6:58     ` Pierrick Bouvier
2026-01-09  7:39       ` Philippe Mathieu-Daudé
2026-01-09  8:18         ` Markus Armbruster [this message]
2026-01-09  8:32           ` Philippe Mathieu-Daudé
2026-01-09  8:37             ` Pierrick Bouvier

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=87ldi7mc6c.fsf@pond.sub.org \
    --to=armbru@redhat.com \
    --cc=berrange@redhat.com \
    --cc=manos.pitsidianakis@linaro.org \
    --cc=marcandre.lureau@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=philmd@linaro.org \
    --cc=pierrick.bouvier@linaro.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.