[PATCH 0/4] Fix Coverity Scan warnings

Jacob Garber jgarber1 at ualberta.ca
Fri Aug 9 16:13:56 PDT 2019


coreboot does weekly scans of its codebase and related third-party
projects using the Coverity static-analysis tool. OpenSBI support was
recently added to coreboot, and several Coverity warnings were flagged
in the most recent scan. Some of the warnings were false-positives, but
a few look like actual bugs. Here are fixes for them.

Jacob Garber (4):
  lib: Use bitwise & instead of boolean &&
  lib: Use correct type for return value
  lib: Prevent unintended sign extensions
  lib: Correct null pointer check

 lib/sbi/sbi_fifo.c       | 5 +++--
 lib/sbi/sbi_hart.c       | 2 +-
 lib/sbi/sbi_tlb.c        | 2 +-
 lib/utils/irqchip/plic.c | 2 +-
 4 files changed, 6 insertions(+), 5 deletions(-)

-- 
2.22.0




More information about the opensbi mailing list