summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorVille Syrjälä <ville.syrjala@linux.intel.com>2015-12-13 00:04:43 +0200
committerVille Syrjälä <ville.syrjala@linux.intel.com>2016-01-08 19:56:49 +0200
commit1ecd91a8c6575c663492eee81cd48c8d1cb36914 (patch)
treeaa9177a0a7ed44320f11cc413549064643afd87f /tools
parenta7882a31cb9f516b6068a81221c0fdaf7e9d4073 (diff)
Fix a bunch of printf types
igt_kms.c: In function ‘igt_crtc_set_background’: igt_kms.c:1940:2: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 5 has type ‘uint64_t’ [-Wformat=] LOG(display, "%s.%d: crtc_set_background(%lu)\n", ^ intel_firmware_decode.c: In function ‘csr_open’: intel_firmware_decode.c:169:2: warning: format ‘%zd’ expects argument of type ‘signed size_t’, but argument 3 has type ‘__off_t’ [-Wformat=] printf("Firmware: %s (%zd bytes)\n", filename, st.st_size); ^ intel_gpu_top.c: In function ‘main’: intel_gpu_top.c:683:10: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘uint64_t’ [-Wformat=] stats[i] - last_stats[i]); ^ hsw_compute_wrpll.c: In function ‘main’: hsw_compute_wrpll.c:644:3: warning: format ‘%li’ expects argument of type ‘long int’, but argument 7 has type ‘long long int’ [-Wformat=] igt_fail_on_f(ref->r2 != r2 || ref->n2 != n2 || ref->p != p, ^ gem_gtt_hog.c: In function ‘__real_main155’: gem_gtt_hog.c:177:2: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 4 has type ‘unsigned int’ [-Wformat=] igt_info("Time to execute %lu children: %7.3fms\n", ^ kms_flip.c: In function ‘run_test_step’: kms_flip.c:985:3: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 10 has type ‘__time_t’ [-Wformat=] igt_assert_f(end - start > 0.9 * frame_time(o) && ^ kms_flip.c:985:3: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 11 has type ‘__suseconds_t’ [-Wformat=] kms_frontbuffer_tracking.c: In function ‘setup_sink_crc’: kms_frontbuffer_tracking.c:1364:3: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 4 has type ‘ssize_t’ [-Wformat=] igt_info("Unexpected sink CRC error, rc=:%ld errno:%d %s\n", ^ Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/hsw_compute_wrpll.c2
-rw-r--r--tools/intel_firmware_decode.c3
-rw-r--r--tools/intel_gpu_top.c2
3 files changed, 4 insertions, 3 deletions
diff --git a/tools/hsw_compute_wrpll.c b/tools/hsw_compute_wrpll.c
index e27cc349e630..6c85c07c77c4 100644
--- a/tools/hsw_compute_wrpll.c
+++ b/tools/hsw_compute_wrpll.c
@@ -642,7 +642,7 @@ int main(void)
wrpll_compute_rnp(ref->clock, &r2, &n2, &p);
igt_fail_on_f(ref->r2 != r2 || ref->n2 != n2 || ref->p != p,
- "Computed value differs for %li Hz:\n"" Reference: (%u,%u,%u)\n"" Computed: (%u,%u,%u)\n", (int64_t)ref->clock * 1000, ref->r2, ref->n2, ref->p, r2, n2, p);
+ "Computed value differs for %"PRId64" Hz:\n"" Reference: (%u,%u,%u)\n"" Computed: (%u,%u,%u)\n", (int64_t)ref->clock * 1000, ref->r2, ref->n2, ref->p, r2, n2, p);
}
return 0;
diff --git a/tools/intel_firmware_decode.c b/tools/intel_firmware_decode.c
index ae6e02c4566c..61ce3a531165 100644
--- a/tools/intel_firmware_decode.c
+++ b/tools/intel_firmware_decode.c
@@ -25,6 +25,7 @@
*/
#include <fcntl.h>
+#include <inttypes.h>
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
@@ -166,7 +167,7 @@ static void csr_open(csr_t *ctx, const char *filename)
ctx->fd, 0);
igt_fail_on_f(ctx->base == MAP_FAILED, "Couldn't mmap %s\n", filename);
- printf("Firmware: %s (%zd bytes)\n", filename, st.st_size);
+ printf("Firmware: %s (%"PRId64" bytes)\n", filename, (int64_t)st.st_size);
ctx->css_header = (struct intel_css_header *)ctx->base;
ctx->package_header = (struct intel_package_header *)
diff --git a/tools/intel_gpu_top.c b/tools/intel_gpu_top.c
index b5cfda043dd9..4f327c6daf6b 100644
--- a/tools/intel_gpu_top.c
+++ b/tools/intel_gpu_top.c
@@ -679,7 +679,7 @@ int main(int argc, char **argv)
for (i = 0; i < MAX_NUM_TOP_BITS; i++) {
if (i < STATS_COUNT && HAS_STATS_REGS(devid)) {
- fprintf(output, "%lu\t",
+ fprintf(output, "%"PRIu64"\t",
stats[i] - last_stats[i]);
last_stats[i] = stats[i];
}