[PATCH] Fix pointer of type 'void *' used in arithmetic

Bin Meng bmeng.cn at gmail.com
Wed Jan 12 22:09:21 PST 2022


On Wed, Jan 12, 2022 at 3:50 PM Jukka Laitinen <jukka.laitinen at iki.fi> wrote:
>
> Using "void *" in arithmetic causes errors with strict compiler settings:
> "error: pointer of type 'void *' used in arithmetic [-Werror=pointer-arith]"
>
> Just remove these by calculating on "char *" where 1-byte data size is assumed

Missing SoB tag

> ---
>  include/sbi/sbi_scratch.h       | 4 ++--
>  lib/sbi/sbi_fifo.c              | 6 +++---
>  lib/sbi/sbi_string.c            | 4 ++--
>  lib/utils/irqchip/plic.c        | 8 ++++----
>  lib/utils/timer/aclint_mtimer.c | 2 +-
>  5 files changed, 12 insertions(+), 12 deletions(-)
>

Regards,
Bin



More information about the opensbi mailing list