[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug 1874073] Re: openrisc_sim.c:87:42: error: 'cpu_irqs[0]' may be used
From: |
Martin Liska |
Subject: |
[Bug 1874073] Re: openrisc_sim.c:87:42: error: 'cpu_irqs[0]' may be used uninitialized in this function [-Werror=maybe-uninitialized] |
Date: |
Tue, 21 Apr 2020 14:08:27 -0000 |
Note that our -Wmaybe-uninitialized warnings tends to report false positives.
We have a rich meta bug for it:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=24639
That's why it can't prove the variable is initialized in all possible
execution paths.
** Bug watch added: GCC Bugzilla #24639
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=24639
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1874073
Title:
openrisc_sim.c:87:42: error: 'cpu_irqs[0]' may be used uninitialized
in this function [-Werror=maybe-uninitialized]
Status in QEMU:
New
Bug description:
I see the warning since gcc10:
static void openrisc_sim_init(MachineState *machine):
...
qemu_irq *cpu_irqs[2];
...
serial_mm_init(get_system_memory(), 0x90000000, 0, serial_irq,
115200, serial_hd(0), DEVICE_NATIVE_ENDIAN);
I would initialize cpu_irqs[2] with {}.
To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1874073/+subscriptions