Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 13 Sep 2006 13:32:11 -1000
From:      Juli Mallett <jmallett@FreeBSD.org>
To:        "David E. O'Brien" <obrien@FreeBSD.org>
Cc:        cvs-src@FreeBSD.org, src-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/share/mk bsd.lib.mk bsd.prog.mk
Message-ID:  <20060913233211.GA83839@toxic.magnesium.net>
In-Reply-To: <200609132327.k8DNRMqS076204@repoman.freebsd.org>
References:  <200609132327.k8DNRMqS076204@repoman.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi David,

* "David E. O'Brien" <obrien@FreeBSD.org> [ 2006-09-13 ]
	[ cvs commit: src/share/mk bsd.lib.mk bsd.prog.mk ]
>   When building WITHOUT_ASSERT_DEBUG, we need to disable -Werror as its easy
>   to see "warning: unused variable `foo'".

I think it might be a better idea to -Wno-unused, since the only sorts of
warnings one wants to ignore building NDEBUG are the variables which are
otherwise unused.  For example, if someone does something like:

	int foo;

	assert((foo = some_function()) != 0);
	printf("got foo=%d\n", foo);

We *really* want to have that warning be an error, as foo is being used
uninitialized, and the code is broken.

Thanx,
juli.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060913233211.GA83839>