Warning from GCC 4.2.x about qualifiers being discarded

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

 



In recent versions of GCC (tested just now with GCC 4.2.2), compiling
Zaptel 1.4 kernel modules generates a number of warnings like this:

warning: passing argument 3 of 'pci_free_consistent' discards qualifiers
from pointer target type

This happens when a 'volatile unsigned char *' is passed to the 'void *'
argument of pci_free_consistent(). Even adding explicit casts to
'unsigned char *' or 'void *' does not eliminate this warning.

In GCC 4.2.3 prerelease (as packaged by Debian unstable), this occurs
with calls to memset() on these pointers as well.

I'm not really sure there's much we can do about this; the pointer
*does* point to volatile memory, and it's not really reasonable to have
to provide our own version of memset() just to avoid this warning, is it?

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux