aboutsummaryrefslogtreecommitdiff
path: root/newlib/libc/string
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2024-01-19 11:28:11 +0100
committerCorinna Vinschen <corinna@vinschen.de>2024-01-19 11:51:01 +0100
commit422c4f0451ccaff9aa38ee86d5d860f41c7bf9ef (patch)
tree5ff5f31576e3fcf3359b85618e4e51f55133ac14 /newlib/libc/string
parent29ec33360da9171f1df27ef59ea4576fda4065ff (diff)
downloadnewlib-422c4f0451ccaff9aa38ee86d5d860f41c7bf9ef.zip
newlib-422c4f0451ccaff9aa38ee86d5d860f41c7bf9ef.tar.gz
newlib-422c4f0451ccaff9aa38ee86d5d860f41c7bf9ef.tar.bz2
memccpy: fix pointer assignment
The local vars dst and src are unsigned pointers, but two assignments cast their value to signed explicitely. This results in the warning "pointer targets in assignment from ‘char *’ to ‘unsigned char *’ differ in signedness [-Wpointer-sign]" in case of -Wall. Fix the cast. Fixes: d254189b38bb ("2002-07-23 Jeff Johnston <jjohnstn@redhat.com>") Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Diffstat (limited to 'newlib/libc/string')
-rw-r--r--newlib/libc/string/memccpy.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/newlib/libc/string/memccpy.c b/newlib/libc/string/memccpy.c
index 6757cb3..d6b2f8b 100644
--- a/newlib/libc/string/memccpy.c
+++ b/newlib/libc/string/memccpy.c
@@ -118,8 +118,8 @@ memccpy (void *__restrict dst0,
}
/* Pick up any residual with a byte copier. */
- dst = (char*)aligned_dst;
- src = (char*)aligned_src;
+ dst = (unsigned char*)aligned_dst;
+ src = (unsigned char*)aligned_src;
}
while (len0--)