From: Jan-Benedict Glaw Date: Tue, 11 Apr 2006 05:54:09 +0000 (-0700) Subject: [PATCH] Silence a const vs non-const warning X-Git-Tag: v2.6.17-rc2~196 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4c416ab71164dc8d3f800a942fb18c4e67f67897;p=linux-2.6 [PATCH] Silence a const vs non-const warning lib/string.c: In function 'memcpy': lib/string.c:470: warning: initialization discards qualifiers from pointer = target type Signed-off-by: Jan-Benedict Glaw Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/lib/string.c b/lib/string.c index 7be6f0a87e..064f6315b1 100644 --- a/lib/string.c +++ b/lib/string.c @@ -470,7 +470,7 @@ EXPORT_SYMBOL(memset); void *memcpy(void *dest, const void *src, size_t count) { char *tmp = dest; - char *s = src; + const char *s = src; while (count--) *tmp++ = *s++;