diff --git a/tests/spec/arb_timer_query/timestamp-get.c b/tests/spec/arb_timer_query/timestamp-get.c
index 3e5a074..5cc896b 100644
--- a/tests/spec/arb_timer_query/timestamp-get.c
+++ b/tests/spec/arb_timer_query/timestamp-get.c
@@ -69,16 +69,16 @@ static void
 validate_times(GLint64 t1, GLint64 t2, GLint64 tolerance)
 {
 	if (t1 > t2) {
-		printf("old time = %llu us\n", t1 / 1000);
-		printf("new time = %llu us\n", t2 / 1000);
+		printf("old time = %llu us\n", (unsigned long long) t1 / 1000);
+		printf("new time = %llu us\n", (unsigned long long) t2 / 1000);
 		puts("old time > new time");
 		piglit_report_result(PIGLIT_FAIL);
 	}
 
 	/* the tolerance of 1 milisecond seems to be sufficient */
 	if (t2 - t1 > tolerance) {
-		printf("time 1 = %llu us\n", t1 / 1000);
-		printf("time 2 = %llu us\n", t2 / 1000);
+		printf("time 1 = %llu us\n", (unsigned long long) t1 / 1000);
+		printf("time 2 = %llu us\n", (unsigned long long) t2 / 1000);
 		puts("too big difference");
 		piglit_report_result(PIGLIT_FAIL);
 	}
@@ -105,8 +105,8 @@ piglit_display(void)
 	get_gpu_time_via_get(q);
 	get_overhead = get_cpu_time() - t1;
 
-	printf("glGet overhead: %llu us\n", get_overhead / 1000);
-	printf("glQuery overhead: %llu us\n", query_overhead / 1000);
+	printf("glGet overhead: %llu us\n", (unsigned long long) get_overhead / 1000);
+	printf("glQuery overhead: %llu us\n", (unsigned long long) query_overhead / 1000);
 
 	/* minimum tolerance is 3 ms */
 	tolerance = query_overhead + get_overhead + 3000000;
