mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Paul Jackson <pj@sgi.com>
To: Andrew Morton <akpm@osdl.org>
Cc: Paul Jackson <pj@sgi.com>,
	linux-kernel@vger.kernel.org, Jesper Juhl <jesper.juhl@gmail.com>
Subject: [PATCH] lib stringc cleanup restore useful memmove const
Date: Tue, 25 Oct 2005 07:16:29 -0700 (PDT)	[thread overview]
Message-ID: <20051025141629.21880.42486.sendpatchset@jackhammer.engr.sgi.com> (raw)

A couple of (char *) casts removed in a previous cleanup patch
in lib/string.c:memmove() were actually useful, as they
suppressed a couple of warnings:

	assignment discards qualifiers from pointer target type        

Fix by declaring the local variable const in the first place,
so casts aren't needed to strip the const qualifier.

Signed-off-by: Paul Jackson <pj@sgi.com>

---

 lib/string.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletion(-)

--- 2.6.14-rc4-mm1-cpuset-patches.orig/lib/string.c	2005-10-17 23:01:05.974858400 -0700
+++ 2.6.14-rc4-mm1-cpuset-patches/lib/string.c	2005-10-25 06:49:42.921723168 -0700
@@ -488,7 +488,8 @@ EXPORT_SYMBOL(memcpy);
  */
 void *memmove(void *dest, const void *src, size_t count)
 {
-	char *tmp, *s;
+	char *tmp;
+	const char *s;
 
 	if (dest <= src) {
 		tmp = dest;

-- 
                          I won't rest till it's the best ...
                          Programmer, Linux Scalability
                          Paul Jackson <pj@sgi.com> 1.650.933.1373

             reply	other threads:[~2005-10-25 14:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-25 14:16 Paul Jackson [this message]
2005-10-25 17:47 ` Jesper Juhl

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=20051025141629.21880.42486.sendpatchset@jackhammer.engr.sgi.com \
    --to=pj@sgi.com \
    --cc=akpm@osdl.org \
    --cc=jesper.juhl@gmail.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome