From 36d8a922ded31775c9765cf4bfe1ae1c5948a931 Mon Sep 17 00:00:00 2001 From: Mark Janes Date: Wed, 5 Jun 2019 10:49:32 -0700 Subject: intel/tools: use C99 print conversion specifier for 32 bit builds MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes formatting errors for 32 bit compilations, eg: error: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 5 has type ‘uint64_t’ {aka ‘long long unsigned int’} [-Werror=format=] Reviewed-by: Lionel Landwerlin --- src/intel/tools/aub_write.c | 2 +- src/intel/tools/error2aub.c | 2 +- src/intel/tools/intel_dump_gpu.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src/intel') diff --git a/src/intel/tools/aub_write.c b/src/intel/tools/aub_write.c index 0447bbb39c2..dcbde639214 100644 --- a/src/intel/tools/aub_write.c +++ b/src/intel/tools/aub_write.c @@ -577,7 +577,7 @@ aub_write_ggtt(struct aub_file *aub, uint64_t virt_addr, uint64_t size, const vo if (aub->verbose_log_file) { fprintf(aub->verbose_log_file, - " Writting GGTT address: 0x%" PRIx64 ", size: %" PRIu64" phys_addr=0x%lx entries=%u\n", + " Writting GGTT address: 0x%" PRIx64 ", size: %" PRIu64" phys_addr=0x%" PRIx64 " entries=%u\n", virt_addr, size, phys_addr, ggtt_ptes); } diff --git a/src/intel/tools/error2aub.c b/src/intel/tools/error2aub.c index e4d985543c2..32e41b80365 100644 --- a/src/intel/tools/error2aub.c +++ b/src/intel/tools/error2aub.c @@ -498,7 +498,7 @@ main(int argc, char *argv[]) fprintf(stdout, "context dump:\n"); for (int i = 0; i < 60; i++) { if (i % 4 == 0) - fprintf(stdout, "\n 0x%08lx: ", bo_entry->addr + 8192 + i * 4); + fprintf(stdout, "\n 0x%08" PRIx64 ": ", bo_entry->addr + 8192 + i * 4); fprintf(stdout, "0x%08x ", context[i]); } fprintf(stdout, "\n"); diff --git a/src/intel/tools/intel_dump_gpu.c b/src/intel/tools/intel_dump_gpu.c index 23112cadc36..d378375951e 100644 --- a/src/intel/tools/intel_dump_gpu.c +++ b/src/intel/tools/intel_dump_gpu.c @@ -260,14 +260,14 @@ dump_execbuffer2(int fd, struct drm_i915_gem_execbuffer2 *execbuffer2) if (obj->flags & EXEC_OBJECT_PINNED) { bo->offset = obj->offset; if (verbose) - printf("BO #%d (%dB) pinned @ 0x%lx\n", + printf("BO #%d (%dB) pinned @ 0x%" PRIx64 "\n", obj->handle, bo->size, bo->offset); } else { if (obj->alignment != 0) offset = align_u32(offset, obj->alignment); bo->offset = offset; if (verbose) - printf("BO #%d (%dB) @ 0x%lx\n", obj->handle, + printf("BO #%d (%dB) @ 0x%" PRIx64 "\n", obj->handle, bo->size, bo->offset); offset = align_u32(offset + bo->size + 4095, 4096); } -- cgit v1.2.3