From: Marek Schimara Date: Thu, 1 Sep 2016 13:10:52 +0000 (+0200) Subject: src/rrd_cgi.c: fix icc warnings "function was declared but never referenced" X-Git-Tag: v1.7.0~35^2~12 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7ca91d1fe2e609e70d7635a822b376ac3e53cf36;p=thirdparty%2Frrdtool-1.x.git src/rrd_cgi.c: fix icc warnings "function was declared but never referenced" Functions rrdcgiHeader(), rrdcgiFree(), rrdcgiFreeList() are never called. --- diff --git a/src/rrd_cgi.c b/src/rrd_cgi.c index 66d3c2b5..d57eecfe 100644 --- a/src/rrd_cgi.c +++ b/src/rrd_cgi.c @@ -118,13 +118,6 @@ static char *stralloc( /* global variable for rrdcgi */ s_cgi *rrdcgiArg; -/* rrdcgiHeader - * - * Prints a valid CGI Header (Content-type...) etc. - */ -static void rrdcgiHeader( - void); - /* rrdcgiDecodeString * decode html escapes */ @@ -156,20 +149,6 @@ static char *rrdcgiGetValue( s_cgi * parms, const char *name); -/* rrdcgiFreeList - * - * Frees a list as returned by rrdcgiGetVariables() - */ -static void rrdcgiFreeList( - char **list); - -/* rrdcgiFree - * - * Frees the internal data structures - */ -static void rrdcgiFree( - s_cgi * parms); - /* rrdcgiReadVariables() * * Read from stdin if no string is provided via CGI. Variables that @@ -1306,18 +1285,6 @@ static char *http_time( return (buf); } -static void rrdcgiHeader( - void) -{ - if (rrdcgiType) - printf("Content-type: %s\n", rrdcgiType); - else - printf("Content-type: text/html\n"); - if (rrdcgiHeaderString) - printf("%s", rrdcgiHeaderString); - printf("\n"); -} - static void rrdcgiDebug( int level, int where) @@ -1624,41 +1591,3 @@ static char *rrdcgiGetValue( return NULL; } -static void rrdcgiFreeList( - char **list) -{ - int i; - - for (i = 0; list[i] != NULL; i++) - free(list[i]); - free(list); -} - -static void rrdcgiFree( - s_cgi * parms) -{ - int i; - - if (!parms) - return; - if (parms->vars) { - for (i = 0; parms->vars[i]; i++) { - if (parms->vars[i]->name) - free(parms->vars[i]->name); - if (parms->vars[i]->value) - free(parms->vars[i]->value); - free(parms->vars[i]); - } - free(parms->vars); - } - free(parms); - - if (rrdcgiHeaderString) { - free(rrdcgiHeaderString); - rrdcgiHeaderString = NULL; - } - if (rrdcgiType) { - free(rrdcgiType); - rrdcgiType = NULL; - } -}