aboutsummaryrefslogtreecommitdiffstats
path: root/com32/hdt
diff options
context:
space:
mode:
authorMartin Str|mberg <ams@ludd.ltu.se>2014-12-17 15:28:14 -0500
committerGene Cumm <gene.cumm@gmail.com>2015-01-05 20:43:13 -0500
commit5932f124bce94b662b0b7dc9b79cdc4802d4731c (patch)
tree22f2892da5f6003b791cac8c7f03e5c4337271c3 /com32/hdt
parent4e9a04186557d679a39de1ca18cadc1fbb174250 (diff)
downloadsyslinux-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>
Diffstat (limited to 'com32/hdt')
-rw-r--r--com32/hdt/hdt-cli-memory.c4
-rw-r--r--com32/hdt/hdt-dump-memory.c12
-rw-r--r--com32/hdt/hdt-menu-memory.c4
3 files changed, 10 insertions, 10 deletions
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++;