Mesa (master): compiler/glsl/tests: Fix print format when building 32-bit binaries on 64-bit host
Aaron Watry
awatry at kemper.freedesktop.org
Wed Nov 23 16:18:31 UTC 2016
Module: Mesa
Branch: master
Commit: 60c3a0a67c758abd731be49c462da1f14a8f778f
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=60c3a0a67c758abd731be49c462da1f14a8f778f
Author: Aaron Watry <awatry at gmail.com>
Date: Tue Nov 22 11:18:11 2016 -0600
compiler/glsl/tests: Fix print format when building 32-bit binaries on 64-bit host
Avoids three warnings.
Signed-off-by: Aaron Watry <awatry at gmail.com>
Reviewed-by: Matt Turner <mattst88 at gmail.com>
---
src/compiler/glsl/tests/blob_test.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/src/compiler/glsl/tests/blob_test.c b/src/compiler/glsl/tests/blob_test.c
index 4806029..09114b1 100644
--- a/src/compiler/glsl/tests/blob_test.c
+++ b/src/compiler/glsl/tests/blob_test.c
@@ -23,6 +23,7 @@
/* A collection of unit tests for blob.c */
+#include <inttypes.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
@@ -49,7 +50,10 @@ static void
expect_equal(uint64_t expected, uint64_t actual, 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;
}
@@ -59,7 +63,9 @@ static void
expect_unequal(uint64_t expected, uint64_t actual, const char *test)
{
if (actual == expected) {
- fprintf (stderr, "Error: Test '%s' failed: Result=%ld, but expected something different.\n",
+ fprintf(stderr,
+ "Error: Test '%s' failed: Result=%" PRIu64 ", "
+ "but expected something different.\n",
test, actual);
error = true;
}
More information about the mesa-commit
mailing list