* [PATCH 0/3] accel: Silent few -Wmissing-field-initializers warning
@ 2022-12-20 14:35 Philippe Mathieu-Daudé
2022-12-20 14:35 ` [PATCH 1/3] tcg: Silent " Philippe Mathieu-Daudé
` (3 more replies)
0 siblings, 4 replies; 9+ messages in thread
From: Philippe Mathieu-Daudé @ 2022-12-20 14:35 UTC (permalink / raw)
To: qemu-devel
Cc: kvm, Paolo Bonzini, Richard Henderson,
Philippe Mathieu-Daudé
Silent few -Wmissing-field-initializers warnings enabled by -Wextra.
Philippe Mathieu-Daudé (3):
tcg: Silent -Wmissing-field-initializers warning
accel/kvm: Silent -Wmissing-field-initializers warning
softmmu: Silent -Wmissing-field-initializers warning
accel/kvm/kvm-all.c | 4 ++--
softmmu/vl.c | 2 +-
tcg/tcg-common.c | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
--
2.38.1
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 1/3] tcg: Silent -Wmissing-field-initializers warning
2022-12-20 14:35 [PATCH 0/3] accel: Silent few -Wmissing-field-initializers warning Philippe Mathieu-Daudé
@ 2022-12-20 14:35 ` Philippe Mathieu-Daudé
2022-12-20 14:43 ` Daniel P. Berrangé
2022-12-20 14:35 ` [PATCH 2/3] accel/kvm: " Philippe Mathieu-Daudé
` (2 subsequent siblings)
3 siblings, 1 reply; 9+ messages in thread
From: Philippe Mathieu-Daudé @ 2022-12-20 14:35 UTC (permalink / raw)
To: qemu-devel
Cc: kvm, Paolo Bonzini, Richard Henderson,
Philippe Mathieu-Daudé
Silent when compiling with -Wextra:
tcg/i386/tcg-target.opc.h:34:1: warning: missing field 'args_ct' initializer [-Wmissing-field-initializers]
DEF(x86_punpckl_vec, 1, 2, 0, IMPLVEC)
^
../tcg/tcg-common.c:30:66: note: expanded from macro 'DEF'
{ #s, oargs, iargs, cargs, iargs + oargs + cargs, flags },
^
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
tcg/tcg-common.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tcg/tcg-common.c b/tcg/tcg-common.c
index aa0c4f60c9..35e7616ae9 100644
--- a/tcg/tcg-common.c
+++ b/tcg/tcg-common.c
@@ -27,7 +27,7 @@
TCGOpDef tcg_op_defs[] = {
#define DEF(s, oargs, iargs, cargs, flags) \
- { #s, oargs, iargs, cargs, iargs + oargs + cargs, flags },
+ { #s, oargs, iargs, cargs, iargs + oargs + cargs, flags, NULL },
#include "tcg/tcg-opc.h"
#undef DEF
};
--
2.38.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 2/3] accel/kvm: Silent -Wmissing-field-initializers warning
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:35 ` Philippe Mathieu-Daudé
2022-12-20 14:44 ` Daniel P. Berrangé
2022-12-20 14:35 ` [PATCH 3/3] softmmu: " Philippe Mathieu-Daudé
2022-12-20 14:42 ` [PATCH 0/3] accel: Silent few " Daniel P. Berrangé
3 siblings, 1 reply; 9+ messages in thread
From: Philippe Mathieu-Daudé @ 2022-12-20 14:35 UTC (permalink / raw)
To: qemu-devel
Cc: kvm, Paolo Bonzini, Richard Henderson,
Philippe Mathieu-Daudé
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
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 3/3] softmmu: Silent -Wmissing-field-initializers warning
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:35 ` [PATCH 2/3] accel/kvm: " Philippe Mathieu-Daudé
@ 2022-12-20 14:35 ` 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é
3 siblings, 1 reply; 9+ messages in thread
From: Philippe Mathieu-Daudé @ 2022-12-20 14:35 UTC (permalink / raw)
To: qemu-devel
Cc: kvm, Paolo Bonzini, Richard Henderson,
Philippe Mathieu-Daudé
Silent when compiling with -Wextra:
../softmmu/vl.c:886:12: warning: missing field 'flags' initializer [-Wmissing-field-initializers]
{ NULL },
^
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
softmmu/vl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/softmmu/vl.c b/softmmu/vl.c
index 798e1dc933..12c56d3b37 100644
--- a/softmmu/vl.c
+++ b/softmmu/vl.c
@@ -883,7 +883,7 @@ static const QEMUOption qemu_options[] = {
#define ARCHHEADING(text, arch_mask)
#include "qemu-options.def"
- { NULL },
+ { /* end of list */ }
};
typedef struct VGAInterfaceInfo {
--
2.38.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH 0/3] accel: Silent few -Wmissing-field-initializers warning
2022-12-20 14:35 [PATCH 0/3] accel: Silent few -Wmissing-field-initializers warning Philippe Mathieu-Daudé
` (2 preceding siblings ...)
2022-12-20 14:35 ` [PATCH 3/3] softmmu: " Philippe Mathieu-Daudé
@ 2022-12-20 14:42 ` Daniel P. Berrangé
2022-12-20 14:58 ` Philippe Mathieu-Daudé
3 siblings, 1 reply; 9+ messages in thread
From: Daniel P. Berrangé @ 2022-12-20 14:42 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: qemu-devel, kvm, Paolo Bonzini, Richard Henderson
On Tue, Dec 20, 2022 at 03:35:29PM +0100, Philippe Mathieu-Daudé wrote:
> Silent few -Wmissing-field-initializers warnings enabled by -Wextra.
>
> Philippe Mathieu-Daudé (3):
> tcg: Silent -Wmissing-field-initializers warning
> accel/kvm: Silent -Wmissing-field-initializers warning
> softmmu: Silent -Wmissing-field-initializers warning
>
> accel/kvm/kvm-all.c | 4 ++--
> softmmu/vl.c | 2 +-
> tcg/tcg-common.c | 2 +-
> 3 files changed, 4 insertions(+), 4 deletions(-)
If we're going to the trouble of fixing violations (which is
good), then we shouuld also add -Wmissing-field-initializers
(or -Wextra) to warn_flags in configure, to prevent regressions
again in future.
With regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 1/3] tcg: Silent -Wmissing-field-initializers warning
2022-12-20 14:35 ` [PATCH 1/3] tcg: Silent " Philippe Mathieu-Daudé
@ 2022-12-20 14:43 ` Daniel P. Berrangé
0 siblings, 0 replies; 9+ messages in thread
From: Daniel P. Berrangé @ 2022-12-20 14:43 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: qemu-devel, kvm, Paolo Bonzini, Richard Henderson
On Tue, Dec 20, 2022 at 03:35:30PM +0100, Philippe Mathieu-Daudé wrote:
> Silent when compiling with -Wextra:
>
> tcg/i386/tcg-target.opc.h:34:1: warning: missing field 'args_ct' initializer [-Wmissing-field-initializers]
> DEF(x86_punpckl_vec, 1, 2, 0, IMPLVEC)
> ^
> ../tcg/tcg-common.c:30:66: note: expanded from macro 'DEF'
> { #s, oargs, iargs, cargs, iargs + oargs + cargs, flags },
> ^
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
> tcg/tcg-common.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
With regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 2/3] accel/kvm: Silent -Wmissing-field-initializers warning
2022-12-20 14:35 ` [PATCH 2/3] accel/kvm: " Philippe Mathieu-Daudé
@ 2022-12-20 14:44 ` Daniel P. Berrangé
0 siblings, 0 replies; 9+ messages in thread
From: Daniel P. Berrangé @ 2022-12-20 14:44 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: qemu-devel, kvm, Paolo Bonzini, Richard Henderson
On Tue, Dec 20, 2022 at 03:35:31PM +0100, Philippe Mathieu-Daudé wrote:
> 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(-)
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
With regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 3/3] softmmu: Silent -Wmissing-field-initializers warning
2022-12-20 14:35 ` [PATCH 3/3] softmmu: " Philippe Mathieu-Daudé
@ 2022-12-20 14:44 ` Daniel P. Berrangé
0 siblings, 0 replies; 9+ messages in thread
From: Daniel P. Berrangé @ 2022-12-20 14:44 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: qemu-devel, kvm, Paolo Bonzini, Richard Henderson
On Tue, Dec 20, 2022 at 03:35:32PM +0100, Philippe Mathieu-Daudé wrote:
> Silent when compiling with -Wextra:
>
> ../softmmu/vl.c:886:12: warning: missing field 'flags' initializer [-Wmissing-field-initializers]
> { NULL },
> ^
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
> softmmu/vl.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
With regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 0/3] accel: Silent few -Wmissing-field-initializers warning
2022-12-20 14:42 ` [PATCH 0/3] accel: Silent few " Daniel P. Berrangé
@ 2022-12-20 14:58 ` Philippe Mathieu-Daudé
0 siblings, 0 replies; 9+ messages in thread
From: Philippe Mathieu-Daudé @ 2022-12-20 14:58 UTC (permalink / raw)
To: Daniel P. Berrangé; +Cc: qemu-devel, kvm, Paolo Bonzini, Richard Henderson
On 20/12/22 15:42, Daniel P. Berrangé wrote:
> On Tue, Dec 20, 2022 at 03:35:29PM +0100, Philippe Mathieu-Daudé wrote:
>> Silent few -Wmissing-field-initializers warnings enabled by -Wextra.
>>
>> Philippe Mathieu-Daudé (3):
>> tcg: Silent -Wmissing-field-initializers warning
>> accel/kvm: Silent -Wmissing-field-initializers warning
>> softmmu: Silent -Wmissing-field-initializers warning
>>
>> accel/kvm/kvm-all.c | 4 ++--
>> softmmu/vl.c | 2 +-
>> tcg/tcg-common.c | 2 +-
>> 3 files changed, 4 insertions(+), 4 deletions(-)
>
> If we're going to the trouble of fixing violations (which is
> good), then we shouuld also add -Wmissing-field-initializers
> (or -Wextra) to warn_flags in configure, to prevent regressions
> again in future.
Yes, I plan to add it at the end. I choose to split in small
contained series to avoid spamming every maintainers, but this
is actually that trivial that I could have sent as a big one...
Thanks for the review!
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2022-12-20 14:59 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [PATCH 2/3] accel/kvm: " Philippe Mathieu-Daudé
2022-12-20 14:44 ` 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é
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).