From owner-cvs-all Sat Sep 15 6:59:56 2001 Delivered-To: cvs-all@freebsd.org Received: from flood.ping.uio.no (flood.ping.uio.no [129.240.78.31]) by hub.freebsd.org (Postfix) with ESMTP id 46E6D37B406; Sat, 15 Sep 2001 06:59:45 -0700 (PDT) Received: (from des@localhost) by flood.ping.uio.no (8.9.3/8.9.3) id PAA37259; Sat, 15 Sep 2001 15:59:43 +0200 (CEST) (envelope-from des@ofug.org) X-URL: http://www.ofug.org/~des/ X-Disclaimer: The views expressed in this message do not necessarily coincide with those of any organisation or company with which I am or have been affiliated. To: Dima Dorfman Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/usr.sbin/syslogd Makefile syslogd.c References: <200109091425.f89EP2s54613@freefall.freebsd.org> From: Dag-Erling Smorgrav Date: 15 Sep 2001 15:59:43 +0200 In-Reply-To: <200109091425.f89EP2s54613@freefall.freebsd.org> Message-ID: Lines: 17 User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7 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 Dima Dorfman 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