qemu-arm
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-arm] [Qemu-devel] [PATCH 0/7] ARM: implement MPS2 board (with


From: Peter Maydell
Subject: Re: [Qemu-arm] [Qemu-devel] [PATCH 0/7] ARM: implement MPS2 board (with 2 FPGA flavours)
Date: Tue, 11 Jul 2017 13:51:46 +0100

On 11 July 2017 at 13:46,  <address@hidden> wrote:
> /var/tmp/patchew-tester-tmp-e38by36j/src/hw/char/cmsdk-apb-uart.c: In 
> function ‘uart_read’:
> /var/tmp/patchew-tester-tmp-e38by36j/src/hw/char/cmsdk-apb-uart.c:164:20: 
> error: array subscript is above array bounds [-Werror=array-bounds]
>          r = uart_id[offset / 4 - A_PID4];
>              ~~~~~~~^~~~~~~~~~~~~~~~~~~~~
> cc1: all warnings being treated as errors
> /var/tmp/patchew-tester-tmp-e38by36j/src/rules.mak:66: recipe for target 
> 'hw/char/cmsdk-apb-uart.o' failed
> make: *** [hw/char/cmsdk-apb-uart.o] Error 1
> make: *** Waiting for unfinished jobs....

The compiler is correct here -- should be (offset - A_PID4) / 4,
since the A_* values are the register offsets and all multiples of 4.

thanks
-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]