Merge branch 'fix/coverity_newlib' into 'master'

fix(newlib): Fixes Coverity issues

Closes IDF-13926 and IDF-13927

See merge request espressif/esp-idf!41491
This commit is contained in:
Konstantin Kondrashov
2025-09-19 10:35:34 +08:00

View File

@@ -23,6 +23,7 @@ __attribute__((always_inline))
static inline static inline
unsigned long __newlib__libc_detect_null(unsigned long w) unsigned long __newlib__libc_detect_null(unsigned long w)
{ {
/* coverity[result_independent_of_operands] */
unsigned long mask = 0x7f7f7f7f; unsigned long mask = 0x7f7f7f7f;
if (sizeof(long) == 8) { if (sizeof(long) == 8) {
mask = ((mask << 16) << 16) | mask; mask = ((mask << 16) << 16) | mask;
@@ -87,6 +88,7 @@ out:
return dst0; return dst0;
} }
/* coverity[unreachable] */
char ch; char ch;
do { do {
ch = *src; ch = *src;