Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 7 Mar 2002 12:21:59 +0100 (CET)
From:      Harti Brandt <brandt@fokus.gmd.de>
To:        Mike Barcroft <mike@FreeBSD.ORG>
Cc:        "David O'Brien" <obrien@FreeBSD.ORG>, Mark Murray <markm@FreeBSD.ORG>, <cvs-committers@FreeBSD.ORG>, <cvs-all@FreeBSD.ORG>
Subject:   Re: cvs commit: src/usr.bin/rwall rwall.c
Message-ID:  <20020307121629.J99061-100000@beagle.fokus.gmd.de>
In-Reply-To: <20020307060920.C81803@espresso.q9media.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 7 Mar 2002, Mike Barcroft wrote:

MB>David O'Brien <obrien@FreeBSD.org> writes:
MB>> On Mon, Mar 04, 2002 at 12:27:38PM -0800, Mark Murray wrote:
MB>> > markm       2002/03/04 12:27:38 PST
MB>> >
MB>> >   Modified files:
MB>> >     usr.bin/rwall        rwall.c
MB>> >   Log:
MB>> >   ANSIfication, WARNS and lint cleanup.
MB>>
MB>> -       (void)snprintf(tmpname, sizeof(tmpname), "%s/wall.XXXXXX", _PATH_TMP);
MB>> +       snprintf(tmpname, sizeof(tmpname), "%s/wall.XXXXXX", _PATH_TMP);
MB>>
MB>> lint(1) does not like our usage of (void)?  Removing it where it already
MB>> exists goes against the examples in style(9).
MB>
MB>I thought the point of (void) was to quiet lint(1).

The point of (void) is that the programmer who writes the code tells
another programmer who reads the code: "Yes, I know, this function returns
a value, but I ignore it and I know what I'm doing so don't be surprised."
In the given case it is obvious that the snprintf shouldn't fail.

harti
-- 
harti brandt, http://www.fokus.gmd.de/research/cc/cats/employees/hartmut.brandt/private
              brandt@fokus.fhg.de


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?20020307121629.J99061-100000>