Skip to content

Commit

Permalink
part_efi: Fix compiler warning on 32-bit sandbox
Browse files Browse the repository at this point in the history
This fixes a mismatch between the %zu format and the type used on sandbox.

Signed-off-by: Simon Glass <[email protected]>
Reviewed-by: Tom Rini <[email protected]>
  • Loading branch information
sjg20 authored and trini committed Jul 25, 2016
1 parent 1bb718c commit 5afb8d1
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions disk/part_efi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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;
}

Expand Down

0 comments on commit 5afb8d1

Please sign in to comment.