From owner-freebsd-bugs Wed Jun 26 17:45:24 2002 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 7F27337D1A8 for ; Wed, 26 Jun 2002 17:40:05 -0700 (PDT) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.4/8.12.4) with ESMTP id g5R0e5JU093792 for ; Wed, 26 Jun 2002 17:40:05 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.4/8.12.4/Submit) id g5R0e5TF093791; Wed, 26 Jun 2002 17:40:05 -0700 (PDT) Received: from xkulesh.vol.cz (xkulesh.vol.cz [195.250.154.106]) by hub.freebsd.org (Postfix) with ESMTP id CC4E637D0D6 for ; Wed, 26 Jun 2002 17:37:33 -0700 (PDT) Received: from obluda.cz (localhost [127.0.0.1]) by xkulesh.vol.cz (8.12.3/8.12.3) with ESMTP id g5R0bVTt061818 for ; Thu, 27 Jun 2002 02:37:31 +0200 (CEST) (envelope-from dan@obluda.cz) Received: (from root@localhost) by obluda.cz (8.12.4/8.12.4/Submit) id g5R0Q3p6061265; Thu, 27 Jun 2002 02:26:03 +0200 (CEST) Message-Id: <200206270026.g5R0Q3p6061265@obluda.cz> Date: Thu, 27 Jun 2002 02:26:03 +0200 (CEST) From: Dan Lukes Reply-To: Dan Lukes To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: bin/39904: cleaning sbin/fsdb code from warnings Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 39904 >Category: bin >Synopsis: cleaning sbin/sysctl code from warnings >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed Jun 26 17:40:04 PDT 2002 >Closed-Date: >Last-Modified: >Originator: Dan Lukes >Release: FreeBSD 4.6-STABLE i386 >Organization: Obludarium >Environment: System: FreeBSD xkulesh.vol.cz 4.6-STABLE FreeBSD src/sbin/sysctl/sysctl.c,v 1.25.2.8 2002/03/16 15:49:08 >Description: sbin/sysctl/sysctl.c:387: warning: missing braces around initializer sbin/sysctl/sysctl.c:387: warning: (near initialization for `maj2name[0]') sbin/sysctl/sysctl.c: In function `machdep_bootdev': 401: warning: suggest parentheses around comparison in operand of & 402: warning: unsigned int format, u_long arg (arg 2) >How-To-Repeat: N/A >Fix: --- sysctl.c.ORIG Tue Mar 19 02:56:07 2002 +++ sysctl.c Thu Jun 27 02:22:49 2002 @@ -384,12 +384,12 @@ int majdev; char *name; } maj2name[] = { - 30, "ad", - 0, "wd", - 1, "wfd", - 2, "fd", - 4, "da", - -1, NULL /* terminator */ + { 30, "ad" }, + { 0, "wd" }, + { 1, "wfd" }, + { 2, "fd" }, + { 4, "da" }, + { -1, NULL } /* terminator */ }; static int @@ -398,8 +398,8 @@ int majdev, unit, slice, part; struct _foo *p; - if (value & B_MAGICMASK != B_DEVMAGIC) { - printf("invalid (0x%08x)", value); + if ( (value & B_MAGICMASK) != B_DEVMAGIC) { + printf("invalid (0x%08lx)", value); return 0; } majdev = B_TYPE(value); >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message