Date: Sat, 15 Sep 2001 07:06:41 -0700 From: Dima Dorfman <dima@unixfreak.org> To: Dag-Erling Smorgrav <des@ofug.org> Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/usr.sbin/syslogd Makefile syslogd.c Message-ID: <20010915140646.C64EE3E28@bazooka.unixfreak.org> In-Reply-To: <xzpy9ngr1v4.fsf@flood.ping.uio.no>; from des@ofug.org on "15 Sep 2001 15:59:43 %2B0200"
next in thread | previous in thread | raw e-mail | index | archive | help
Dag-Erling Smorgrav <des@ofug.org> wrote: > Dima Dorfman <dd@FreeBSD.org> writes: > > - Apply WARNS=1. WARNS=2 was not used because this program assigns > > string literals to (struct iovec).iov_base for writing, and the only > > clean way to silence -Wwrite-strings in that case would be to > > strdup() and consequently free() those literals, which I considered > > too disruptive. > > (const char *)iov.iov_base = "foo"; This is a GCC'ism. I actually did this, but bde didn't like it too much, and I decided that WARNS=1 without GCC'isms was better than WARNS=2 with GCC'isms. > Other possible solutions include creating a "shadow" struc iov that > declares iov_base as const char * and can only be used for writing, or > fixing up struct iov to make iov_base a union (with appropriate > compatibility macros) with both char * and a const char * members. This has been suggested before, but I don't remember why (if?) it was rejected. 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?20010915140646.C64EE3E28>