Date: Sat, 15 Oct 2011 01:14:16 -0400 From: Eitan Adler <lists@eitanadler.com> To: FreeBSD Hackers <freebsd-hackers@freebsd.org> Subject: rtadvd - WARNS and a missing break? Message-ID: <CAF6rxgk8U35s1GgcjeY-b34u_k-rOQ5H786ySzQ67uv6jJ0Tpg@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
I was playing around with WARNS on some programs and noticed that usr.sbin/rtadvd builds with WARNS=3 with both clang and gcc (and WARNS=6 with gcc). Perhaps the following could be committed ? Index: Makefile =================================================================== --- Makefile (revision 226370) +++ Makefile (working copy) @@ -24,6 +24,6 @@ CFLAGS+= -DHAVE_ARC4RANDOM -WARNS?= 1 +WARNS?= 3 .include <bsd.prog.mk> While here I also noticed that one of the switch statements is missing a "break" statement but I'm uncertain if adding one is correct. Index: control_server.c =================================================================== --- control_server.c (revision 226370) +++ control_server.c (working copy) @@ -704,6 +704,7 @@ switch (cm->cm_type) { case CM_TYPE_EOM: state = CM_STATE_EOM; + break; //// or should this be /* FALLTHROUGH? */ case CM_TYPE_NUL: cm->cm_type = CM_TYPE_ACK; cm->cm_len = sizeof(*cm); -- Eitan Adler
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAF6rxgk8U35s1GgcjeY-b34u_k-rOQ5H786ySzQ67uv6jJ0Tpg>