On 24 February 2017 at 14:29, Alex Bennée <alex.ben...@linaro.org> wrote: > > Peter Maydell <peter.mayd...@linaro.org> writes: > >> The SysTick timer isn't really part of the NVIC proper; >> we just modelled it that way back when we couldn't >> easily have devices that only occupied a small chunk >> of a memory region. Split it out into its own device. >> >> Signed-off-by: Peter Maydell <peter.mayd...@linaro.org>
>> + default: >> + qemu_log_mask(LOG_GUEST_ERROR, >> + "SysTick: Bad read offset 0x%" HWADDR_PRIx "\n", >> addr); >> + break; >> + } >> + >> + trace_systick_read(addr, val, size); > > I'm getting the compiler complain: > > hw/timer/armv7m_systick.c: In function ‘systick_read’: > hw/timer/armv7m_systick.c:81:14: error: ‘val’ may be used uninitialized in > this function [-Werror=maybe-uninitialized] > uint32_t val; > ^ > cc1: all warnings being treated as errors > > I suspect the trace function could pick up garbage if we take the > GUEST_ERROR leg and default out.... Indeed, missing 'val = 0;' in the default case. thanks -- PMM