From: oetiker Date: Mon, 12 May 2008 22:23:19 +0000 (+0000) Subject: allow rrd_rpncalc to build without cairo dependencies ... X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=f76f94fea4a554c6f129055c12bed58e81c73ed9;p=rrdtool-all.git allow rrd_rpncalc to build without cairo dependencies ... fix warnings git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1348 a5681a0c-68f1-0310-ab6d-d61299d08faa --- diff --git a/program/src/rrd_graph.h b/program/src/rrd_graph.h index 3e65df10..7e85cd63 100644 --- a/program/src/rrd_graph.h +++ b/program/src/rrd_graph.h @@ -14,8 +14,6 @@ #include "rrd_tool.h" #include "rrd_rpncalc.h" -#define MAX_VNAME_LEN 255 -#define DEF_NAM_FMT "%255[-_A-Za-z0-9]" #define ALTYGRID 0x01 /* use alternative y grid algorithm */ #define ALTAUTOSCALE 0x02 /* use alternative algorithm to find lower and upper bounds */ diff --git a/program/src/rrd_info.c b/program/src/rrd_info.c index e0bcefa0..5bfe9ffe 100644 --- a/program/src/rrd_info.c +++ b/program/src/rrd_info.c @@ -334,8 +334,6 @@ info_t *rrd_info_r( void info_print( info_t *data) { - long image_length = 0; - while (data) { printf("%s = ", data->key); diff --git a/program/src/rrd_rpncalc.c b/program/src/rrd_rpncalc.c index 65c124ee..f63b7439 100644 --- a/program/src/rrd_rpncalc.c +++ b/program/src/rrd_rpncalc.c @@ -6,7 +6,7 @@ #include "rrd_tool.h" #include "rrd_rpncalc.h" -#include "rrd_graph.h" +// #include "rrd_graph.h" #include #include diff --git a/program/src/rrd_rpncalc.h b/program/src/rrd_rpncalc.h index 3e4da4c7..9f8b670f 100644 --- a/program/src/rrd_rpncalc.h +++ b/program/src/rrd_rpncalc.h @@ -36,6 +36,9 @@ typedef struct rpn_cdefds_t { short val; /* used by OP_NUMBER and OP_VARIABLE */ } rpn_cdefds_t; +#define MAX_VNAME_LEN 255 +#define DEF_NAM_FMT "%255[-_A-Za-z0-9]" + /* limit imposed by sizeof(rpn_cdefs_t) and rrd.ds_def.par */ #define DS_CDEF_MAX_RPN_NODES 26 diff --git a/program/src/rrd_tool.c b/program/src/rrd_tool.c index 5eaf1058..68d54655 100644 --- a/program/src/rrd_tool.c +++ b/program/src/rrd_tool.c @@ -803,8 +803,8 @@ int HandleInputLine( } else if (strcmp("graphv", argv[1]) == 0) { info_t *grinfo = NULL; /* 1 to distinguish it from the NULL that rrd_graph sends in */ - - if (grinfo = rrd_graph_v(argc - 1, &argv[1])) { + grinfo = rrd_graph_v(argc - 1, &argv[1]); + if (grinfo) { info_print(grinfo); info_free(grinfo); }