|
From: | Richard Henderson |
Subject: | Re: [RFC PATCH v7 19/29] hw/intc: Add LoongArch extioi interrupt controller(EIOINTC) |
Date: | Mon, 28 Mar 2022 16:46:27 -0600 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 |
On 3/28/22 06:57, Xiaojuan Yang wrote:
+static uint64_t extioi_ipmap_enable_read(void *opaque, hwaddr addr, + unsigned size) +{ + LoongArchExtIOI *s = LOONGARCH_EXTIOI(opaque); + uint8_t ret; + + switch (addr) { + case EXTIOI_IPMAP_START ... EXTIOI_IPMAP_END - 1: + ret = s->ipmap[addr]; + break; + case EXTIOI_ENABLE_START ... EXTIOI_ENABLE_END - 1: + addr -= EXTIOI_ENABLE_START; + ret = s->enable[addr]; + break; + default: + break; + } + + trace_loongarch_extioi_ipmap_enable_read((uint8_t)addr, ret); + return ret; +}
There are at least 4 instances of uninitialized use of 'ret' in this file, and this is one. Are you compiling with --disable-werror? You must not do that.
r~
[Prev in Thread] | Current Thread | [Next in Thread] |