From owner-freebsd-hackers@FreeBSD.ORG Sat Oct 15 05:38:31 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 17315106566B for ; Sat, 15 Oct 2011 05:38:31 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-wy0-f182.google.com (mail-wy0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id A41CF8FC18 for ; Sat, 15 Oct 2011 05:38:30 +0000 (UTC) Received: by wyi40 with SMTP id 40so276818wyi.13 for ; Fri, 14 Oct 2011 22:38:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:from:date:message-id:subject:to:content-type; bh=gUuej6ZlKfxMC8YZgGcPkpfqPn6MmXgrUWUNCmozWZw=; b=QjWLyUY4GiWezwmCeVjxNpBUT/+t4XjYLHyC6UkzPhmOvrzk3Qx/CqGo2kCyRX6C4+ NRSdHva3YX3rGFKftL7QtAI6ZpgkF654em8CSDf5MvQCMXv22duJAhkY7AMzpxAXJGdr MDtnbZAoDYjQ7ISHB9ja9I+RFx85lRqLxz9j8= Received: by 10.227.166.2 with SMTP id k2mr3677056wby.113.1318655686115; Fri, 14 Oct 2011 22:14:46 -0700 (PDT) MIME-Version: 1.0 Received: by 10.227.200.72 with HTTP; Fri, 14 Oct 2011 22:14:16 -0700 (PDT) From: Eitan Adler Date: Sat, 15 Oct 2011 01:14:16 -0400 Message-ID: To: FreeBSD Hackers Content-Type: text/plain; charset=UTF-8 Subject: rtadvd - WARNS and a missing break? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Oct 2011 05:38:31 -0000 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 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