Skip to content

Builds only with warnings #3

@mchack-work

Description

@mchack-work

With a modern C compiler we get warnings when building qemu but not originating from our code.

The only way to build is to:

../configure --target-list=riscv32-softmmu --disable-werror

So that warnings are not treated as errors. These warnings are possibly already fixed upstream so maybe update here?

FAILED: libqemuutil.a.p/qobject_block-qdict.c.o 
cc -m64 -mcx16 -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/lib/glib-2.0/include -I/usr/include/sysprof-4 -I/usr/include/libmount -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 /home/mc/tillitis/git/qemu/linux-headers -isystem linux-headers -iquote . -iquote /home/mc/tillitis/git/qemu -iquote /home/mc/tillitis/git/qemu/include -iquote /home/mc/tillitis/git/qemu/disas/libvixl -iquote /home/mc/tillitis/git/qemu/tcg/i386 -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-labels -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 /home/mc/tillitis/git/qemu/include/qapi/qmp/qdict.h:16,
                 from /home/mc/tillitis/git/qemu/include/block/qdict.h:13,
                 from ../qobject/block-qdict.c:11:
/home/mc/tillitis/git/qemu/include/qapi/qmp/qobject.h: In function ‘qdict_array_split’:
/home/mc/tillitis/git/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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions