lib: fix pointer of type 'void *' used in arithmetic
authorJukka Laitinen <jukka.laitinen@iki.fi>
Wed, 19 Jan 2022 09:20:17 +0000 (11:20 +0200)
committerAnup Patel <anup@brainfault.org>
Fri, 21 Jan 2022 16:28:12 +0000 (21:58 +0530)
commit5d025eb2353550eadbd2fa9b8083a92fe9b07bd9
treed894553a47e62e5224780e2836a4648bc778c9e8
parentfb688d9e9d4099d6945c9e460b9cd2c8c4d8a29b
lib: fix pointer of type 'void *' used in arithmetic

Using "void *" in arithmetic causes errors with strict compiler settings:
"error: pointer of type 'void *' used in arithmetic [-Werror=pointer-arith]"

Avoid these by calculating on "char *" where 1-byte data size is assumed.

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
Reviewed-by: Dong Du <Dd_nirvana@sjtu.edu.cn>
Reviewed-by: Xiang W <wxjstz@126.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
13 files changed:
include/sbi/sbi_scratch.h
lib/sbi/sbi_fifo.c
lib/sbi/sbi_string.c
lib/utils/i2c/fdt_i2c_sifive.c
lib/utils/irqchip/fdt_irqchip_plic.c
lib/utils/irqchip/plic.c
lib/utils/reset/fdt_reset_sunxi_wdt.c
lib/utils/reset/fdt_reset_thead.c
lib/utils/serial/gaisler-uart.c
lib/utils/serial/shakti-uart.c
lib/utils/serial/sifive-uart.c
lib/utils/serial/uart8250.c
lib/utils/timer/aclint_mtimer.c