opensbi
opensbi copied to clipboard
Getting compilation error on generic firmware
Getting a compilation error when compilign with clang (used command make PLATFORM=generic PLATFORM_RISCV_XLEN=64 LLVM=1
:
opensbi/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;
~~ ^ ~~
1 error generated.
Easily fixed with removing the -Werror
flag but its a pain in the ass. Using clang14 as the compiler.