From owner-freebsd-bugs@FreeBSD.ORG Sun Sep 12 17:40:26 2004 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9529016A4D1 for ; Sun, 12 Sep 2004 17:40:26 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2040E43D62 for ; Sun, 12 Sep 2004 17:40:26 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.11/8.12.11) with ESMTP id i8CHePXN009072 for ; Sun, 12 Sep 2004 17:40:25 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.11/8.12.11/Submit) id i8CHePCR009071; Sun, 12 Sep 2004 17:40:25 GMT (envelope-from gnats) Resent-Date: Sun, 12 Sep 2004 17:40:25 GMT Resent-Message-Id: <200409121740.i8CHePCR009071@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Dan Lukes Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C8DD916A4CF for ; Sun, 12 Sep 2004 17:36:12 +0000 (GMT) Received: from kulesh.obluda.cz (kulesh.obluda.cz [193.179.22.243]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5242B43D1F for ; Sun, 12 Sep 2004 17:36:11 +0000 (GMT) (envelope-from dan@obluda.cz) Received: from kulesh.obluda.cz (localhost.eunet.cz [127.0.0.1]) by kulesh.obluda.cz (8.13.1/8.13.1) with ESMTP id i8CHZxgp010910 for ; Sun, 12 Sep 2004 19:35:59 +0200 (CEST) (envelope-from dan@obluda.cz) Received: (from root@localhost) by kulesh.obluda.cz (8.13.1/8.13.1/Submit) id i8CHZwGb010909 for FreeBSD-gnats-submit@freebsd.org; Sun, 12 Sep 2004 19:35:58 +0200 (CEST) (envelope-from dan@obluda.cz) Message-Id: <200409121735.i8CHZwGb010909@kulesh.obluda.cz> Date: Sun, 12 Sep 2004 19:35:58 +0200 (CEST) From: Dan Lukes To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: bin/71664: [PATCH] cleanup of the usr.sbin/fwcontrol code X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Dan Lukes List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Sep 2004 17:40:26 -0000 >Number: 71664 >Category: bin >Synopsis: [PATCH] cleanup of the usr.sbin/fwcontrol code >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: Sun Sep 12 17:40:24 GMT 2004 >Closed-Date: >Last-Modified: >Originator: Dan Lukes >Release: FreeBSD 5.3-BETA3 i386 >Organization: Obludarium >Environment: System: FreeBSD kulesh.obluda.cz 5.3-BETA3 FreeBSD 5.3-BETA3 #8: Sun Sep 5 07:06:40 CEST 2004 dan@kulesh.obluda.cz:/usr/obj/usr/src/sys/Dan i386 sys/dev/firewire/fwcrom.c,v 1.11 2004/05/22 16:14:17 dfr usr.sbin/fwcontrol/fwdv.c,v 1.5 2003/04/17 03:38:03 simokawa >Description: There are more than 5000 warnings issued during "make buildworld". Some of them are false positives, but some of them are sign of true errors. Nobody is upset by warnings due it's amount, so some errors remain uncorrected. I want to cleanup the code-base from warnings, so warnings will become "attention mark" again. usr.sbin/fwcontrol/fwcontrol.c:310: warning: unused variable `i' usr.sbin/fwcontrol/fwcontrol.c:603: warning: unused variable `i' usr.sbin/fwcontrol/../../sys/dev/firewire/fwcrom.c:297: warning: unused variable `st' usr.sbin/fwcontrol/fwdv.c:254: warning: 'cycle_acc' might be used uninitialized in this function usr.sbin/fwcontrol/fwdv.c:254: warning: 'cycle' might be used uninitialized in this function >How-To-Repeat: N/A >Fix: *** usr.sbin/fwcontrol/../../sys/dev/firewire/fwcrom.c.ORIG Fri May 28 19:21:18 2004 --- usr.sbin/fwcontrol/../../sys/dev/firewire/fwcrom.c Sun Sep 12 13:58:33 2004 *************** *** 294,300 **** { struct csrreg *reg; struct csrdirectory *dir; ! char *desc, st; uint16_t crc; reg = crom_get(cc); --- 294,300 ---- { struct csrreg *reg; struct csrdirectory *dir; ! char *desc; uint16_t crc; reg = crom_get(cc); *** usr.sbin/fwcontrol/fwdv.c.ORIG Sun Apr 20 23:09:31 2003 --- usr.sbin/fwcontrol/fwdv.c Sun Sep 12 13:57:26 2004 *************** *** 251,257 **** struct dvdbc *dv; struct fw_pkt *pkt; int len, tlen, header, fd, frames, packets, vec, offset, nhdr, i; ! int system=-1, pad_acc, cycle_acc, cycle, f_cycle, f_frac; struct iovec wbuf[TNBUF*2 + NEMPTY]; char *pbuf; u_int32_t iso_data, iso_empty, hdr[TNBUF + NEMPTY][3]; --- 251,258 ---- struct dvdbc *dv; struct fw_pkt *pkt; int len, tlen, header, fd, frames, packets, vec, offset, nhdr, i; ! int system=-1, pad_acc, f_cycle, f_frac; ! int cycle_acc = cycle_acc, cycle=cycle; /* "init" to avoid "might be used uninitialized" warning */ struct iovec wbuf[TNBUF*2 + NEMPTY]; char *pbuf; u_int32_t iso_data, iso_empty, hdr[TNBUF + NEMPTY][3]; *** usr.sbin/fwcontrol/fwcontrol.c.ORIG Sun Sep 12 14:02:27 2004 --- usr.sbin/fwcontrol/fwcontrol.c Sun Sep 12 14:03:13 2004 *************** *** 307,313 **** static void parse_bus_info_block(u_int32_t *p, int info_len) { - int i; char addr[EUI64_SIZ]; struct bus_info *bi; struct eui64 eui; --- 307,312 ---- *************** *** 600,606 **** { u_int32_t crom_buf[1024/4]; char devbase[1024] = "/dev/fw0"; ! int fd, i, tmp, ch, len=1024; fd = -1; --- 599,605 ---- { u_int32_t crom_buf[1024/4]; char devbase[1024] = "/dev/fw0"; ! int fd, tmp, ch, len=1024; fd = -1; >Release-Note: >Audit-Trail: >Unformatted: