Messages in this thread Patch in this message | | | Date | Tue, 25 Oct 2005 07:16:29 -0700 (PDT) | From | Paul Jackson <> | Subject | [PATCH] lib stringc cleanup restore useful memmove const |
| |
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 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |