Date: Tue, 25 Jun 2002 03:58:36 +0200 (CEST) From: Dan Lukes <dan@obluda.cz> To: FreeBSD-gnats-submit@FreeBSD.org Subject: bin/39817: cleaning sbin/disklabel code from warnings Message-ID: <200206250158.g5P1waQO054081@obluda.cz>
next in thread | raw e-mail | index | archive | help
>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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200206250158.g5P1waQO054081>