From owner-cvs-all Wed Feb 27 3:56:30 2002 Delivered-To: cvs-all@freebsd.org Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by hub.freebsd.org (Postfix) with ESMTP id 9ABB837B402; Wed, 27 Feb 2002 03:56:21 -0800 (PST) Received: from bde.zeta.org.au (bde.zeta.org.au [203.2.228.102]) by mailman.zeta.org.au (8.9.3/8.8.7) with ESMTP id WAA32618; Wed, 27 Feb 2002 22:56:09 +1100 Date: Wed, 27 Feb 2002 22:56:38 +1100 (EST) From: Bruce Evans X-X-Sender: To: Mikhail Teterin Cc: , , Subject: Re: cvs commit: src/sys/dev/awi if_awi_pccard.c In-Reply-To: <200202262044.g1QKigX25029@aldan.algebra.com> Message-ID: <20020227224407.P48555-100000@gamplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Tue, 26 Feb 2002, Mikhail Teterin wrote: > On 26 Feb, Brooks Davis wrote: > > brooks 2002/02/26 12:09:19 PST > > > > Modified files: > > sys/dev/awi if_awi_pccard.c > > Log: > > Set ifp->if_name to "awi" instead of device_get_name(dev) to avoid > > casting away a const qualifier so the awi driver compiles. > > Is not this workaround an indication, that device_get_name(dev) should > be returning ``const char*''? This an indication that if_name should have type "const char *", and that we don't have -Wwrite-strings turned on for the kernel yet. device_get_name(dev) already returns "const char *". The change should have no effect on the warning, but "works" because -Wwrite-strings is not turned on so the compiler can't see that "awi" also has type "const char *". We are a long way from having a const-clean kernel, due to the missing -Wwrite-strings and missing consts at strategic places (mainly at syscall entry points). Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message