From: Marek Schimara Date: Thu, 1 Sep 2016 09:11:31 +0000 (+0200) Subject: src/rrd_graph_helper.c: fix gcc warning "comparison is always false" X-Git-Tag: v1.7.0~35^2~19 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=a10462a6a5293299bd11a9f4d2bbe4045de5d3de;p=thirdparty%2Frrdtool-1.x.git src/rrd_graph_helper.c: fix gcc warning "comparison is always false" rrd_graph_helper.c:747:25: warning: comparison is always false due to limited range of data type [-Wtype-limits] if (vname && (*vname>128)) { ^ Effectively, as 'vname' is a (char *), the values can go from -128 to 127, so this was deadcode. --- diff --git a/src/rrd_graph_helper.c b/src/rrd_graph_helper.c index 4afd51d4..f0e7eec8 100644 --- a/src/rrd_graph_helper.c +++ b/src/rrd_graph_helper.c @@ -742,13 +742,6 @@ static graph_desc_t* newGraphDescription(image_desc_t *const im,enum gf_en gf,pa if (bitscmp(PARSE_COLOR2) && (! color2) && (h2)) { color2=h2;} } - /* clean up vname escaping on second tries */ - if (bits & PARSE_RETRY) { - if (vname && (*vname>128)) { - *vname-=128; - } - } - /* check if we are reusing the vname */ if (vname) { int idx=find_var(im, vname);