From: Jan-Benedict Glaw <jbglaw@lug-owl.de>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] Silence a const vs non-const warning
Date: Mon, 3 Apr 2006 13:21:07 +0200 [thread overview]
Message-ID: <20060403112107.GQ1259@lug-owl.de> (raw)
[-- Attachment #1: Type: text/plain, Size: 1199 bytes --]
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 <jbglaw@lug-owl.de>
----
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 jbglaw@lug-owl.de . +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 #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
next reply other threads:[~2006-04-03 11:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-03 11:21 Jan-Benedict Glaw [this message]
2006-04-03 12:15 ` [PATCH] Silence a const vs non-const warning Mitchell Blank Jr
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060403112107.GQ1259@lug-owl.de \
--to=jbglaw@lug-owl.de \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.