All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] block-qdict: Fix -Werror=maybe-uninitialized build failure
@ 2022-03-11 22:16 Murilo Opsfelder Araujo
  2022-03-14  9:58 ` Markus Armbruster
  2022-03-14 13:47 ` Philippe Mathieu-Daudé
  0 siblings, 2 replies; 6+ messages in thread
From: Murilo Opsfelder Araujo @ 2022-03-11 22:16 UTC (permalink / raw)
  To: qemu-devel
  Cc: Kevin Wolf, qemu-block, Markus Armbruster, mopsfelder, muriloo,
	Hanna Reitz

Building QEMU on Fedora 37 (Rawhide Prerelease) ppc64le failed with the
following error:

    $ ../configure --prefix=/usr/local/qemu-disabletcg --target-list=ppc-softmmu,ppc64-softmmu --disable-tcg --disable-linux-user
    ...
    $ make -j$(nproc)
    ...
    FAILED: libqemuutil.a.p/qobject_block-qdict.c.o
    cc -m64 -mlittle-endian -Ilibqemuutil.a.p -I. -I.. -Isubprojects/libvhost-user -I../subprojects/libvhost-user -Iqapi -Itrace -Iui -Iui/shader -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/sysprof-4 -I/usr/include/lib
    mount -I/usr/include/blkid -I/usr/include/gio-unix-2.0 -I/usr/include/p11-kit-1 -I/usr/include/pixman-1 -fdiagnostics-color=auto -Wall -Winvalid-pch -Werror -std=gnu11 -O2 -g -isystem /root/qemu/linux-headers -isystem linux-headers -iquote
     . -iquote /root/qemu -iquote /root/qemu/include -iquote /root/qemu/disas/libvixl -pthread -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wundef -Wwrite
    -strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -Wold-style-declaration -Wold-style-definition -Wtype-limits -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wempty-body -Wnested-externs -Wendif-label
    s -Wexpansion-to-defined -Wimplicit-fallthrough=2 -Wno-missing-include-dirs -Wno-shift-negative-value -Wno-psabi -fstack-protector-strong -fPIE -MD -MQ libqemuutil.a.p/qobject_block-qdict.c.o -MF libqemuutil.a.p/qobject_block-qdict.c.o.d -
    o libqemuutil.a.p/qobject_block-qdict.c.o -c ../qobject/block-qdict.c
    In file included from /root/qemu/include/qapi/qmp/qdict.h:16,
                     from /root/qemu/include/block/qdict.h:13,
                     from ../qobject/block-qdict.c:11:
    /root/qemu/include/qapi/qmp/qobject.h: In function ‘qdict_array_split’:
    /root/qemu/include/qapi/qmp/qobject.h:49:17: error: ‘subqdict’ may be used uninitialized [-Werror=maybe-uninitialized]
       49 |     typeof(obj) _obj = (obj);                                   \
          |                 ^~~~
    ../qobject/block-qdict.c:227:16: note: ‘subqdict’ declared here
      227 |         QDict *subqdict;
          |                ^~~~~~~~
    cc1: all warnings being treated as errors

Fix build failure by expanding the ternary operation.
Tested with `make check-unit` (the check-block-qdict test passed).

Signed-off-by: Murilo Opsfelder Araujo <muriloo@linux.ibm.com>
Cc: Kevin Wolf <kwolf@redhat.com>
Cc: Hanna Reitz <hreitz@redhat.com>
Cc: Markus Armbruster <armbru@redhat.com>
---
v1: https://lists.nongnu.org/archive/html/qemu-devel/2022-03/msg03224.html

 qobject/block-qdict.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/qobject/block-qdict.c b/qobject/block-qdict.c
index 1487cc5dd8..4a83bda2c3 100644
--- a/qobject/block-qdict.c
+++ b/qobject/block-qdict.c
@@ -251,12 +251,12 @@ void qdict_array_split(QDict *src, QList **dst)
         if (is_subqdict) {
             qdict_extract_subqdict(src, &subqdict, prefix);
             assert(qdict_size(subqdict) > 0);
+            qlist_append_obj(*dst, QOBJECT(subqdict));
         } else {
             qobject_ref(subqobj);
             qdict_del(src, indexstr);
+            qlist_append_obj(*dst, subqobj);
         }
-
-        qlist_append_obj(*dst, subqobj ?: QOBJECT(subqdict));
     }
 }
 
