bin/71618: [PATCH] cleanup of the usr.sbin/timed code

Giorgos Keramidas keramida at freebsd.org
Sun Sep 12 22:35:22 PDT 2004


On 2004-09-13 03:37, Dan Lukes <dan at obluda.cz> wrote:
>On Sun, 12 Sep 2004, Giorgos Keramidas wrote:
>> [...] can you try the following (and see if you can come up with
>> fixes for the warnings this shows)?
>>
>>	# cd /usr/src/usr.sbin/timed/
>>	# make NO_WERROR=1 WARNS?=3
>
> 	I'm compiling with -Wall -O3.
> 	It seems to be more than any WARNS=X

AFAIK -O3 is a bit unsafe in FreeBSD.  I know that some warnings don't
work correctly in GCC though, so `-O -Wall' shoule be fine most of the
time.  To be sure I have to check with teh manual of GCC to see if this
has changed in 3.4.x versions though.

WARNS=1 includes -Wall, so you're fine with just WARNS=1.  Higher levels
of WARNS enable other sorts of warnings too.  The file bsd.sys.mk in
/usr/share/mk contains the exact set of these options, i.e. WARNS=3 is
equivalent to:

    CFLAGS="-Wall -Wno-format-y2k -Wreturn-type -Wcast-qual \
	-Wwrite-strings -Wswitch -Wshadow -Wcast-align"

> If there are some warning not corrected by attached patches, then it
> mean I'm don't know how the good way to correct it.

Yeah, it makes sense :)

Regards,
Giorgos


More information about the freebsd-bugs mailing list