From owner-freebsd-current Thu Jan 28 01:15:57 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id BAA12793 for freebsd-current-outgoing; Thu, 28 Jan 1999 01:15:57 -0800 (PST) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from apollo.backplane.com (apollo.backplane.com [209.157.86.2]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id BAA12781 for ; Thu, 28 Jan 1999 01:15:55 -0800 (PST) (envelope-from dillon@apollo.backplane.com) Received: (from dillon@localhost) by apollo.backplane.com (8.9.2/8.9.1) id BAA02632; Thu, 28 Jan 1999 01:15:54 -0800 (PST) (envelope-from dillon) Date: Thu, 28 Jan 1999 01:15:54 -0800 (PST) From: Matthew Dillon Message-Id: <199901280915.BAA02632@apollo.backplane.com> To: Julian Elischer Cc: current@FreeBSD.ORG Subject: Re: -Wall -Wcast-qual and SYSINIT References: Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG :On Thu, 28 Jan 1999, Matthew Dillon wrote: : :OK I understand now.. :theoretically I guess you should have two types of SYSINIT, :however you are already not able to check the TYPE of the argument due to :it being passed through the void form, so losing the 'const'-ness is not :that much of a loss. The pragmetic answer may just be to 'cast' in the :macro. I'd kinda like to keep the const-ness because I can see device drivers putting static structures in const ( i.e. read-only TEXT ) space and would like to have the safety factor of knowing that they aren't actually modified - not just not modified by the initialization routine, but also not modified later on in the device driver code. But I also want to eventually quiet the warning -- I agree that for SYSINIT's, loosing const is not a huge issue. Quieting the warning without fixing the problem with -Wcast-qual enabled is not pretty, though. I think -Wcast-qual is pretty important if we intend to fix the volatile conversion mess. -Matt Matthew Dillon To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message