Fix a few printf errors detected following addition of format validation.

This commit is contained in:
Adam Sutton 2012-08-24 10:06:41 +01:00
parent f78fed927d
commit efb0fb9246
8 changed files with 21 additions and 21 deletions

View file

@ -805,7 +805,7 @@ handle_ecm_reply(cwc_service_t *ct, ecm_section_t *es, uint8_t *msg,
}
tvhlog(LOG_DEBUG, "cwc", "Received NOK for service \"%s\"%s (seqno: %d "
"Req delay: %lld ms)", t->s_svcname, chaninfo, seq, delay);
"Req delay: %"PRIu64" ms)", t->s_svcname, chaninfo, seq, delay);
forbid:
LIST_FOREACH(ep, &ct->cs_pids, ep_link) {
@ -821,7 +821,7 @@ forbid:
}
tvhlog(LOG_ERR, "cwc",
"Can not descramble service \"%s\", access denied (seqno: %d "
"Req delay: %lld ms)",
"Req delay: %"PRIu64" ms)",
t->s_svcname, seq, delay);
ct->cs_keystate = CS_FORBIDDEN;
return;
@ -835,7 +835,7 @@ forbid:
"Received ECM reply%s for service \"%s\" "
"even: %02x.%02x.%02x.%02x.%02x.%02x.%02x.%02x"
" odd: %02x.%02x.%02x.%02x.%02x.%02x.%02x.%02x (seqno: %d "
"Req delay: %lld ms)",
"Req delay: %"PRIu64" ms)",
chaninfo,
t->s_svcname,
msg[3 + 0], msg[3 + 1], msg[3 + 2], msg[3 + 3], msg[3 + 4],
@ -858,7 +858,7 @@ forbid:
if(ct->cs_keystate != CS_RESOLVED)
tvhlog(LOG_INFO, "cwc",
"Obtained key for service \"%s\" in %lld ms, from %s:%i",
"Obtained key for service \"%s\" in %"PRIu64" ms, from %s:%i",
t->s_svcname, delay, ct->cs_cwc->cwc_hostname,
ct->cs_cwc->cwc_port);

View file

