summaryrefslogtreecommitdiffstats
path: root/src/intel/tools/decoder.c
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2016-10-04 12:03:14 +1100
committerTimothy Arceri <[email protected]>2016-10-04 22:32:57 +1100
commit298c2e03d78c3abeb588306acd67aa88b197ee61 (patch)
tree2e15a404c81c49ba9744a0898c7a65a12ecd0493 /src/intel/tools/decoder.c
parent42ed8a6c9ccfb8b6b632c3be90fb03d292f53d25 (diff)
intel: use the correct format specifier for printing uint64_t
Fixes a bunch of warnings in 32-bit builds. Reviewed-by: Iago Toral Quiroga <[email protected]>
Diffstat (limited to 'src/intel/tools/decoder.c')
-rw-r--r--src/intel/tools/decoder.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/intel/tools/decoder.c b/src/intel/tools/decoder.c
index be3558b6d0a..4cbaab2e0c3 100644
--- a/src/intel/tools/decoder.c
+++ b/src/intel/tools/decoder.c
@@ -27,6 +27,7 @@
#include <stdarg.h>
#include <string.h>
#include <expat.h>
+#include <inttypes.h>
#include <util/macros.h>
@@ -529,11 +530,11 @@ gen_field_iterator_next(struct gen_field_iterator *iter)
case GEN_TYPE_UNKNOWN:
case GEN_TYPE_INT:
snprintf(iter->value, sizeof(iter->value),
- "%ld", field(v.qw, f->start, f->end));
+ "%"PRId64, field(v.qw, f->start, f->end));
break;
case GEN_TYPE_UINT:
snprintf(iter->value, sizeof(iter->value),
- "%lu", field(v.qw, f->start, f->end));
+ "%"PRIu64, field(v.qw, f->start, f->end));
break;
case GEN_TYPE_BOOL:
snprintf(iter->value, sizeof(iter->value),
@@ -545,7 +546,7 @@ gen_field_iterator_next(struct gen_field_iterator *iter)
case GEN_TYPE_ADDRESS:
case GEN_TYPE_OFFSET:
snprintf(iter->value, sizeof(iter->value),
- "0x%08lx", field_address(v.qw, f->start, f->end));
+ "0x%08"PRIx64, field_address(v.qw, f->start, f->end));
break;
case GEN_TYPE_STRUCT:
snprintf(iter->value, sizeof(iter->value),