summaryrefslogtreecommitdiffstats
path: root/include/hw/misc/max111x.h
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé2021-03-18 17:30:59 +0100
committerPaolo Bonzini2021-03-19 13:48:18 +0100
commit52ad57a9b68e215c4f5fa2cfd2412132b522bff5 (patch)
tree0daca6458f040dbc727b575b1b345b18e5d43670 /include/hw/misc/max111x.h
parenti386: Make migration fail when Hyper-V reenlightenment was enabled but 'user_... (diff)
downloadqemu-52ad57a9b68e215c4f5fa2cfd2412132b522bff5.tar.gz
qemu-52ad57a9b68e215c4f5fa2cfd2412132b522bff5.tar.xz
qemu-52ad57a9b68e215c4f5fa2cfd2412132b522bff5.zip
hw/intc/i8259: Refactor pic_read_irq() to avoid uninitialized variable
Some compiler versions are smart enough to detect a potentially uninitialized variable, but are not smart enough to detect that this cannot happen due to the code flow: ../hw/intc/i8259.c: In function ‘pic_read_irq’: ../hw/intc/i8259.c:203:13: error: ‘irq2’ may be used uninitialized in this function [-Werror=maybe-uninitialized] 203 | irq = irq2 + 8; | ~~~~^~~~~~~~~~ Restrict irq2 variable use to the inner statement. Fixes: 78ef2b6989f ("i8259: Reorder intack in pic_read_irq") Reported-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20210318163059.3686596-1-philmd@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'include/hw/misc/max111x.h')
0 files changed, 0 insertions, 0 deletions