• Guillaume Tucker's avatar
    i915/gem_ctx_sseu: Fix 32-bit build · cd755634
    Guillaume Tucker authored
    This fixes a compiler warning treated as an error when building for
    32-bit architectures since their pointer size does not match the size
    of drm_i915_gem_context_param.value which is 64 bits:
    
      CC       i915/gem_ctx_sseu.o
      i915/gem_ctx_sseu.c: In function ‘test_ggtt_args’:
      i915/gem_ctx_sseu.c:384:9: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
        munmap((void *)arg.value, 4096);
    
    It was found while building for arm with gcc 6.3.0 and I suspect the
    same problem would arise for i386 or other 32-bit architectures.  The
    uintptr_t type is by definition an unsigned integer of the same length
    as a pointer on a given architecture, so this should fix the problem
    for all architectures up to 64 bits.
    Signed-off-by: Guillaume Tucker's avatarGuillaume Tucker <guillaume.tucker@collabora.com>
    cd755634
Name
Last commit
Last update
assembler Loading commit data...
benchmarks Loading commit data...
debugger Loading commit data...
docs Loading commit data...
include/drm-uapi Loading commit data...
lib Loading commit data...
m4 Loading commit data...
man Loading commit data...
overlay Loading commit data...
runner Loading commit data...
scripts Loading commit data...
tests Loading commit data...
tools Loading commit data...
.editorconfig Loading commit data...
.gitignore Loading commit data...
.gitlab-ci.yml Loading commit data...
CONTRIBUTING.md Loading commit data...
COPYING Loading commit data...
Dockerfile.debian Loading commit data...
Dockerfile.debian-arm64 Loading commit data...
Dockerfile.fedora Loading commit data...
MAINTAINERS Loading commit data...
Makefile.am Loading commit data...
NEWS Loading commit data...
README.md Loading commit data...
TODO.rst Loading commit data...
autogen.sh Loading commit data...
configure.ac Loading commit data...
meson-cross-arm64.txt Loading commit data...
meson.build Loading commit data...
meson.sh Loading commit data...
meson_options.txt Loading commit data...