[Mesa-dev] [PATCH 2/3] compiler/glsl/tests: Fix print format when building 32-bit on 64-bit host

Aaron Watry awatry at gmail.com
Tue Nov 22 18:46:45 UTC 2016


Avoids two warnings.

Signed-off-by: Aaron Watry <awatry at gmail.com>
---
 src/compiler/glsl/tests/cache_test.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/compiler/glsl/tests/cache_test.c b/src/compiler/glsl/tests/cache_test.c
index ca22605..0ef05aa 100644
--- a/src/compiler/glsl/tests/cache_test.c
+++ b/src/compiler/glsl/tests/cache_test.c
@@ -30,6 +30,7 @@
 #include <ftw.h>
 #include <errno.h>
 #include <stdarg.h>
+#include <inttypes.h>
 
 #include "util/mesa-sha1.h"
 #include "util/disk_cache.h"
@@ -42,7 +43,8 @@ static void
 expect_equal(uint64_t actual, uint64_t expected, const char *test)
 {
    if (actual != expected) {
-      fprintf(stderr, "Error: Test '%s' failed: Expected=%ld, Actual=%ld\n",
+      fprintf(stderr, "Error: Test '%s' failed: Expected=%" PRIu64
+              ", Actual=%" PRIu64 "\n",
               test, expected, actual);
       error = true;
    }
-- 
2.7.4



More information about the mesa-dev mailing list