Date: Wed, 27 Feb 2002 22:56:38 +1100 (EST) From: Bruce Evans <bde@zeta.org.au> To: Mikhail Teterin <mi@aldan.algebra.com> Cc: <brooks@FreeBSD.org>, <cvs-committers@FreeBSD.org>, <cvs-all@FreeBSD.org> Subject: Re: cvs commit: src/sys/dev/awi if_awi_pccard.c Message-ID: <20020227224407.P48555-100000@gamplex.bde.org> In-Reply-To: <200202262044.g1QKigX25029@aldan.algebra.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020227224407.P48555-100000>