From: Sebastian Harl Date: Sat, 26 Apr 2014 10:27:44 +0000 (+0200) Subject: Fixed various unused variable compiler warnings. X-Git-Tag: v1.5.0-rc1~108^2~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e2dbb724b36ed37b2ebbe008078cfb3b95d3667f;p=thirdparty%2Frrdtool-1.x.git Fixed various unused variable compiler warnings. --- diff --git a/src/rrd_daemon.c b/src/rrd_daemon.c index e9803ee4..0d31fac4 100644 --- a/src/rrd_daemon.c +++ b/src/rrd_daemon.c @@ -1904,7 +1904,6 @@ static int handle_request_create (HANDLER_PROTO) /* {{{ */ { char *file, file_tmp[PATH_MAX]; char *file_copy, *dir, *dir_tmp[PATH_MAX]; - struct stat st; char *tok; int ac = 0; char *av[128]; diff --git a/src/rrd_graph.c b/src/rrd_graph.c index 0990edb1..ac2f3b8a 100644 --- a/src/rrd_graph.c +++ b/src/rrd_graph.c @@ -12,6 +12,7 @@ #endif #include "rrd_tool.h" +#include "unused.h" /* for basename */ #ifdef HAVE_LIBGEN_H @@ -3982,10 +3983,8 @@ int graph_cairo_finish (image_desc_t *im) } int graph_paint_xy( - image_desc_t *im, int lazy, int cnt) + image_desc_t UNUSED(*im), int UNUSED(lazy), int UNUSED(cnt)) { - /* to stop compiler warnings for now */ - lazy=cnt=(int)im->gdes_c; rrd_set_error("XY diagramm not implemented"); return -1; } diff --git a/src/rrd_graph_helper.c b/src/rrd_graph_helper.c index 90a90890..d45eadd0 100644 --- a/src/rrd_graph_helper.c +++ b/src/rrd_graph_helper.c @@ -197,7 +197,6 @@ int parseArguments(const char* origarg, parsedargs_t* pa) { pa->arg_orig=origarg; /* first split arg into : */ - char last=1; char c; int cnt=0; int poscnt=0; @@ -268,8 +267,6 @@ int parseArguments(const char* origarg, parsedargs_t* pa) { default: break; } - /* assign last */ - last=c; /* and step to next one byte */ pos++; } while (c); diff --git a/src/rrd_xport.c b/src/rrd_xport.c index 57ed991f..452685dc 100644 --- a/src/rrd_xport.c +++ b/src/rrd_xport.c @@ -862,10 +862,8 @@ int rrd_xport_format_addprints(int flags,stringbuffer_t *buffer,image_desc_t *im /* define some other stuff based on flags */ int json=0; if (flags &1) { json=1; } - int showtime=0; - if (flags &2) { showtime=1;} - int enumds=0; - if (flags &4) { enumds=1;} + // int showtime=0; if (flags &2) { showtime=1;} -> unused here + // int enumds=0; if (flags &4) { enumds=1;} -> unused here /* define some values */ time_t now = time(NULL);