-- 
2.35.1



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH v2] block-qdict: Fix -Werror=maybe-uninitialized build failure
  2022-03-11 22:16 [PATCH v2] block-qdict: Fix -Werror=maybe-uninitialized build failure Murilo Opsfelder Araujo
@ 2022-03-14  9:58 ` Markus Armbruster
  2022-03-14 13:47 ` Philippe Mathieu-Daudé
  1 sibling, 0 replies; 6+ messages in thread
From: Markus Armbruster @ 2022-03-14  9:58 UTC (permalink / raw)
  To: Murilo Opsfelder Araujo
  Cc: Kevin Wolf, Hanna Reitz, mopsfelder, qemu-devel, qemu-block

Murilo Opsfelder Araujo <muriloo@linux.ibm.com> writes:

> Building QEMU on Fedora 37 (Rawhide Prerelease) ppc64le failed with the
> following error:
>
>     $ ../configure --prefix=/usr/local/qemu-disabletcg --target-list=ppc-softmmu,ppc64-softmmu --disable-tcg --disable-linux-user
>     ...
>     $ make -j$(nproc)
>     ...
>     FAILED: libqemuutil.a.p/qobject_block-qdict.c.o
>     cc -m64 -mlittle-endian -Ilibqemuutil.a.p -I. -I.. -Isubprojects/libvhost-user -I../subprojects/libvhost-user -Iqapi -Itrace -Iui -Iui/shader -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/sysprof-4 -I/usr/include/lib
>     mount -I/usr/include/blkid -I/usr/include/gio-unix-2.0 -I/usr/include/p11-kit-1 -I/usr/include/pixman-1 -fdiagnostics-color=auto -Wall -Winvalid-pch -Werror -std=gnu11 -O2 -g -isystem /root/qemu/linux-headers -isystem linux-headers -iquote
>      . -iquote /root/qemu -iquote /root/qemu/include -iquote /root/qemu/disas/libvixl -pthread -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wundef -Wwrite
>     -strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -Wold-style-declaration -Wold-style-definition -Wtype-limits -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wempty-body -Wnested-externs -Wendif-label
>     s -Wexpansion-to-defined -Wimplicit-fallthrough=2 -Wno-missing-include-dirs -Wno-shift-negative-value -Wno-psabi -fstack-protector-strong -fPIE -MD -MQ libqemuutil.a.p/qobject_block-qdict.c.o -MF libqemuutil.a.p/qobject_block-qdict.c.o.d -
>     o libqemuutil.a.p/qobject_block-qdict.c.o -c ../qobject/block-qdict.c
>     In file included from /root/qemu/include/qapi/qmp/qdict.h:16,
>                      from /root/qemu/include/block/qdict.h:13,
>                      from ../qobject/block-qdict.c:11:
>     /root/qemu/include/qapi/qmp/qobject.h: In function ‘qdict_array_split’:
>     /root/qemu/include/qapi/qmp/qobject.h:49:17: error: ‘subqdict’ may be used uninitialized [-Werror=maybe-uninitialized]
>        49 |     typeof(obj) _obj = (obj);                                   \
>           |                 ^~~~
>     ../qobject/block-qdict.c:227:16: note: ‘subqdict’ declared here
>       227 |         QDict *subqdict;
>           |                ^~~~~~~~
>     cc1: all warnings being treated as errors
>
> Fix build failure by expanding the ternary operation.
> Tested with `make check-unit` (the check-block-qdict test passed).
>
> Signed-off-by: Murilo Opsfelder Araujo <muriloo@linux.ibm.com>
> Cc: Kevin Wolf <kwolf@redhat.com>
> Cc: Hanna Reitz <hreitz@redhat.com>
> Cc: Markus Armbruster <armbru@redhat.com>
> ---
> v1: https://lists.nongnu.org/archive/html/qemu-devel/2022-03/msg03224.html
>
>  qobject/block-qdict.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/qobject/block-qdict.c b/qobject/block-qdict.c
> index 1487cc5dd8..4a83bda2c3 100644
> --- a/qobject/block-qdict.c
> +++ b/qobject/block-qdict.c
> @@ -251,12 +251,12 @@ void qdict_array_split(QDict *src, QList **dst)
>          if (is_subqdict) {
>              qdict_extract_subqdict(src, &subqdict, prefix);
>              assert(qdict_size(subqdict) > 0);
> +            qlist_append_obj(*dst, QOBJECT(subqdict));
>          } else {
>              qobject_ref(subqobj);
>              qdict_del(src, indexstr);
> +            qlist_append_obj(*dst, subqobj);
>          }
> -
> -        qlist_append_obj(*dst, subqobj ?: QOBJECT(subqdict));
>      }
>  }

