Commit 8e723681 authored by Juan David González Cobas's avatar Juan David González Cobas Committed by Alessandro Rubini

lib: add casts to stdint-typed printf arguments

The usual boring stuff to shut up the compiler warnings like
  fdelay-read.c:57: warning: format ‘%lli’ expects type ‘long long int’,
  but argument 3 has type ‘uint64_t’
parent f762e127
......@@ -52,7 +52,8 @@ int main(int argc, char **argv)
fprintf(stderr, " got %i of them\n", i);
for (j = 0; j < i; j++) {
printf("seq %5i: time %lli.%09li + %04x\n",
t[j].seq_id, t[j].utc, (long)t[j].coarse * 8, t[j].frac);
t[j].seq_id, (long long)t[j].utc,
(long)t[j].coarse * 8, t[j].frac);
}
if (i < 0) {
fprintf(stderr, "%s: fdelay_read: %s\n",
......
......@@ -137,8 +137,8 @@ static void parse_time(char *s, struct fdelay_time *t)
void dump_ts(char *title, struct fdelay_time t)
{
printf("%s: secs %lld coarse %d frac %d\n", title, t.utc, t.coarse,
t.frac);
printf("%s: secs %lld coarse %d frac %d\n", title, (long long)t.utc,
t.coarse, t.frac);
}
int main(int argc, char **argv)
......
......@@ -54,7 +54,8 @@ int main(int argc, char **argv)
fprintf(stderr, " got %i of them\n", i);
for (j = 0; j < i; j++) {
printf("seq %5i: time %lli.%09li + %04x\n",
t[j].seq_id, t[j].utc, (long)t[j].coarse * 8, t[j].frac);
t[j].seq_id, (long long)t[j].utc,
(long)t[j].coarse * 8, t[j].frac);
}
if (i < 0) {
fprintf(stderr, "%s: fdelay_read: %s\n",
......@@ -68,7 +69,8 @@ int main(int argc, char **argv)
fprintf(stderr, " got %i of them\n", i);
for (j = 0; j < i; j++) {
printf("seq %5i: time %lli.%09li + %04x\n",
t[j].seq_id, t[j].utc, (long)t[j].coarse * 8, t[j].frac);
t[j].seq_id, (long long)t[j].utc,
(long)t[j].coarse * 8, t[j].frac);
}
fdelay_close(b);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment