public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Warning from GCC 4.2.x about qualifiers being discarded
@ 2007-12-13 13:29 Kevin P. Fleming
  0 siblings, 0 replies; only message in thread
From: Kevin P. Fleming @ 2007-12-13 13:29 UTC (permalink / raw)
  To: gcc-help

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?

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-12-13 13:29 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-12-13 13:29 Warning from GCC 4.2.x about qualifiers being discarded Kevin P. Fleming

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).