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: d254189b38 ("2002-07-23  Jeff Johnston  <jjohnstn@redhat.com>")
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
Corinna Vinschen 2024-01-19 11:28:11 +01:00
parent 29ec33360d
commit 422c4f0451
1 changed files with 2 additions and 2 deletions

View File

@ -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--)