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 36D2416A4CF 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 9F94043D54 for ; Sun, 12 Sep 2004 17:40:25 +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 i8CHeNEE009019 for ; Sun, 12 Sep 2004 17:40:23 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.11/8.12.11/Submit) id i8CHeNui009018; Sun, 12 Sep 2004 17:40:23 GMT (envelope-from gnats) Resent-Date: Sun, 12 Sep 2004 17:40:23 GMT Resent-Message-Id: <200409121740.i8CHeNui009018@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 1F10116A4CE for ; Sun, 12 Sep 2004 17:35:21 +0000 (GMT) Received: from kulesh.obluda.cz (kulesh.obluda.cz [193.179.22.243]) by mx1.FreeBSD.org (Postfix) with ESMTP id A807B43D48 for ; Sun, 12 Sep 2004 17:35:19 +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 i8CHYlTv010899 for ; Sun, 12 Sep 2004 19:34:48 +0200 (CEST) (envelope-from dan@obluda.cz) Received: (from root@localhost) by kulesh.obluda.cz (8.13.1/8.13.1/Submit) id i8CHYfJu010898 for FreeBSD-gnats-submit@freebsd.org; Sun, 12 Sep 2004 19:34:41 +0200 (CEST) (envelope-from dan@obluda.cz) Message-Id: <200409121734.i8CHYfJu010898@kulesh.obluda.cz> Date: Sun, 12 Sep 2004 19:34:41 +0200 (CEST) From: Dan Lukes To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: bin/71660: [PATCH] cleanup of the usr.sbin/kgmon 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: 71660 >Category: bin >Synopsis: [PATCH] cleanup of the usr.sbin/kgmon 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:23 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 usr.sbin/kgmon/kgmon.c,v 1.13 2004/08/07 04:27:50 imp >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/kgmon/kgmon.c:398: warning: unsigned int format, u_long arg (arg 3) usr.sbin/kgmon/kgmon.c:420: warning: unsigned int format, u_long arg (arg 3) usr.sbin/kgmon/kgmon.c:435: warning: unsigned int format, u_long arg (arg 3) usr.sbin/kgmon/kgmon.c:438: warning: unsigned int format, u_long arg (arg 3) usr.sbin/kgmon/kgmon.c:450: warning: unsigned int format, u_long arg (arg 2) usr.sbin/kgmon/kgmon.c:450: warning: unsigned int format, u_long arg (arg 3) usr.sbin/kgmon/kgmon.c:450: warning: int format, long int arg (arg 4) >How-To-Repeat: N/A >Fix: *** usr.sbin/kgmon/kgmon.c.ORIG Sun Aug 8 21:13:23 2004 --- usr.sbin/kgmon/kgmon.c Sun Sep 12 05:05:59 2004 *************** *** 393,399 **** i = 0; } if (i != kvp->gpm.kcountsize) ! errx(6, "read ticks: read %u, got %d: %s", kvp->gpm.kcountsize, i, kflag ? kvm_geterr(kvp->kd) : strerror(errno)); if ((fwrite(tickbuf, kvp->gpm.kcountsize, 1, fp)) != 1) --- 393,399 ---- i = 0; } if (i != kvp->gpm.kcountsize) ! errx(6, "read ticks: read %lu, got %d: %s", kvp->gpm.kcountsize, i, kflag ? kvm_geterr(kvp->kd) : strerror(errno)); if ((fwrite(tickbuf, kvp->gpm.kcountsize, 1, fp)) != 1) *************** *** 415,421 **** i = 0; } if (i != kvp->gpm.fromssize) ! errx(9, "read froms: read %u, got %d: %s", kvp->gpm.fromssize, i, kflag ? kvm_geterr(kvp->kd) : strerror(errno)); if ((tos = (struct tostruct *)malloc(kvp->gpm.tossize)) == NULL) --- 415,421 ---- i = 0; } if (i != kvp->gpm.fromssize) ! errx(9, "read froms: read %lu, got %d: %s", kvp->gpm.fromssize, i, kflag ? kvm_geterr(kvp->kd) : strerror(errno)); if ((tos = (struct tostruct *)malloc(kvp->gpm.tossize)) == NULL) *************** *** 430,440 **** i = 0; } if (i != kvp->gpm.tossize) ! errx(11, "read tos: read %u, got %d: %s", kvp->gpm.tossize, i, kflag ? kvm_geterr(kvp->kd) : strerror(errno)); if (debug) ! warnx("lowpc 0x%x, textsize 0x%x", kvp->gpm.lowpc, kvp->gpm.textsize); endfrom = kvp->gpm.fromssize / sizeof(*froms); for (fromindex = 0; fromindex < endfrom; ++fromindex) { --- 430,440 ---- i = 0; } if (i != kvp->gpm.tossize) ! errx(11, "read tos: read %lu, got %d: %s", kvp->gpm.tossize, i, kflag ? kvm_geterr(kvp->kd) : strerror(errno)); if (debug) ! warnx("lowpc 0x%x, textsize 0x%lx", kvp->gpm.lowpc, kvp->gpm.textsize); endfrom = kvp->gpm.fromssize / sizeof(*froms); for (fromindex = 0; fromindex < endfrom; ++fromindex) { *************** *** 445,451 **** for (toindex = froms[fromindex]; toindex != 0; toindex = tos[toindex].link) { if (debug) ! warnx("[mcleanup] frompc 0x%x selfpc 0x%x count %d", frompc, tos[toindex].selfpc, tos[toindex].count); rawarc.raw_frompc = frompc; --- 445,451 ---- for (toindex = froms[fromindex]; toindex != 0; toindex = tos[toindex].link) { if (debug) ! warnx("[mcleanup] frompc 0x%lx selfpc 0x%lx count %ld", frompc, tos[toindex].selfpc, tos[toindex].count); rawarc.raw_frompc = frompc; >Release-Note: >Audit-Trail: >Unformatted: