From: oetiker Date: Tue, 14 Aug 2012 09:23:11 +0000 (+0000) Subject: remove a bunch of variables which were set but never used as pointed out by gcc X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=6e9ba366986bd55be1c0b9b4c066e84b509ecd19;p=rrdtool-all.git remove a bunch of variables which were set but never used as pointed out by gcc git-svn-id: svn://svn.oetiker.ch/rrdtool/branches/1.4@2303 a5681a0c-68f1-0310-ab6d-d61299d08faa --- diff --git a/program/src/rrd_cgi.c b/program/src/rrd_cgi.c index 98487158..20d464cf 100644 --- a/program/src/rrd_cgi.c +++ b/program/src/rrd_cgi.c @@ -458,9 +458,7 @@ int main( int argc, char *argv[]) { - long length; char *buffer; - char *server_url = NULL; long i; long filter = 0; struct option long_options[] = { @@ -502,7 +500,6 @@ int main( if (!filter) { rrdcgiDebug(0, 0); rrdcgiArg = rrdcgiInit(); - server_url = getenv("SERVER_URL"); } /* make sure we have one extra argument, @@ -516,7 +513,7 @@ int main( fprintf(stderr, "ERROR: expected a filename\n"); exit(1); } else { - length = readfile(argv[optind], &buffer, 1); + readfile(argv[optind], &buffer, 1); } if (rrd_test_error()) { diff --git a/program/src/rrd_graph.c b/program/src/rrd_graph.c index dd1b2082..6ad540a0 100644 --- a/program/src/rrd_graph.c +++ b/program/src/rrd_graph.c @@ -1709,7 +1709,6 @@ int leg_place( int leg_c = 0; double leg_x = border; int leg_y = 0; //im->yimg; - int leg_y_prev = 0; // im->yimg; int leg_cc; double glue = 0; int i, ii, mark = 0; @@ -1885,7 +1884,6 @@ int leg_place( +(double)legspace[ii] + glue; } - leg_y_prev = leg_y; if (leg_x > border || prt_fctn == 's') leg_y += im->text_prop[TEXT_PROP_LEGEND].size * 1.8; if (prt_fctn == 's') diff --git a/program/src/rrd_open.c b/program/src/rrd_open.c index a469d56e..7f9358dd 100644 --- a/program/src/rrd_open.c +++ b/program/src/rrd_open.c @@ -621,9 +621,11 @@ off_t rrd_seek( int whence) { off_t ret = 0; +#ifndef HAVE_MMAP rrd_simple_file_t *rrd_simple_file; rrd_simple_file = (rrd_simple_file_t *)rrd_file->pvt; - +#endif + #ifdef HAVE_MMAP if (whence == SEEK_SET) rrd_file->pos = off; diff --git a/program/src/rrd_parsetime.c b/program/src/rrd_parsetime.c index 1b59f454..a5f1db89 100644 --- a/program/src/rrd_parsetime.c +++ b/program/src/rrd_parsetime.c @@ -687,7 +687,6 @@ static char *day( { /* using time_t seems to help portability with 64bit oses */ time_t mday = 0, wday, mon, year = ptv->tm.tm_year; - int tlen; switch (sc_tokid) { case YESTERDAY: @@ -756,7 +755,6 @@ static char *day( case NUMBER: /* get numeric , MM/DD/[YY]YY, or DD.MM.[YY]YY */ - tlen = strlen(sc_token); mon = atol(sc_token); if (mon > 10 * 365 * 24 * 60 * 60) { ptv->tm = *localtime(&mon); diff --git a/program/src/rrd_resize.c b/program/src/rrd_resize.c index b1b1e18d..8668337e 100644 --- a/program/src/rrd_resize.c +++ b/program/src/rrd_resize.c @@ -21,7 +21,7 @@ int rrd_resize( unsigned long l, rra; long modify; unsigned long target_rra; - int grow = 0, shrink = 0; + int shrink = 0; char *endptr; rrd_file_t *rrd_file, *rrd_out_file; @@ -38,7 +38,7 @@ int rrd_resize( target_rra = strtol(argv[2], &endptr, 0); if (!strcmp(argv[3], "GROW")) - grow = 1; + shrink = 0; else if (!strcmp(argv[3], "SHRINK")) shrink = 1; else {