Commit 9936be31fb11a702f6f2f867a2e65dc423ed7d36
Committed by
Tom Rini
1 parent
0c9c8fb5ec
Exists in
master
and in
54 other branches
disk: Address cast and format errors
This change addresses a few printf-formatting errors, and a typecast error. Signed-off-by: Taylor Hutt <thutt@chromium.org> Signed-off-by: Simon Glass <sjg@chromium.org>
Showing 1 changed file with 4 additions and 3 deletions Side-by-side Diff
disk/part_efi.c
... | ... | @@ -422,7 +422,7 @@ |
422 | 422 | count = le32_to_int(pgpt_head->num_partition_entries) * |
423 | 423 | le32_to_int(pgpt_head->sizeof_partition_entry); |
424 | 424 | |
425 | - debug("%s: count = %lu * %lu = %u\n", __func__, | |
425 | + debug("%s: count = %lu * %lu = %zu\n", __func__, | |
426 | 426 | le32_to_int(pgpt_head->num_partition_entries), |
427 | 427 | le32_to_int(pgpt_head->sizeof_partition_entry), count); |
428 | 428 | |
... | ... | @@ -432,7 +432,8 @@ |
432 | 432 | } |
433 | 433 | |
434 | 434 | if (count == 0 || pte == NULL) { |
435 | - printf("%s: ERROR: Can't allocate 0x%X bytes for GPT Entries\n", | |
435 | + printf("%s: ERROR: Can't allocate 0x%zX " | |
436 | + "bytes for GPT Entries\n", | |
436 | 437 | __func__, count); |
437 | 438 | return NULL; |
438 | 439 | } |
... | ... | @@ -474,7 +475,7 @@ |
474 | 475 | sizeof(unused_guid.b)) == 0) { |
475 | 476 | |
476 | 477 | debug("%s: Found an unused PTE GUID at 0x%08X\n", __func__, |
477 | - (unsigned int)pte); | |
478 | + (unsigned int)(uintptr_t)pte); | |
478 | 479 | |
479 | 480 | return 0; |
480 | 481 | } else { |