Skip to content

Commit 5c3d03c

Browse files
fix(newlib): Fixes Coverity issues
1 parent 5c97f96 commit 5c3d03c

File tree

1 file changed

+2
-0
lines changed
  • components/newlib/src/port/riscv

1 file changed

+2
-0
lines changed

components/newlib/src/port/riscv/strcpy.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ __attribute__((always_inline))
2323
static inline
2424
unsigned long __newlib__libc_detect_null(unsigned long w)
2525
{
26+
/* coverity[result_independent_of_operands] */
2627
unsigned long mask = 0x7f7f7f7f;
2728
if (sizeof(long) == 8) {
2829
mask = ((mask << 16) << 16) | mask;
@@ -87,6 +88,7 @@ char *strcpy(char *dst, const char *src)
8788
return dst0;
8889
}
8990

91+
/* coverity[unreachable] */
9092
char ch;
9193
do {
9294
ch = *src;

0 commit comments

Comments
 (0)