[PATCH i-g-t 1/5] Fix compiler warnings about printf() arguments

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>

gem_spin_batch.c:51:13: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘long unsigned int’ [-Wformat=]
intel_opregion_decode.c:313:9: warning: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 2 has type ‘uint64_t {aka const long long unsigned int}’ [-Wformat=]

Signed-off-by: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>
---
 tests/gem_spin_batch.c        | 2 +-
 tools/intel_opregion_decode.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/gem_spin_batch.c b/tests/gem_spin_batch.c
index 941aa1399ae1..09bb3cb37108 100644
--- a/tests/gem_spin_batch.c
+++ b/tests/gem_spin_batch.c
@@ -48,7 +48,7 @@ static void spin(int fd, unsigned int engine, unsigned int timeout_sec)
 		igt_spin_batch_set_timeout(spin,
 					   timeout_100ms - igt_nsec_elapsed(&itv));
 		gem_sync(fd, spin->handle);
-		igt_debug("loop %d: interval=%fms (target 100ms), elapsed %fms\n",
+		igt_debug("loop %lu: interval=%fms (target 100ms), elapsed %fms\n",
 			  loops,
 			  igt_nsec_elapsed(&itv) * 1e-6,
 			  igt_nsec_elapsed(&tv) * 1e-6);
diff --git a/tools/intel_opregion_decode.c b/tools/intel_opregion_decode.c
index f532c1e2952b..380e43a8b514 100644
--- a/tools/intel_opregion_decode.c
+++ b/tools/intel_opregion_decode.c
@@ -310,7 +310,7 @@ static void decode_asle(const void *buffer)
 
 	printf("\tfdsp:\t0x%08x\n", asle->fdsp);
 	printf("\tstat:\t0x%08x\n", asle->stat);
-	printf("\trvda:\t0x%016lx\n", asle->rvda);
+	printf("\trvda:\t0x%016"PRIx64"\n", asle->rvda);
 	printf("\trvds:\t0x%08x\n", asle->rvds);
 
 	printf("\n");
-- 
2.13.5

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux