Skip to content

Commit f3375af

Browse files
rbbrnsfabiobaltieri
authored andcommitted
cbprintf: Remove unnecessary downcast
Downcast from const void* to void* is unnecessary since the signature of memcpy expects a const in second param. This downcast will raise a compile error when -Werror=cast-qual is on. Signed-off-by: Rob Barnes <[email protected]>
1 parent eedab17 commit f3375af

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/zephyr/sys/cbprintf.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,7 @@ static inline int z_cbprintf_cpy(const void *buf, size_t len, void *ctx)
484484
return -ENOSPC;
485485
}
486486

487-
memcpy(&((uint8_t *)desc->buf)[desc->off], (void *)buf, len);
487+
memcpy(&((uint8_t *)desc->buf)[desc->off], buf, len);
488488
desc->off += len;
489489

490490
return len;

0 commit comments

Comments
 (0)