@ -498,7 +498,7 @@ dvb_fe_tune(th_dvb_mux_instance_t *tdmi, const char *reason)
if(r != 0) {
tvhlog(LOG_ERR, "dvb", "\"%s\" tuning to \"%s\""
" -- Front configuration failed -- %s, frequency: %ld",
" -- Front configuration failed -- %s, frequency: %u",
tda->tda_rootpath, buf, strerror(errno), p->frequency);
/* Remove from initial scan set */

View file

@ -70,7 +70,7 @@ static void _epggrab_module_grab ( epggrab_module_int_t *mod )
/* Process */
if ( data ) {
tvhlog(LOG_INFO, mod->id, "grab took %d seconds", tm2 - tm1);
tvhlog(LOG_INFO, mod->id, "grab took %"PRItime_t" seconds", tm2 - tm1);
epggrab_module_parse(mod, data);
} else {
tvhlog(LOG_WARNING, mod->id, "grab returned no data");

View file

@ -120,7 +120,7 @@ void epggrab_module_parse
htsmsg_destroy(data);
/* Debug stats */
tvhlog(LOG_INFO, mod->id, "parse took %d seconds", tm2 - tm1);
tvhlog(LOG_INFO, mod->id, "parse took %"PRItime_t" seconds", tm2 - tm1);
tvhlog(LOG_INFO, mod->id, " channels tot=%5d new=%5d mod=%5d",
stats.channels.total, stats.channels.created,
stats.channels.modified);
@ -307,7 +307,7 @@ static void _epggrab_socket_handler ( epggrab_module_ext_t *mod, int s )
/* Process */
if ( data ) {
tvhlog(LOG_INFO, mod->id, "grab took %d seconds", tm2 - tm1);
tvhlog(LOG_INFO, mod->id, "grab took %"PRItime_t" seconds", tm2 - tm1);
epggrab_module_parse(mod, data);
/* Failed */

View file

@ -339,7 +339,7 @@ service_find(channel_t *ch, unsigned int weight, const char *loginfo,
if(t->s_quality_index(t) < 10) {
if(loginfo != NULL) {
tvhlog(LOG_NOTICE, "Service",
"%s: Skipping \"%s\" -- Quality below 10%",
"%s: Skipping \"%s\" -- Quality below 10%%",
loginfo, service_nicename(t));
err = SM_CODE_BAD_SIGNAL;
}

View file

@ -218,7 +218,7 @@ v4l_service_start(service_t *t, unsigned int weight, int force_start)
}
if(pipe(va->va_pipe)) {
tvhlog(LOG_ERR, "v4l",
"%s: Unable to create control pipe", va->va_path, strerror(errno));
"%s: Unable to create control pipe [%s]", va->va_path, strerror(errno));
close(fd);
return -1;
}
@ -524,7 +524,7 @@ v4l_adapter_check(const char *path, int fd)
path,
fmtdesc.index,
fmtdesc.description,
&fmtdesc.pixelformat,
(char*)&fmtdesc.pixelformat,
fmtdesc.flags & V4L2_FMT_FLAG_COMPRESSED ? "(compressed)" : "");
if(fmtdesc.pixelformat == V4L2_PIX_FMT_MPEG)

View file

@ -126,7 +126,7 @@ page_simple(http_connection_t *hc,
s = epg_episode_get_title(e->episode, lang);
htsbuf_qprintf(hq,
"<a href=\"/eventinfo/%d\">"
"<a href=\"/eventinfo/%"PRIu64"\">"
"%02d:%02d-%02d:%02d&nbsp;%s%s%s</a><br>",
e->id,
a.tm_hour, a.tm_min, b.tm_hour, b.tm_min,
@ -240,7 +240,7 @@ page_einfo(http_connection_t *hc, const char *remain, void *opaque)
if((rstatus = val2str(dvr_status, recstatustxt)) != NULL)
htsbuf_qprintf(hq, "Recording status: %s<br>", rstatus);
htsbuf_qprintf(hq, "<form method=\"post\" action=\"/eventinfo/%d\">",
htsbuf_qprintf(hq, "<form method=\"post\" action=\"/eventinfo/%"PRIu64"\">",
e->id);
switch(dvr_status) {
@ -408,14 +408,14 @@ page_status(http_connection_t *hc,
"<start>"
"<date>%02d/%02d/%02d</date>"
"<time>%02d:%02d</time>"
"<unixtime>%d</unixtime>"
"<extra_start>%d</extra_start>"
"<unixtime>%"PRItime_t"</unixtime>"
"<extra_start>%"PRItime_t"</extra_start>"
"</start>"
"<stop>"
"<date>%02d/%02d/%02d</date>"
"<time>%02d:%02d</time>"
"<unixtime>%d</unixtime>"
"<extra_stop>%d</extra_stop>"
"<unixtime>%"PRItime_t"</unixtime>"
"<extra_stop>%"PRItime_t"</extra_stop>"
"</stop>"
"<title>%s</title>",
a.tm_year + 1900, a.tm_mon, a.tm_mday,

View file

@ -377,9 +377,9 @@ http_dvr_list_playlist(http_connection_t *hc)
durration += (de->de_stop_extra + de->de_start_extra)*60;
bandwidth = ((8*fsize) / (durration*1024.0));
htsbuf_qprintf(hq, "#EXTINF:%d,%s\n", durration, de->de_title);
htsbuf_qprintf(hq, "#EXTINF:%"PRId64",%s\n", durration, de->de_title);
htsbuf_qprintf(hq, "#EXT-X-TARGETDURATION:%d\n", durration);
htsbuf_qprintf(hq, "#EXT-X-TARGETDURATION:%"PRId64"\n", durration);
htsbuf_qprintf(hq, "#EXT-X-STREAM-INF:PROGRAM-ID=%d,BANDWIDTH=%d\n", de->de_id, bandwidth);
snprintf(buf, sizeof(buf), "/dvrfile/%d", de->de_id);
@ -415,9 +415,9 @@ http_dvr_playlist(http_connection_t *hc, dvr_entry_t *de)
bandwidth = ((8*fsize) / (durration*1024.0));
htsbuf_qprintf(hq, "#EXTM3U\n");
htsbuf_qprintf(hq, "#EXTINF:%d,%s\n", durration, de->de_title);
htsbuf_qprintf(hq, "#EXTINF:%"PRId64",%s\n", durration, de->de_title);
htsbuf_qprintf(hq, "#EXT-X-TARGETDURATION:%d\n", durration);
htsbuf_qprintf(hq, "#EXT-X-TARGETDURATION:%"PRId64"\n", durration);
htsbuf_qprintf(hq, "#EXT-X-STREAM-INF:PROGRAM-ID=%d,BANDWIDTH=%d\n", de->de_id, bandwidth);
snprintf(buf, sizeof(buf), "/dvrfile/%d", de->de_id);