Reviewed-by: Markus Armbruster <armbru@redhat.com>



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2] block-qdict: Fix -Werror=maybe-uninitialized build failure
  2022-03-11 22:16 [PATCH v2] block-qdict: Fix -Werror=maybe-uninitialized build failure Murilo Opsfelder Araujo
  2022-03-14  9:58 ` Markus Armbruster
@ 2022-03-14 13:47 ` Philippe Mathieu-Daudé
  2022-03-15 17:43   ` Murilo Opsfelder Araújo
  1 sibling, 1 reply; 6+ messages in thread
From: Philippe Mathieu-Daudé @ 2022-03-14 13:47 UTC (permalink / raw)
  To: Murilo Opsfelder Araujo, qemu-devel
  Cc: Kevin Wolf, Hanna Reitz, mopsfelder, Markus Armbruster, qemu-block

On 11/3/22 23:16, Murilo Opsfelder Araujo wrote:
> Building QEMU on Fedora 37 (Rawhide Prerelease) ppc64le failed with the
> following error:
> 
>      $ ../configure --prefix=/usr/local/qemu-disabletcg --target-list=ppc-softmmu,ppc64-softmmu --disable-tcg --disable-linux-user
>      ...
>      $ make -j$(nproc)
>      ...
>      FAILED: libqemuutil.a.p/qobject_block-qdict.c.o

This part >>>

>      cc -m64 -mlittle-endian -Ilibqemuutil.a.p -I. -I.. -Isubprojects/libvhost-user -I../subprojects/libvhost-user -Iqapi -Itrace -Iui -Iui/shader -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/sysprof-4 -I/usr/include/lib
>      mount -I/usr/include/blkid -I/usr/include/gio-unix-2.0 -I/usr/include/p11-kit-1 -I/usr/include/pixman-1 -fdiagnostics-color=auto -Wall -Winvalid-pch -Werror -std=gnu11 -O2 -g -isystem /root/qemu/linux-headers -isystem linux-headers -iquote
>       . -iquote /root/qemu -iquote /root/qemu/include -iquote /root/qemu/disas/libvixl -pthread -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wundef -Wwrite
>      -strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -Wold-style-declaration -Wold-style-definition -Wtype-limits -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wempty-body -Wnested-externs -Wendif-label
>      s -Wexpansion-to-defined -Wimplicit-fallthrough=2 -Wno-missing-include-dirs -Wno-shift-negative-value -Wno-psabi -fstack-protector-strong -fPIE -MD -MQ libqemuutil.a.p/qobject_block-qdict.c.o -MF libqemuutil.a.p/qobject_block-qdict.c.o.d -
>      o libqemuutil.a.p/qobject_block-qdict.c.o -c ../qobject/block-qdict.c

<<< is noise (doesn't provide any value) and could be stripped.

>      In file included from /root/qemu/include/qapi/qmp/qdict.h:16,
>                       from /root/qemu/include/block/qdict.h:13,
>                       from ../qobject/block-qdict.c:11:
>      /root/qemu/include/qapi/qmp/qobject.h: In function ‘qdict_array_split’:
>      /root/qemu/include/qapi/qmp/qobject.h:49:17: error: ‘subqdict’ may be used uninitialized [-Werror=maybe-uninitialized]
>         49 |     typeof(obj) _obj = (obj);                                   \
>            |                 ^~~~
>      ../qobject/block-qdict.c:227:16: note: ‘subqdict’ declared here
>        227 |         QDict *subqdict;
>            |                ^~~~~~~~
>      cc1: all warnings being treated as errors
> 
> Fix build failure by expanding the ternary operation.
> Tested with `make check-unit` (the check-block-qdict test passed).
> 
> Signed-off-by: Murilo Opsfelder Araujo <muriloo@linux.ibm.com>
> Cc: Kevin Wolf <kwolf@redhat.com>
> Cc: Hanna Reitz <hreitz@redhat.com>
> Cc: Markus Armbruster <armbru@redhat.com>
> ---
> v1: https://lists.nongnu.org/archive/html/qemu-devel/2022-03/msg03224.html
> 
>   qobject/block-qdict.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/qobject/block-qdict.c b/qobject/block-qdict.c
> index 1487cc5dd8..4a83bda2c3 100644
> --- a/qobject/block-qdict.c
> +++ b/qobject/block-qdict.c
> @@ -251,12 +251,12 @@ void qdict_array_split(QDict *src, QList **dst)
>           if (is_subqdict) {
>               qdict_extract_subqdict(src, &subqdict, prefix);
>               assert(qdict_size(subqdict) > 0);
> +            qlist_append_obj(*dst, QOBJECT(subqdict));
>           } else {
>               qobject_ref(subqobj);
>               qdict_del(src, indexstr);
> +            qlist_append_obj(*dst, subqobj);
>           }
> -
> -        qlist_append_obj(*dst, subqobj ?: QOBJECT(subqdict));
>       }
>   }
>   



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2] block-qdict: Fix -Werror=maybe-uninitialized build failure
  2022-03-14 13:47 ` Philippe Mathieu-Daudé
