From owner-freebsd-hackers@FreeBSD.ORG Sun Nov 30 08:43:39 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EDF191065670 for ; Sun, 30 Nov 2008 08:43:39 +0000 (UTC) (envelope-from bruce@cran.org.uk) Received: from muon.cran.org.uk (muon.cran.org.uk [66.246.138.153]) by mx1.freebsd.org (Postfix) with ESMTP id C96C48FC18 for ; Sun, 30 Nov 2008 08:43:39 +0000 (UTC) (envelope-from bruce@cran.org.uk) Received: from muon.cran.org.uk (localhost [127.0.0.1]) by muon.cran.org.uk (Postfix) with ESMTP id 6DF2719561; Sun, 30 Nov 2008 03:43:38 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on muon X-Spam-Level: X-Spam-Status: No, score=-2.2 required=8.0 tests=AWL,BAYES_00,RDNS_NONE autolearn=no version=3.2.5 Received: from tau (unknown [66.45.161.67]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by muon.cran.org.uk (Postfix) with ESMTPSA; Sun, 30 Nov 2008 03:43:38 -0500 (EST) Date: Sun, 30 Nov 2008 00:43:31 -0800 From: Bruce Cran To: Eitan Adler Message-ID: <20081130004331.086941f3@tau> In-Reply-To: <493214DC.2080904@gmail.com> References: <49320FF7.4040901@gmail.com> <4932122A.8070209@delphij.net> <493214DC.2080904@gmail.com> X-Mailer: Claws Mail 3.5.0 (GTK+ 2.14.4; i486-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, d@delphij.net Subject: Re: change to ee.c X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Nov 2008 08:43:40 -0000 On Sat, 29 Nov 2008 23:21:48 -0500 Eitan Adler wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Xin LI wrote: > > Hi, Eitan, > > > Tanks for interested in this but I'm afraid that your patch is > > incorrect. mkstemp returns a file descriptor rather than a string > > pointer, therefore, the subsequent open() would have undefined > > behavior. It looks like that we actually want fd = mkstemp() here. > Thanks. If this is the case how come gcc did not return any warnings? > > > > Note that we may want to bring vendor fixes before making any > > changes to reduce duplicated work... > I was not aware that this was a third party program. I'll look around > and see if this was fixed. > The version of ee in FreeBSD is fairly old: the latest from http://mahon.cwx.net/ is 1.4.6. Even so, the latest version still generates lots of warnings from gcc because the developer used NULL instead of '\0' (i.e the NULL constant instead of the NUL string). The patch at http://www.freebsd.org/cgi/query-pr.cgi?pr=bin/127986 fixes them; I emailed the developer but got no reply. -- Bruce Cran