Project

General

Profile

Some problems I have encountered in compiling TVH version 4.3

Added by shengkun zang about 7 years ago

CC src/subscriptions.o
src/subscriptions.c: In function ‘subscription_create_msg’:
src/subscriptions.c:1028:57: error: ‘%s’ directive output may be truncated writing up to 127 bytes into a region of size between 100 and 239 [-Werror=format-truncation=]
snprintf(buf, sizeof(buf), "%04X:%06X(%ums)-%s%s%s",
^
src/subscriptions.c:1028:9: note: ‘snprintf’ output between 18 and 284 bytes into a destination of size 256
snprintf(buf, sizeof(buf), "%04X:%06X(%ums)-%s%s%s",
^
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
di->caid, di->provid, di->ecmtime, di->from,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
di->reader0 ? "/" : "", di->reader);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
Makefile:630: recipe for target '/home/stone/tvheadend-4.3/build.linux/src/subscriptions.o' failed
make: *** [/home/stone/tvheadend-4.3/build.linux/src/subscriptions.o] Error

source file 1028 line:

pthread_mutex_lock(&t->s_stream_mutex);
if ((di = s->ths_service->s_descramble_info) != NULL) {
if (di->caid 0 && di->ecmtime 0) {
snprintf(buf, sizeof(buf), N_("Failed"));
} else {
snprintf(buf, sizeof(buf), "%04X:%06X(%ums)-%s%s%s",
di->caid, di->provid, di->ecmtime, di->from,
di->reader[0] ? "/" : "", di->reader);
}
htsmsg_add_str(m, "descramble", buf);
}
pthread_mutex_unlock(&t->s_stream_mutex);