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>
This commit is contained in:
Ville Syrjälä
2015-12-13 00:04:43 +02:00
parent a7882a31cb
commit 1ecd91a8c6
7 changed files with 17 additions and 16 deletions
+1 -1
View File
@@ -174,6 +174,6 @@ igt_simple_main
igt_waitchildren();
gettimeofday(&end, NULL);
igt_info("Time to execute %lu children: %7.3fms\n",
igt_info("Time to execute %zu children: %7.3fms\n",
ARRAY_SIZE(children), elapsed(&start, &end) / 1000);
}
+10 -10
View File
@@ -132,11 +132,11 @@ struct event_state {
static void dump_event_state(const struct event_state *es)
{
igt_debug("name = %s\n"
"last_ts = %lu.%lu usec\n"
"last_received_ts = %lu.%lu usec\n"
"last_ts = %ld.%ld usec\n"
"last_received_ts = %ld.%ld usec\n"
"last_seq = %u\n"
"current_ts = %lu.%lu usec\n"
"current_received_ts = %lu.%lu usec\n"
"current_ts = %ld.%ld usec\n"
"current_received_ts = %ld.%ld usec\n"
"current_seq = %u\n"
"count = %u\n"
"seq_step = %d\n",
@@ -644,8 +644,8 @@ static void check_state(struct test_output *o, struct event_state *es)
timersub(&es->current_ts, &es->current_received_ts, &diff);
if (!analog_tv_connector(o)) {
igt_assert_f(diff.tv_sec < 0 || (diff.tv_sec == 0 && diff.tv_usec <= 2000),
"%s ts delayed for too long: %is, %iusec\n",
es->name, (int)diff.tv_sec, (int)diff.tv_usec);
"%s ts delayed for too long: %lds, %ldusec\n",
es->name, diff.tv_sec, diff.tv_usec);
}
@@ -655,9 +655,9 @@ static void check_state(struct test_output *o, struct event_state *es)
timersub(&es->current_ts, &es->last_received_ts, &diff);
igt_assert_f(timercmp(&es->last_received_ts, &es->current_ts, <),
"%s ts before the %s was issued!\n"
"timerdiff %is, %ius\n",
"timerdiff %lds, %ldusec\n",
es->name, es->name,
(int) diff.tv_sec, (int) diff.tv_usec);
diff.tv_sec, diff.tv_usec);
/* check only valid if no modeset happens in between, that increments by
* (1 << 23) on each step. This bounding matches the one in
@@ -688,8 +688,8 @@ static void check_state(struct test_output *o, struct event_state *es)
igt_assert_f(fabs((((double) diff.tv_usec) - usec_interflip) /
usec_interflip) <= 0.005,
"inter-%s ts jitter: %is, %ius\n",
es->name, (int) diff.tv_sec, (int) diff.tv_usec);
"inter-%s ts jitter: %lds, %ldusec\n",
es->name, diff.tv_sec, diff.tv_usec);
igt_assert_f(es->current_seq == es->last_seq + o->seq_step,
"unexpected %s seq %u, expected %u\n",
+1 -1
View File
@@ -1361,7 +1361,7 @@ static void setup_sink_crc(void)
else if (rc == SINK_CRC_SIZE)
sink_crc.supported = true;
else
igt_info("Unexpected sink CRC error, rc=:%ld errno:%d %s\n",
igt_info("Unexpected sink CRC error, rc=:%zd errno:%d %s\n",
rc, errno_, strerror(errno_));
}