public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Kevin P. Fleming" <kpfleming@starnetworks.us>
To: gcc-help@gcc.gnu.org
Subject: Warning from GCC 4.2.x about qualifiers being discarded
Date: Thu, 13 Dec 2007 13:29:00 -0000	[thread overview]
Message-ID: <47613393.3060803@starnetworks.us> (raw)

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?

                 reply	other threads:[~2007-12-13 13:29 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=47613393.3060803@starnetworks.us \
    --to=kpfleming@starnetworks.us \
    --cc=gcc-help@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).