Hi! This patch silences a const vs. non-const warning issued by very recent GCC versions: $ vax-linux-uclibc-gcc -v 2>&1 | grep version gcc version 4.2.0 20060331 (experimental) $ make CROSS_COMPILE=vax-linux-uclibc- ARCH=vax mopboot [...] CC lib/string.o lib/string.c: In function 'memcpy': lib/string.c:470: warning: initialization discards qualifiers from pointer target type [...] Signed-off-by: Jan-Benedict Glaw <[email protected]> ---- string.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/string.c b/lib/string.c index b3c28a3..dd2bfdd 100644 --- a/lib/string.c +++ b/lib/string.c @@ -467,7 +467,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++; -- Jan-Benedict Glaw [email protected] . +49-172-7608481 _ O _ "Eine Freie Meinung in einem Freien Kopf | Gegen Zensur | Gegen Krieg _ _ O für einen Freien Staat voll Freier Bürger" | im Internet! | im Irak! O O O ret = do_actions((curr | FREE_SPEECH) & ~(NEW_COPYRIGHT_LAW | DRM | TCPA));
Attachment:
signature.asc
Description: Digital signature
- Follow-Ups:
- Re: [PATCH] Silence a const vs non-const warning
- From: Mitchell Blank Jr <[email protected]>
- Re: [PATCH] Silence a const vs non-const warning
- Prev by Date: Re: Linux research projects
- Next by Date: [PATCH 2.6.17-rc1] [SERIAL] DCC(JTAG) serial and the console emulation support(revised#2)
- Previous by thread: out of memory
- Next by thread: Re: [PATCH] Silence a const vs non-const warning
- Index(es):