From owner-freebsd-bugs Mon Jun 24 19:10:32 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 214ED37B40A for ; Mon, 24 Jun 2002 19:10:03 -0700 (PDT) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g5P2A2N68004; Mon, 24 Jun 2002 19:10:02 -0700 (PDT) (envelope-from gnats) Received: from xkulesh.vol.cz (xkulesh.vol.cz [195.250.154.106]) by hub.freebsd.org (Postfix) with ESMTP id 67E7237B401 for ; Mon, 24 Jun 2002 19:05:39 -0700 (PDT) Received: from obluda.cz (localhost [127.0.0.1]) by xkulesh.vol.cz (8.12.3/8.12.3) with ESMTP id g5P25aTt054187 for ; Tue, 25 Jun 2002 04:05:36 +0200 (CEST) (envelope-from dan@obluda.cz) Received: (from root@localhost) by obluda.cz (8.12.4/8.12.4/Submit) id g5P1waQO054081; Tue, 25 Jun 2002 03:58:36 +0200 (CEST) Message-Id: <200206250158.g5P1waQO054081@obluda.cz> Date: Tue, 25 Jun 2002 03:58:36 +0200 (CEST) From: Dan Lukes Reply-To: Dan Lukes To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: bin/39817: cleaning sbin/disklabel 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: 39817 >Category: bin >Synopsis: cleaning sbin/disklabel 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: Mon Jun 24 19:10:02 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 sbin/disklabel/disklabel.c,v 1.28.2.9 2001/08/01 06:07:14 >Description: I want to clean some warnings from code. sbin/disklabel/disklabel.c: In function `checklabel': 1445: warning: int format, long int arg (arg 3) unsigned long 'total_percent' printf'ed as %d 1464: warning: unknown conversion type character `'' in format '%' character must be doubled in format string 1497: warning: long int format, int arg (arg 3) u_int32_t (e.g. unsigned int) pp->p_offset printf'ed as %ld >How-To-Repeat: N/A >Fix: --- sbin/disklabel/disklabel.c.ORIG Tue Aug 7 20:10:14 2001 +++ sbin/disklabel/disklabel.c Tue Jun 25 03:55:30 2002 @@ -1441,7 +1441,7 @@ if (total_percent != 0) { long free_space = lp->d_secperunit - total_size; if (total_percent > 100) { - fprintf(stderr,"total percentage %d is greater than 100\n", + fprintf(stderr,"total percentage %lu is greater than 100\n", total_percent); errors++; } @@ -1460,7 +1460,7 @@ } } else { fprintf(stderr, - "%ld sectors available to give to '*' and '%' partitions\n", + "%ld sectors available to give to '*' and '%%' partitions\n", free_space); errors++; /* fix? set all % partitions to size 0? */ @@ -1493,7 +1493,7 @@ if (pp->p_offset < current_offset && seen_default_offset && i != FULL_DISK_PART) { fprintf(stderr, -"Offset %ld for partition %c overlaps previous partition which ends at %ld\n", +"Offset %d for partition %c overlaps previous partition which ends at %ld\n", pp->p_offset,i+'a',current_offset); fprintf(stderr, "Labels with any *'s for offset must be in ascending order by sector\n"); >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message