From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12993 invoked by alias); 13 Dec 2007 13:29:06 -0000 Received: (qmail 12983 invoked by uid 22791); 13 Dec 2007 13:29:05 -0000 X-Spam-Check-By: sourceware.org Received: from smtpout10-04.prod.mesa1.secureserver.net (HELO smtpout10.prod.mesa1.secureserver.net) (64.202.165.238) by sourceware.org (qpsmtpd/0.31) with SMTP; Thu, 13 Dec 2007 13:28:55 +0000 Received: (qmail 13656 invoked from network); 13 Dec 2007 13:28:53 -0000 Received: from unknown (12.219.155.218) by smtpout10-04.prod.mesa1.secureserver.net (64.202.165.238) with ESMTP; 13 Dec 2007 13:28:53 -0000 Message-ID: <47613393.3060803@starnetworks.us> Date: Thu, 13 Dec 2007 13:29:00 -0000 From: "Kevin P. Fleming" User-Agent: Mozilla-Thunderbird 2.0.0.6 (X11/20071009) MIME-Version: 1.0 To: gcc-help@gcc.gnu.org Subject: Warning from GCC 4.2.x about qualifiers being discarded Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2007-12/txt/msg00259.txt.bz2 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?