AARCH64 gcc error with const qualifiers

aarch64-linux-gnu-gcc on Debian/Sid fails lib compilation with:
lib/aarch64/initplat.c:44:35: error: initialization discards
‘const’ qualifier from pointer target type
[-Werror=discarded-qualifiers].  This patch fixes it.

Signed-off-by: Pete Batard <pete@akeo.ie>
Signed-off-by: Nigel Croxon <noxorc@users.sf.net>
This commit is contained in:
Nigel Croxon 2016-11-21 10:55:10 -05:00
parent b14cc9cb4f
commit 8071303f52
1 changed files with 2 additions and 1 deletions

View File

@ -41,7 +41,8 @@ void *memset(void *s, int c, __SIZE_TYPE__ n)
void *memcpy(void *dest, const void *src, __SIZE_TYPE__ n)
{
unsigned char *p = dest, *q = src;
const unsigned char *q = src;
unsigned char *p = dest;
while (n--)
*p++ = *q++;