[PATCH v2] lib: utils/serial: Fix semihosting compile error using LLVM
Bin Meng
bmeng.cn at gmail.com
Mon Nov 14 08:09:44 PST 2022
On Tue, Nov 8, 2022 at 8:12 PM Anup Patel <apatel at ventanamicro.com> wrote:
>
> We fix the following semihosting compile error observed using LLVM:
> lib/utils/serial/semihosting.c:158:12: error: result of comparison of constant -1 with expression of type 'char' is always true [-Werror,-Wtautological-constant-out-of-range-compare]
> ret = ch > -1 ? ch : -1;
> ~~ ^ ~~
>
> Fixes: 7f09fba86e43 ("lib: utils/serial: add semihosting support")
> Signed-off-by: Anup Patel <apatel at ventanamicro.com>
> ---
> lib/utils/serial/semihosting.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
Reviewed-by: Bin Meng <bmeng at tinylab.org>
More information about the opensbi
mailing list