Use tv2ms() which returns long unsigned where appropriate.
For the remaining cases, cast the members of struct timeval
to long unsigned if used via a format string.
afl[i].init(&afl[i]);
}
ms2tv(conf.announce_time_arg, &announce_tv);
- PARA_INFO_LOG("announce timeval: %lu:%lu\n", announce_tv.tv_sec, announce_tv.tv_usec);
+ PARA_INFO_LOG("announce timeval: %lums\n", tv2ms(&announce_tv));
for (i = 0; senders[i].name; i++) {
PARA_NOTICE_LOG("initializing %s sender\n", senders[i].name);
senders[i].init(&senders[i]);
else
tv_diff(&server_stream_start, &sa_time_diff, &rss);
tv_add(&rss, &delay, &tmp);
- replacement = make_message("%lu:%lu", tmp.tv_sec, tmp.tv_usec);
+ replacement = make_message("%lu:%lu",
+ (long unsigned)tmp.tv_sec,
+ (long unsigned)tmp.tv_usec);
ret = s_a_r(cmd, "STREAM_START", replacement);
free(replacement);
if (!ret)
goto out;
PARA_INFO_LOG("cmd: %s, repl: %s\n", cmd, ret);
- {
- struct timeval now;
- gettimeofday(&now, NULL);
- PARA_INFO_LOG("now: %lu:%lu\n", now.tv_sec, now.tv_usec);
- }
out:
return ret;
}
nmmd->audio_file_info,
status_item_list[SI_UPTIME], ut,
- status_item_list[SI_STREAM_START], nmmd->stream_start.tv_sec,
- nmmd->stream_start.tv_usec,
+ status_item_list[SI_STREAM_START],
+ (long unsigned)nmmd->stream_start.tv_sec,
+ (long unsigned)nmmd->stream_start.tv_usec,
status_item_list[SI_CURRENT_TIME], now.tv_sec, now.tv_usec
);
int v = mp3.id3_isvalid;
snprintf(info_str, MMD_INFO_SIZE,
- "audio_file_info1:%d x %lu, %lu kbit/s (%cbr) %i KHz %s\n"
+ "audio_file_info1:%d x %lums, %lu kbit/s (%cbr) %i KHz %s\n"
"audio_file_info2:%s, by %s\n"
"audio_file_info3:A: %s, Y: %s, C: %s\n",
mp3.frames,
- af->chunk_tv.tv_usec,
+ tv2ms(&af->chunk_tv),
mp3.br_average,
mp3.vbr? 'v' : 'c',
mp3.freq / 1000,
mp3.seconds = (tv2ms(&total_time) + 500) / 1000;
tv_divide(fcount, &total_time, &af->chunk_tv);
rewind(mp3.file);
- PARA_DEBUG_LOG("chunk_time: %lu\n", af->chunk_tv.tv_usec);
+ PARA_DEBUG_LOG("chunk_time: %lums\n", tv2ms(&af->chunk_tv));
tv_scale(30, &af->chunk_tv, &af->eof_tv);
PARA_DEBUG_LOG("eof timeout: %lu\n", tv2ms(&af->eof_tv));
return 1;