@ 2022-03-15 17:43   ` Murilo Opsfelder Araújo
  2022-03-16 14:52     ` Markus Armbruster
  0 siblings, 1 reply; 6+ messages in thread
From: Murilo Opsfelder Araújo @ 2022-03-15 17:43 UTC (permalink / raw)
  To: qemu-devel
  Cc: Kevin Wolf, Hanna Reitz, Philippe Mathieu-Daudé,
	Markus Armbruster, qemu-block

Hi, Philippe.

On Monday, March 14, 2022 10:47:11 AM -03 Philippe Mathieu-Daudé wrote:
> On 11/3/22 23:16, Murilo Opsfelder Araujo wrote:
> > Building QEMU on Fedora 37 (Rawhide Prerelease) ppc64le failed with the
> > following error:
> >
> >      $ ../configure --prefix=/usr/local/qemu-disabletcg --target-list=ppc-softmmu,ppc64-softmmu --disable-tcg --disable-linux-user
> >      ...
> >      $ make -j$(nproc)
> >      ...
> >      FAILED: libqemuutil.a.p/qobject_block-qdict.c.o
>
> This part >>>
>
> >      cc -m64 -mlittle-endian -Ilibqemuutil.a.p -I. -I.. -Isubprojects/libvhost-user -I../subprojects/libvhost-user -Iqapi -Itrace -Iui -Iui/shader -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/sysprof-4 -I/usr/include/lib
> >      mount -I/usr/include/blkid -I/usr/include/gio-unix-2.0 -I/usr/include/p11-kit-1 -I/usr/include/pixman-1 -fdiagnostics-color=auto -Wall -Winvalid-pch -Werror -std=gnu11 -O2 -g -isystem /root/qemu/linux-headers -isystem linux-headers -iquote
> >       . -iquote /root/qemu -iquote /root/qemu/include -iquote /root/qemu/disas/libvixl -pthread -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wundef -Wwrite
> >      -strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -Wold-style-declaration -Wold-style-definition -Wtype-limits -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wempty-body -Wnested-externs -Wendif-label
> >      s -Wexpansion-to-defined -Wimplicit-fallthrough=2 -Wno-missing-include-dirs -Wno-shift-negative-value -Wno-psabi -fstack-protector-strong -fPIE -MD -MQ libqemuutil.a.p/qobject_block-qdict.c.o -MF libqemuutil.a.p/qobject_block-qdict.c.o.d -
> >      o libqemuutil.a.p/qobject_block-qdict.c.o -c ../qobject/block-qdict.c
>
> <<< is noise (doesn't provide any value) and could be stripped.

Is this something the committer/maintainer could edit when applying the commit
or do you need I resend the v3?

Cheers!

>
> >      In file included from /root/qemu/include/qapi/qmp/qdict.h:16,
> >                       from /root/qemu/include/block/qdict.h:13,
> >                       from ../qobject/block-qdict.c:11:
> >      /root/qemu/include/qapi/qmp/qobject.h: In function ‘qdict_array_split’:
> >      /root/qemu/include/qapi/qmp/qobject.h:49:17: error: ‘subqdict’ may be used uninitialized [-Werror=maybe-uninitialized]
> >         49 |     typeof(obj) _obj = (obj);                                   \
> >            |                 ^~~~
> >      ../qobject/block-qdict.c:227:16: note: ‘subqdict’ declared here
> >        227 |         QDict *subqdict;
> >            |                ^~~~~~~~
> >      cc1: all warnings being treated as errors
> >
> > Fix build failure by expanding the ternary operation.
> > Tested with `make check-unit` (the check-block-qdict test passed).
> >
> > Signed-off-by: Murilo Opsfelder Araujo <muriloo@linux.ibm.com>
> > Cc: Kevin Wolf <kwolf@redhat.com>
> > Cc: Hanna Reitz <hreitz@redhat.com>
> > Cc: Markus Armbruster <armbru@redhat.com>
> > ---
> > v1: https://lists.nongnu.org/archive/html/qemu-devel/2022-03/msg03224.html
> >
> >   qobject/block-qdict.c | 4 ++--
> >   1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/qobject/block-qdict.c b/qobject/block-qdict.c
> > index 1487cc5dd8..4a83bda2c3 100644
> > --- a/qobject/block-qdict.c
> > +++ b/qobject/block-qdict.c
> > @@ -251,12 +251,12 @@ void qdict_array_split(QDict *src, QList **dst)
> >           if (is_subqdict) {
> >               qdict_extract_subqdict(src, &subqdict, prefix);
> >               assert(qdict_size(subqdict) > 0);
> > +            qlist_append_obj(*dst, QOBJECT(subqdict));
> >           } else {
> >               qobject_ref(subqobj);
> >               qdict_del(src, indexstr);
> > +            qlist_append_obj(*dst, subqobj);
> >           }
> > -
> > -        qlist_append_obj(*dst, subqobj ?: QOBJECT(subqdict));
> >       }
> >   }
> >
>
>
>
>

