util-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thierry Reding <thierry.reding@avionic-design.de>
To: Karel Zak <kzak@redhat.com>
Cc: util-linux@vger.kernel.org
Subject: [PATCH] sfdisk: Fix format specifiers for size_t
Date: Wed, 19 Sep 2012 11:48:46 +0200	[thread overview]
Message-ID: <1348048126-31365-1-git-send-email-thierry.reding@avionic-design.de> (raw)

The proper specifier for size_t is %zu. %lu will work fine on 64-bit
architectures but not on 32-bit.

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
---
 fdisks/sfdisk.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fdisks/sfdisk.c b/fdisks/sfdisk.c
index 2027202..da5c606 100644
--- a/fdisks/sfdisk.c
+++ b/fdisks/sfdisk.c
@@ -1426,7 +1426,7 @@ extended_partition(char *dev, int fd, struct part_desc *ep, struct disk_desc *z)
 	cp = s->data + 0x1be;
 
 	if (pno + 4 >= ARRAY_SIZE(z->partitions)) {
-	    warnx(_("too many partitions - ignoring those past nr (%ld)\n"),
+	    warnx(_("too many partitions - ignoring those past nr (%zu)\n"),
 		    pno - 1);
 	    break;
 	}
@@ -1504,7 +1504,7 @@ bsd_partition(char *dev, int fd, struct part_desc *ep, struct disk_desc *z) {
     while (bp - bp0 < BSD_MAXPARTITIONS && bp - bp0 < l->d_npartitions) {
 	if (pno + 1 >= ARRAY_SIZE(z->partitions)) {
 	    warnx(_("too many partitions - ignoring those "
-		      "past nr (%ld)\n"), pno - 1);
+		      "past nr (%zu)\n"), pno - 1);
 	    break;
 	}
 	if (bp->p_fstype != BSD_FS_UNUSED) {
-- 
1.7.12


                 reply	other threads:[~2012-09-19  9:48 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1348048126-31365-1-git-send-email-thierry.reding@avionic-design.de \
    --to=thierry.reding@avionic-design.de \
    --cc=kzak@redhat.com \
    --cc=util-linux@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).