From 785d14dbec3c485dddb43a1b92f709d24e249b25 Mon Sep 17 00:00:00 2001 From: Jaroslav Kysela Date: Fri, 12 May 2017 22:06:17 +0200 Subject: [PATCH] fixed from rpmfusion detected by gcc7 --- src/dvr/dvr_rec.c | 6 +++--- src/epggrab/module/xmltv.c | 2 +- src/idnode.c | 2 +- src/lock.c | 2 +- src/rtsp.c | 2 +- src/subscriptions.c | 2 +- src/webui/webui.c | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/dvr/dvr_rec.c b/src/dvr/dvr_rec.c index 0370325ff..e126c8027 100644 --- a/src/dvr/dvr_rec.c +++ b/src/dvr/dvr_rec.c @@ -612,8 +612,8 @@ dvr_sub_basic_info(const char *id, const char *fmt, const void *aux, char *tmp, tmp[0] = '\0'; HTSMSG_FOREACH(f, info) { if (!(e = htsmsg_field_get_map(f))) continue; - if ((s = htsmsg_get_str(e, "type")) != NULL) continue; - tvh_strlcatf(tmp, tmplen, l, "%s%s", l > 0 ? "," : "", s); + if ((s = htsmsg_get_str(e, "type")) != NULL) + tvh_strlcatf(tmp, tmplen, l, "%s%s", l > 0 ? "," : "", s); } return tmp; } @@ -915,7 +915,7 @@ dvr_rec_start(dvr_entry_t *de, const streaming_start_t *ss) const source_info_t *si = &ss->ss_si; streaming_start_t *ss_copy; const streaming_start_component_t *ssc; - char res[11], asp[6], sr[6], ch[7]; + char res[14], asp[14], sr[6], ch[7]; dvr_config_t *cfg = de->de_config; profile_chain_t *prch = de->de_chain; htsmsg_t *info, *e; diff --git a/src/epggrab/module/xmltv.c b/src/epggrab/module/xmltv.c index e4d063001..5998919a4 100644 --- a/src/epggrab/module/xmltv.c +++ b/src/epggrab/module/xmltv.c @@ -843,7 +843,7 @@ static void _xmltv_load_grabbers ( void ) /* Internal search */ } else if ((tmp = getenv("PATH"))) { tvhdebug(LS_XMLTV, "using internal grab search"); - char bin[256]; + char bin[PATH_MAX]; char *argv[] = { NULL, (char *)"--description", diff --git a/src/idnode.c b/src/idnode.c index 3d8fad09c..17c0dffa9 100644 --- a/src/idnode.c +++ b/src/idnode.c @@ -1546,7 +1546,7 @@ idnode_slist_set ( idnode_t *in, idnode_slist_t *options, const htsmsg_t *vals ) ip = (void *)in + o->off; if (!changed) { HTSMSG_FOREACH(f, vals) { - if ((s = htsmsg_field_get_str(f)) != NULL) + if ((s = htsmsg_field_get_str(f)) == NULL) continue; if (strcmp(s, o->id)) continue; diff --git a/src/lock.c b/src/lock.c index 608e02d84..ffa9d6ebe 100644 --- a/src/lock.c +++ b/src/lock.c @@ -31,7 +31,7 @@ int state_lock_(const char *lfile, int lock, int timeout, int _fd) int fd = -1, err = 0; struct flock lck; struct stat st; - char lcktxt[12]; + char lcktxt[13]; lck.l_type = lock ? F_WRLCK : F_UNLCK; lck.l_whence = SEEK_SET; diff --git a/src/rtsp.c b/src/rtsp.c index dcebe3e8a..274361e25 100644 --- a/src/rtsp.c +++ b/src/rtsp.c @@ -38,7 +38,7 @@ rtsp_send_ext( http_client_t *hc, http_cmd_t cmd, (hc->hc_port != 554 ? 7 : 0) + (path ? strlen(path) : 1) + 1; char *buf = alloca(blen); - char buf2[7]; + char buf2[11]; char buf_body[size + 3]; if (hc->hc_rtsp_session) { diff --git a/src/subscriptions.c b/src/subscriptions.c index a54a69217..2eb998e4a 100644 --- a/src/subscriptions.c +++ b/src/subscriptions.c @@ -976,7 +976,7 @@ subscription_create_msg(th_subscription_t *s, const char *lang) descramble_info_t *di; service_t *t; profile_t *pro; - char buf[256]; + char buf[284]; const char *state; htsmsg_add_u32(m, "id", s->ths_id); diff --git a/src/webui/webui.c b/src/webui/webui.c index 4f0421b21..a3f22fca1 100644 --- a/src/webui/webui.c +++ b/src/webui/webui.c @@ -211,7 +211,7 @@ page_login(http_connection_t *hc, const char *remain, void *opaque) { if (hc->hc_access != NULL && hc->hc_access->aa_username != NULL && - hc->hc_access->aa_username != '\0') { + *hc->hc_access->aa_username != '\0') { http_redirect(hc, "/", &hc->hc_req_args, 0); return 0; } else { -- 2.47.2