--
Murilo



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2] block-qdict: Fix -Werror=maybe-uninitialized build failure
  2022-03-15 17:43   ` Murilo Opsfelder Araújo
@ 2022-03-16 14:52     ` Markus Armbruster
  2022-03-17 22:57       ` [PATCH-for-7.0 " Philippe Mathieu-Daudé via
  0 siblings, 1 reply; 6+ messages in thread
From: Markus Armbruster @ 2022-03-16 14:52 UTC (permalink / raw)
  To: Murilo Opsfelder Araújo
  Cc: Kevin Wolf, Hanna Reitz, Philippe Mathieu-Daudé,
	qemu-devel, qemu-block

Murilo Opsfelder Araújo <muriloo@linux.ibm.com> writes:

> Hi, Philippe.
>
> On Monday, March 14, 2022 10:47:11 AM -03 Philippe Mathieu-Daudé wrote:
>> On 11/3/22 23:16, Murilo Opsfelder Araujo wrote:
>> > Building QEMU on Fedora 37 (Rawhide Prerelease) ppc64le failed with the
>> > following error:
>> >
>> >      $ ../configure --prefix=/usr/local/qemu-disabletcg --target-list=ppc-softmmu,ppc64-softmmu --disable-tcg --disable-linux-user
>> >      ...
>> >      $ make -j$(nproc)
>> >      ...
>> >      FAILED: libqemuutil.a.p/qobject_block-qdict.c.o
>>
>> This part >>>
>>
>> >      cc -m64 -mlittle-endian -Ilibqemuutil.a.p -I. -I.. -Isubprojects/libvhost-user -I../subprojects/libvhost-user -Iqapi -Itrace -Iui -Iui/shader -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/sysprof-4 -I/usr/include/lib
>> >      mount -I/usr/include/blkid -I/usr/include/gio-unix-2.0 -I/usr/include/p11-kit-1 -I/usr/include/pixman-1 -fdiagnostics-color=auto -Wall -Winvalid-pch -Werror -std=gnu11 -O2 -g -isystem /root/qemu/linux-headers -isystem linux-headers -iquote
>> >       . -iquote /root/qemu -iquote /root/qemu/include -iquote /root/qemu/disas/libvixl -pthread -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wundef -Wwrite
>> >      -strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -Wold-style-declaration -Wold-style-definition -Wtype-limits -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wempty-body -Wnested-externs -Wendif-label
>> >      s -Wexpansion-to-defined -Wimplicit-fallthrough=2 -Wno-missing-include-dirs -Wno-shift-negative-value -Wno-psabi -fstack-protector-strong -fPIE -MD -MQ libqemuutil.a.p/qobject_block-qdict.c.o -MF libqemuutil.a.p/qobject_block-qdict.c.o.d -
>> >      o libqemuutil.a.p/qobject_block-qdict.c.o -c ../qobject/block-qdict.c
>>
>> <<< is noise (doesn't provide any value) and could be stripped.
>
> Is this something the committer/maintainer could edit when applying the commit
> or do you need I resend the v3?
>
> Cheers!

I'll take care of it unless Kevin or Hanna beat me to the punch.



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH-for-7.0 v2] block-qdict: Fix -Werror=maybe-uninitialized build failure
  2022-03-16 14:52     ` Markus Armbruster
