From 622adf9826b98d3982278c57ab9a0f8fc6041b03 Mon Sep 17 00:00:00 2001 From: oetiker Date: Mon, 12 May 2008 22:23:19 +0000 Subject: [PATCH] allow rrd_rpncalc to build without cairo dependencies ... fix warnings git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@1348 a5681a0c-68f1-0310-ab6d-d61299d08faa --- src/rrd_graph.h | 2 -- src/rrd_info.c | 2 -- src/rrd_rpncalc.c | 2 +- src/rrd_rpncalc.h | 3 +++ src/rrd_tool.c | 4 ++-- 5 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/rrd_graph.h b/src/rrd_graph.h index 3e65df1..7e85cd6 100644 --- a/src/rrd_graph.h +++ b/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/src/rrd_info.c b/src/rrd_info.c index e0bcefa..5bfe9ff 100644 --- a/src/rrd_info.c +++ b/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/src/rrd_rpncalc.c b/src/rrd_rpncalc.c index 65c124e..f63b743 100644 --- a/src/rrd_rpncalc.c +++ b/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/src/rrd_rpncalc.h b/src/rrd_rpncalc.h index 3e4da4c..9f8b670 100644 --- a/src/rrd_rpncalc.h +++ b/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/src/rrd_tool.c b/src/rrd_tool.c index 5eaf105..68d5465 100644 --- a/src/rrd_tool.c +++ b/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); } -- 2.11.0