diff options
author | Martin Str|mberg <ams@ludd.ltu.se> | 2014-12-17 15:28:14 -0500 |
---|---|---|
committer | Gene Cumm <gene.cumm@gmail.com> | 2015-01-05 20:43:13 -0500 |
commit | 5932f124bce94b662b0b7dc9b79cdc4802d4731c (patch) | |
tree | 22f2892da5f6003b791cac8c7f03e5c4337271c3 | |
parent | 4e9a04186557d679a39de1ca18cadc1fbb174250 (diff) | |
download | syslinux-5932f124bce94b662b0b7dc9b79cdc4802d4731c.tar.gz syslinux-5932f124bce94b662b0b7dc9b79cdc4802d4731c.tar.xz syslinux-5932f124bce94b662b0b7dc9b79cdc4802d4731c.zip |
com32: change '%llx' to use PRIx64
Get rid of printf format warning format ‘%llx’ expects type
‘long long unsigned int’, but argument 2 has type ‘uint64_t’
Use <inttypes.h> PRIx64 instead of llx to get rid of gcc warning
format ‘%llx’ expects type ‘long long unsigned int’, but argument 2
has type ‘uint64_t’
Author: Martin Str|mberg <ams@ludd.ltu.se>
Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
-rw-r--r-- | com32/gpllib/acpi/xsdt.c | 2 | ||||
-rw-r--r-- | com32/hdt/hdt-cli-memory.c | 4 | ||||
-rw-r--r-- | com32/hdt/hdt-dump-memory.c | 12 | ||||
-rw-r--r-- | com32/hdt/hdt-menu-memory.c | 4 | ||||
-rw-r--r-- | com32/lib/syslinux/disk.c | 16 | ||||
-rw-r--r-- | com32/modules/meminfo.c | 4 |
6 files changed, 21 insertions, 21 deletions
diff --git a/com32/gpllib/acpi/xsdt.c b/com32/gpllib/acpi/xsdt.c index 208abc67..976c8965 100644 --- a/com32/gpllib/acpi/xsdt.c +++ b/com32/gpllib/acpi/xsdt.c @@ -63,7 +63,7 @@ int parse_xsdt(s_acpi * acpi) /* Let's grab the pointed table header */ char address[16] = { 0 }; - sprintf(address, "%llx", *p); + sprintf(address, "%" PRIx64 "x", *p); uint64_t *pointed_address = (uint64_t *)strtoul(address, NULL, 16); x->entry[x->entry_count] = pointed_address; diff --git a/com32/hdt/hdt-cli-memory.c b/com32/hdt/hdt-cli-memory.c index c05b7cd6..a614292c 100644 --- a/com32/hdt/hdt-cli-memory.c +++ b/com32/hdt/hdt-cli-memory.c @@ -47,7 +47,7 @@ static void show_memory_e820(int argc __unused, char **argv __unused, more_printf("BIOS-provided physical RAM e820 map:\n"); for (int i = 0; i < count; i++) { get_type(map[i].type, type, 14); - more_printf("%016llx - %016llx %016llx (%s)\n", + more_printf("%016" PRIx64 "x - %016" PRIx64 "x %016" PRIx64 "x (%s)\n", map[i].addr, map[i].size, map[i].addr + map[i].size, remove_spaces(type)); } @@ -60,7 +60,7 @@ static void show_memory_e820(int argc __unused, char **argv __unused, more_printf("Sanitized e820 map:\n"); for (int i = 0; i < nr; i++) { get_type(nm[i].type, type, 14); - more_printf("%016llx - %016llx %016llx (%s)\n", + more_printf("%016" PRIx64 "x - %016" PRIx64 "x %016" PRIx64 "x (%s)\n", nm[i].addr, nm[i].size, nm[i].addr + nm[i].size, remove_spaces(type)); } diff --git a/com32/hdt/hdt-dump-memory.c b/com32/hdt/hdt-dump-memory.c index 5095d3c2..224ea248 100644 --- a/com32/hdt/hdt-dump-memory.c +++ b/com32/hdt/hdt-dump-memory.c @@ -91,9 +91,9 @@ void dump_e820(struct s_hardware *hardware, ZZJSON_CONFIG *config, ZZJSON **item char begin[24]={0}; char size[24]={0}; char end[24]={0}; - snprintf(begin,sizeof(begin),"0x%016llx",map[i].addr); - snprintf(size,sizeof(size),"0x%016llx",map[i].size); - snprintf(end,sizeof(end),"0x%016llx",map[i].addr+map[i].size); + snprintf(begin,sizeof(begin),"0x%016" PRIx64 "x",map[i].addr); + snprintf(size,sizeof(size),"0x%016" PRIx64 "x",map[i].size); + snprintf(end,sizeof(end),"0x%016" PRIx64 "x",map[i].addr+map[i].size); CREATE_NEW_OBJECT; add_s("memory.segment.start",begin); add_s("memory.segment.size ",size); @@ -108,9 +108,9 @@ void dump_e820(struct s_hardware *hardware, ZZJSON_CONFIG *config, ZZJSON **item char begin[24]={0}; char size[24]={0}; char end[24]={0}; - snprintf(begin,sizeof(begin),"0x%016llx",nm[i].addr); - snprintf(size,sizeof(size),"0x%016llx",nm[i].size); - snprintf(end,sizeof(end),"0x%016llx",nm[i].addr+nm[i].size); + snprintf(begin,sizeof(begin),"0x%016" PRIx64 "x",nm[i].addr); + snprintf(size,sizeof(size),"0x%016" PRIx64 "x",nm[i].size); + snprintf(end,sizeof(end),"0x%016" PRIx64 "x",nm[i].addr+nm[i].size); CREATE_NEW_OBJECT; add_s("sanitized_memory.segment.start",begin); add_s("sanitized_memory.segment.size ",size); diff --git a/com32/hdt/hdt-menu-memory.c b/com32/hdt/hdt-menu-memory.c index 60d741de..ae6fc676 100644 --- a/com32/hdt/hdt-menu-memory.c +++ b/com32/hdt/hdt-menu-memory.c @@ -57,10 +57,10 @@ static void compute_e820(struct s_my_menu *menu) for (int j = 0; j < count; j++) { get_type(map[j].type, type, 14); snprintf(buffer, sizeof buffer, - "%016llx - %016llx (%s)", + "%016" PRIx64 "x - %016" PRIx64 "x (%s)", map[j].addr, map[j].size, remove_spaces(type)); snprintf(statbuffer, sizeof statbuffer, - "%016llx - %016llx (%s)", + "%016" PRIx64 "x - %016" PRIx64 "x (%s)", map[j].addr, map[j].size, remove_spaces(type)); add_item(buffer, statbuffer, OPT_INACTIVE, NULL, 0); menu->items_count++; diff --git a/com32/lib/syslinux/disk.c b/com32/lib/syslinux/disk.c index 5a99bb42..afbfc846 100644 --- a/com32/lib/syslinux/disk.c +++ b/com32/lib/syslinux/disk.c @@ -528,9 +528,9 @@ void disk_gpt_part_dump(const struct disk_gpt_part_entry *const gpt_part) char guid_text[37]; dprintf("----------------------------------\n" - "GPT part. LBA first __ : 0x%.16llx\n" - "GPT part. LBA last ___ : 0x%.16llx\n" - "GPT part. attribs ____ : 0x%.16llx\n" + "GPT part. LBA first __ : 0x%.16" PRIx64 "x\n" + "GPT part. LBA last ___ : 0x%.16" PRIx64 "x\n" + "GPT part. attribs ____ : 0x%.16" PRIx64 "x\n" "GPT part. name _______ : '", gpt_part->lba_first, gpt_part->lba_last, gpt_part->attribs); for (i = 0; i < sizeof(gpt_part->name); i++) { @@ -559,11 +559,11 @@ void disk_gpt_header_dump(const struct disk_gpt_header *const gpt) "GPT header size ______ : 0x%.8x\n" "GPT header checksum __ : 0x%.8x\n" "GPT reserved _________ : '%4.4s'\n" - "GPT LBA current ______ : 0x%.16llx\n" - "GPT LBA alternative __ : 0x%.16llx\n" - "GPT LBA first usable _ : 0x%.16llx\n" - "GPT LBA last usable __ : 0x%.16llx\n" - "GPT LBA part. table __ : 0x%.16llx\n" + "GPT LBA current ______ : 0x%.16" PRIx64 "x\n" + "GPT LBA alternative __ : 0x%.16" PRIx64 "x\n" + "GPT LBA first usable _ : 0x%.16" PRIx64 "x\n" + "GPT LBA last usable __ : 0x%.16" PRIx64 "x\n" + "GPT LBA part. table __ : 0x%.16" PRIx64 "x\n" "GPT partition count __ : 0x%.8x\n" "GPT partition size ___ : 0x%.8x\n" "GPT part. table chksum : 0x%.8x\n", diff --git a/com32/modules/meminfo.c b/com32/modules/meminfo.c index fc04792f..c8f953bf 100644 --- a/com32/modules/meminfo.c +++ b/com32/modules/meminfo.c @@ -71,12 +71,12 @@ static void dump_e820(void) if (oreg.ecx.l >= 24) { /* ebx base length end type */ - printf("%8x %016llx %016llx %016llx %d [%x]", + printf("%8x %016" PRIx64 "x %016" PRIx64 "x %016" PRIx64 "x %d [%x]", ireg.ebx.l, ed.base, ed.len, ed.base + ed.len, ed.type, ed.extattr); } else { /* ebx base length end */ - printf("%8x %016llx %016llx %016llx %d [-]", + printf("%8x %016" PRIx64 "x %016" PRIx64 "x %016" PRIx64 "x %d [-]", ireg.ebx.l, ed.base, ed.len, ed.base + ed.len, ed.type); ed.extattr = 1; } |