@ 2022-03-17 22:57       ` Philippe Mathieu-Daudé via
  0 siblings, 0 replies; 6+ messages in thread
From: Philippe Mathieu-Daudé via @ 2022-03-17 22:57 UTC (permalink / raw)
  To: Markus Armbruster
  Cc: Murilo Opsfelder Araújo, qemu-devel@nongnu.org Developers,
	Kevin Wolf, Hanna Reitz, open list:Block layer core

On Wed, Mar 16, 2022 at 3:52 PM Markus Armbruster <armbru@redhat.com> wrote:
>
> Murilo Opsfelder Araújo <muriloo@linux.ibm.com> writes:
>
> > Hi, Philippe.
> >
> > On Monday, March 14, 2022 10:47:11 AM -03 Philippe Mathieu-Daudé wrote:
> >> On 11/3/22 23:16, Murilo Opsfelder Araujo wrote:
> >> > Building QEMU on Fedora 37 (Rawhide Prerelease) ppc64le failed with the
> >> > following error:
> >> >
> >> >      $ ../configure --prefix=/usr/local/qemu-disabletcg --target-list=ppc-softmmu,ppc64-softmmu --disable-tcg --disable-linux-user
> >> >      ...
> >> >      $ make -j$(nproc)
> >> >      ...
> >> >      FAILED: libqemuutil.a.p/qobject_block-qdict.c.o
> >>
> >> This part >>>
> >>
> >> >      cc -m64 -mlittle-endian -Ilibqemuutil.a.p -I. -I.. -Isubprojects/libvhost-user -I../subprojects/libvhost-user -Iqapi -Itrace -Iui -Iui/shader -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/sysprof-4 -I/usr/include/lib
> >> >      mount -I/usr/include/blkid -I/usr/include/gio-unix-2.0 -I/usr/include/p11-kit-1 -I/usr/include/pixman-1 -fdiagnostics-color=auto -Wall -Winvalid-pch -Werror -std=gnu11 -O2 -g -isystem /root/qemu/linux-headers -isystem linux-headers -iquote
> >> >       . -iquote /root/qemu -iquote /root/qemu/include -iquote /root/qemu/disas/libvixl -pthread -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wundef -Wwrite
> >> >      -strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -Wold-style-declaration -Wold-style-definition -Wtype-limits -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wempty-body -Wnested-externs -Wendif-label
> >> >      s -Wexpansion-to-defined -Wimplicit-fallthrough=2 -Wno-missing-include-dirs -Wno-shift-negative-value -Wno-psabi -fstack-protector-strong -fPIE -MD -MQ libqemuutil.a.p/qobject_block-qdict.c.o -MF libqemuutil.a.p/qobject_block-qdict.c.o.d -
> >> >      o libqemuutil.a.p/qobject_block-qdict.c.o -c ../qobject/block-qdict.c
> >>
> >> <<< is noise (doesn't provide any value) and could be stripped.
> >
> > Is this something the committer/maintainer could edit when applying the commit
> > or do you need I resend the v3?
> >
> > Cheers!
>
> I'll take care of it unless Kevin or Hanna beat me to the punch.

Thanks!

Same error on latest Debian:

include/qapi/qmp/qobject.h: In function 'qdict_array_split':
include/qapi/qmp/qobject.h:49:17: error: 'subqdict' may be used
uninitialized [-Werror=maybe-uninitialized]
   49 |     typeof(obj) _obj = (obj);                                   \
      |                 ^~~~
../qobject/block-qdict.c:227:16: note: 'subqdict' declared here
  227 |         QDict *subqdict;
      |                ^~~~~~~~
cc1: all warnings being treated as errors
FAILED: libqemuutil.a.p/qobject_block-qdict.c.o

Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-03-17 22:58 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-11 22:16 [PATCH v2] block-qdict: Fix -Werror=maybe-uninitialized build failure Murilo Opsfelder Araujo
2022-03-14  9:58 ` Markus Armbruster
2022-03-14 13:47 ` Philippe Mathieu-Daudé
2022-03-15 17:43   ` Murilo Opsfelder Araújo
2022-03-16 14:52     ` Markus Armbruster
2022-03-17 22:57       ` [PATCH-for-7.0 " Philippe Mathieu-Daudé via

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.