From: Adam Sutton Date: Thu, 13 Dec 2012 21:29:22 +0000 (+0000) Subject: Issue #1454 - init strtok_r() state ptrs, older gcc whinges. X-Git-Tag: v3.5~236 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7d97d1f648ed720785eac367481d8e56ea8f1ff8;p=thirdparty%2Ftvheadend.git Issue #1454 - init strtok_r() state ptrs, older gcc whinges. --- diff --git a/src/epggrab/module/xmltv.c b/src/epggrab/module/xmltv.c index c6f1006ef..d8616f9a0 100644 --- a/src/epggrab/module/xmltv.c +++ b/src/epggrab/module/xmltv.c @@ -634,7 +634,7 @@ static void _xmltv_load_grabbers ( void ) size_t i, p, n; char *outbuf; char name[1000]; - char *tmp, *tmp2, *path; + char *tmp, *tmp2 = NULL, *path; /* Load data */ outlen = spawn_and_store_stdout(XMLTV_FIND, NULL, &outbuf); diff --git a/src/filebundle.c b/src/filebundle.c index 15a4d4c5f..a7db77b04 100644 --- a/src/filebundle.c +++ b/src/filebundle.c @@ -214,7 +214,7 @@ fb_dir *fb_opendir ( const char *path ) /* Bundle */ #if ENABLE_BUNDLE - char *tmp1, *tmp2, *tmp3; + char *tmp1, *tmp2, *tmp3 = NULL; *tmp1 = strdup(path); *tmp2 = strtok_r(tmp1, "/", &tmp3); filebundle_entry_t *fb = filebundle_root; diff --git a/src/spawn.c b/src/spawn.c index 0cee4bdd5..534e5af7e 100644 --- a/src/spawn.c +++ b/src/spawn.c @@ -53,7 +53,7 @@ find_exec ( const char *name, char *out, size_t len ) { int ret = 0; char bin[512]; - char *path, *tmp, *tmp2; + char *path, *tmp, *tmp2 = NULL; DIR *dir; struct dirent *de; struct stat st; diff --git a/src/webui/extjs.c b/src/webui/extjs.c index e27935afc..efb79c80f 100644 --- a/src/webui/extjs.c +++ b/src/webui/extjs.c @@ -352,7 +352,7 @@ extjs_channels_update(htsmsg_t *in) if((s = htsmsg_get_str(c, "epggrabsrc")) != NULL) { char *tmp = strdup(s); - char *sptr, *sptr2; + char *sptr = NULL, *sptr2 = NULL; char *modecid = strtok_r(tmp, ",", &sptr); char *modid, *ecid; epggrab_module_t *mod;