Date: 15 Sep 2001 15:59:43 +0200 From: Dag-Erling Smorgrav <des@ofug.org> To: Dima Dorfman <dd@FreeBSD.org> Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/usr.sbin/syslogd Makefile syslogd.c Message-ID: <xzpy9ngr1v4.fsf@flood.ping.uio.no> In-Reply-To: <200109091425.f89EP2s54613@freefall.freebsd.org> References: <200109091425.f89EP2s54613@freefall.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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"; 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. DES -- Dag-Erling Smorgrav - des@ofug.org 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?xzpy9ngr1v4.fsf>