diff options
author | Erik Faye-Lund <[email protected]> | 2019-08-08 13:59:44 +0200 |
---|---|---|
committer | Erik Faye-Lund <[email protected]> | 2019-08-15 20:23:35 +0200 |
commit | c646cd4bac0999547cb61a04f8e80f828d373232 (patch) | |
tree | 64c92851e44f40a29eb4831bc0a555435510f81f /src/compiler/nir/nir_deref.c | |
parent | b355eef92053feaa8254345a3359ff14555dd52f (diff) |
nir: avoid warning when casting bogus pointer
This intentionally-bogus pointer generates a warning on some 64-bit
systems, so let's cast to a properly-sized integer first.
Signed-off-by: Erik Faye-Lund <[email protected]>
Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/compiler/nir/nir_deref.c')
-rw-r--r-- | src/compiler/nir/nir_deref.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compiler/nir/nir_deref.c b/src/compiler/nir/nir_deref.c index 5aa1c383db7..da66c5f0487 100644 --- a/src/compiler/nir/nir_deref.c +++ b/src/compiler/nir/nir_deref.c @@ -58,7 +58,7 @@ nir_deref_path_init(nir_deref_path *path, #ifndef NDEBUG /* Just in case someone uses short_path by accident */ for (unsigned i = 0; i < ARRAY_SIZE(path->_short_path); i++) - path->_short_path[i] = (void *)0xdeadbeef; + path->_short_path[i] = (void *)(uintptr_t)0xdeadbeef; #endif path->path = ralloc_array(mem_ctx, nir_deref_instr *, count + 1); |