From 5c3d03cee46c806299fb73ebe538d72e2fb0df82 Mon Sep 17 00:00:00 2001 From: Konstantin Kondrashov Date: Mon, 25 Aug 2025 12:55:39 +0300 Subject: [PATCH] fix(newlib): Fixes Coverity issues --- components/newlib/src/port/riscv/strcpy.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/components/newlib/src/port/riscv/strcpy.c b/components/newlib/src/port/riscv/strcpy.c index 1884218729..76bda0d390 100644 --- a/components/newlib/src/port/riscv/strcpy.c +++ b/components/newlib/src/port/riscv/strcpy.c @@ -23,6 +23,7 @@ __attribute__((always_inline)) static inline unsigned long __newlib__libc_detect_null(unsigned long w) { + /* coverity[result_independent_of_operands] */ unsigned long mask = 0x7f7f7f7f; if (sizeof(long) == 8) { mask = ((mask << 16) << 16) | mask; @@ -87,6 +88,7 @@ out: return dst0; } + /* coverity[unreachable] */ char ch; do { ch = *src;