* "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:
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.