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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux