Re: [PATCH] Silence a const vs non-const warning

From: Mitchell Blank Jr
Date: Mon Apr 03 2006 - 08:11:24 EST


Jan-Benedict Glaw wrote:
> This patch silences a const vs. non-const warning issued by very
> recent GCC versions:
>
> $ vax-linux-uclibc-gcc -v 2>&1 | grep version
[...]
> void *memcpy(void *dest, const void *src, size_t count)
> {
> char *tmp = dest;
> - char *s = src;
> + const char *s = src;

Actually the compiler version has nothing to do with it -- I'm pretty
sure even gcc 2.X would warn on that. The actual reason that most people
don't see that is that an arch w/o __HAVE_ARCH_MEMCPY is pretty rare.

Still, no reason for the reference C version of that function to emit
a warning, so it's worth fixing.

-Mitch
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/