]> git.ipfire.org Git - thirdparty/rrdtool-1.x.git/commitdiff
src/rrd_cgi.c: fix icc warnings "function was declared but never referenced"
authorMarek Schimara <Marek.Schimara@bull.net>
Thu, 1 Sep 2016 13:10:52 +0000 (15:10 +0200)
committerMarek Schimara <Marek.Schimara@bull.net>
Fri, 2 Sep 2016 13:31:38 +0000 (15:31 +0200)
        Functions rrdcgiHeader(), rrdcgiFree(), rrdcgiFreeList() are
        never called.

src/rrd_cgi.c

index 66d3c2b54214522cb46398aade5afe9a6fd1c816..d57eecfebced1b01f3e39b02da8c28941186c4f5 100644 (file)
@@ -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;
-    }
-}