U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Glass <sjg@chromium.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 3/5] part_efi: Fix compiler warning on 32-bit sandbox
Date: Fri, 22 Jul 2016 09:22:47 -0600	[thread overview]
Message-ID: <1469200969-4643-3-git-send-email-sjg@chromium.org> (raw)
In-Reply-To: <1469200969-4643-1-git-send-email-sjg@chromium.org>

This fixes a mismatch between the %zu format and the type used on sandbox.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 disk/part_efi.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/disk/part_efi.c b/disk/part_efi.c
index 0af1e92..01f71be 100644
--- a/disk/part_efi.c
+++ b/disk/part_efi.c
@@ -886,9 +886,10 @@ static gpt_entry *alloc_read_gpt_entries(struct blk_desc *dev_desc,
 	count = le32_to_cpu(pgpt_head->num_partition_entries) *
 		le32_to_cpu(pgpt_head->sizeof_partition_entry);
 
-	debug("%s: count = %u * %u = %zu\n", __func__,
+	debug("%s: count = %u * %u = %lu\n", __func__,
 	      (u32) le32_to_cpu(pgpt_head->num_partition_entries),
-	      (u32) le32_to_cpu(pgpt_head->sizeof_partition_entry), count);
+	      (u32) le32_to_cpu(pgpt_head->sizeof_partition_entry),
+	      (ulong)count);
 
 	/* Allocate memory for PTE, remember to FREE */
 	if (count != 0) {
@@ -897,9 +898,8 @@ static gpt_entry *alloc_read_gpt_entries(struct blk_desc *dev_desc,
 	}
 
 	if (count == 0 || pte == NULL) {
-		printf("%s: ERROR: Can't allocate 0x%zX "
-		       "bytes for GPT Entries\n",
-			__func__, count);
+		printf("%s: ERROR: Can't allocate %#lX bytes for GPT Entries\n",
+		       __func__, (ulong)count);
 		return NULL;
 	}
 
-- 
2.8.0.rc3.226.g39d4020

  parent reply	other threads:[~2016-07-22 15:22 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-22 15:22 [U-Boot] [PATCH 1/5] sandbox: Add instructions about building on 32-bit machines Simon Glass
2016-07-22 15:22 ` [U-Boot] [PATCH 2/5] lzmadec: Use the same type as the lzma call Simon Glass
2016-07-22 22:04   ` Tom Rini
2016-07-26  2:32   ` [U-Boot] [U-Boot, " Tom Rini
2016-07-22 15:22 ` Simon Glass [this message]
2016-07-22 22:05   ` [U-Boot] [PATCH 3/5] part_efi: Fix compiler warning on 32-bit sandbox Tom Rini
2016-07-26  2:32   ` [U-Boot] [U-Boot, " Tom Rini
2016-07-22 15:22 ` [U-Boot] [PATCH 4/5] hashtable: " Simon Glass
2016-07-22 22:05   ` Tom Rini
2016-07-26  2:32   ` [U-Boot] [U-Boot, " Tom Rini
2016-07-22 15:22 ` [U-Boot] [PATCH 5/5] dtoc: Correct the type widening code in fdt_fallback Simon Glass
2016-07-22 22:05   ` Tom Rini
2016-07-26  2:33   ` [U-Boot] [U-Boot, " Tom Rini
2016-07-22 22:04 ` [U-Boot] [PATCH 1/5] sandbox: Add instructions about building on 32-bit machines Tom Rini
2016-07-26  2:32 ` [U-Boot] [U-Boot, " Tom Rini

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=1469200969-4643-3-git-send-email-sjg@chromium.org \
    --to=sjg@chromium.org \
    --cc=u-boot@lists.denx.de \
    /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