diff options
author | Kenneth Graunke <[email protected]> | 2016-04-03 19:51:22 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2016-04-04 14:38:48 -0700 |
commit | 3babb7b0a4037c4ae98078611a827af6dd3e121e (patch) | |
tree | 1441c05fe756e27e2ade4dd6e26d1df9e241f92b /src/compiler/nir | |
parent | da5d08707bf07c76b6a1851f3a36bb7c1f8d4d4b (diff) |
nir: Use PRIi64 and PRIu64 instead of %ld and %lu.
%ld and %lu aren't the right format specifiers for int64_t and uint64_t
on 32-bit (x86) systems. They're %zu on Linux and %Iu on Windows.
Use the standard C99 macros in hopes that they work everywhere.
Signed-off-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/compiler/nir')
-rw-r--r-- | src/compiler/nir/nir_search.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/compiler/nir/nir_search.c b/src/compiler/nir/nir_search.c index b915101ce32..3a65ab18928 100644 --- a/src/compiler/nir/nir_search.c +++ b/src/compiler/nir/nir_search.c @@ -25,6 +25,7 @@ * */ +#include <inttypes.h> #include "nir_search.h" struct match_state { @@ -494,7 +495,7 @@ construct_value(const nir_search_value *value, break; case nir_type_int: - load->def.name = ralloc_asprintf(load, "%ld", c->data.i); + load->def.name = ralloc_asprintf(load, "%" PRIi64, c->data.i); switch (bitsize->dest_size) { case 32: load->value.i32[0] = c->data.i; @@ -508,7 +509,7 @@ construct_value(const nir_search_value *value, break; case nir_type_uint: - load->def.name = ralloc_asprintf(load, "%lu", c->data.u); + load->def.name = ralloc_asprintf(load, "%" PRIu64, c->data.u); switch (bitsize->dest_size) { case 32: load->value.u32[0] = c->data.u; |