Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/newlib
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2024-01-19 13:28:11 +0300
committerCorinna Vinschen <corinna@vinschen.de>2024-01-19 13:51:01 +0300
commit422c4f0451ccaff9aa38ee86d5d860f41c7bf9ef (patch)
tree5ff5f31576e3fcf3359b85618e4e51f55133ac14 /newlib
parent29ec33360da9171f1df27ef59ea4576fda4065ff (diff)
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')
-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 6757cb34c..d6b2f8bea 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--)