From 7012c653a3ded42fcfdf58bfdc0a8c2f297d942e Mon Sep 17 00:00:00 2001 From: oetiker Date: Sun, 25 Jan 2009 22:02:57 +0000 Subject: [PATCH] fix type conversion error (on windows) unsigned/signed affecting timestamps on rrd_dump. git-svn-id: svn://svn.oetiker.ch/rrdtool/branches/1.3/program@1744 a5681a0c-68f1-0310-ab6d-d61299d08faa --- src/rrd_dump.c | 2 +- src/rrd_first.c | 2 +- src/rrd_graph.c | 4 ++++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/rrd_dump.c b/src/rrd_dump.c index 0b3e7a2..8e5049f 100644 --- a/src/rrd_dump.c +++ b/src/rrd_dump.c @@ -389,7 +389,7 @@ int rrd_dump_opt_r( rrd_seek(rrd_file, (rra_start + (rrd.rra_ptr[i].cur_row + 1) * rrd.stat_head->ds_cnt * sizeof(rrd_value_t)), SEEK_SET); - timer = -(rrd.rra_def[i].row_cnt - 1); + timer = - (long)(rrd.rra_def[i].row_cnt - 1); ii = rrd.rra_ptr[i].cur_row; for (ix = 0; ix < rrd.rra_def[i].row_cnt; ix++) { ii++; diff --git a/src/rrd_first.c b/src/rrd_first.c index f735c0e..c6d7b38 100644 --- a/src/rrd_first.c +++ b/src/rrd_first.c @@ -83,7 +83,7 @@ time_t rrd_first_r( (rra_start + (rrd.rra_ptr[rraindex].cur_row + 1) * rrd.stat_head->ds_cnt * sizeof(rrd_value_t)), SEEK_SET); - timer = -(rrd.rra_def[rraindex].row_cnt - 1); + timer = -(long)(rrd.rra_def[rraindex].row_cnt - 1); if (rrd.rra_ptr[rraindex].cur_row + 1 > rrd.rra_def[rraindex].row_cnt) { rrd_seek(rrd_file, rra_start, SEEK_SET); } diff --git a/src/rrd_graph.c b/src/rrd_graph.c index 7c92a22..3b352fd 100644 --- a/src/rrd_graph.c +++ b/src/rrd_graph.c @@ -3079,6 +3079,10 @@ int graph_paint( grinfo_push(im, sprintf_alloc("image_width"), RD_I_CNT, info); info.u_cnt = im->yimg; grinfo_push(im, sprintf_alloc("image_height"), RD_I_CNT, info); + info.u_cnt = im->start; + grinfo_push(im, sprintf_alloc("graph_start"), RD_I_CNT, info); + info.u_cnt = im->end; + grinfo_push(im, sprintf_alloc("graph_end"), RD_I_CNT, info); /* get actual drawing data and find min and max values */ if (data_proc(im) == -1) -- 2.30.2