]> git.ipfire.org Git - thirdparty/rrdtool-1.x.git/commit
Use fabs() for floating point, labs() for long
authorWolfgang Stöggl <c72578@yahoo.de>
Wed, 3 Apr 2019 16:13:33 +0000 (18:13 +0200)
committerTobias Oetiker <tobi@oetiker.ch>
Thu, 4 Apr 2019 07:35:26 +0000 (09:35 +0200)
commit0dc707da67327d9cfde985db8d724bc277573b4b
treec0f0d608338923ac36f1143d73c4a509c02d110f
parent0cac67347a4ea32e53bd0393f47b658385cdaaf6
Use fabs() for floating point, labs() for long

- Fixes the following clang compiler warnings:
  rrd_rpncalc.c:999:11: warning: using integer absolute value function
  'abs' when argument is of floating point type [-Wabsolute-value]
    if (abs(percentile) > 100) {
  rrd_rpncalc.c:1103:24: warning: using integer absolute value function
  'abs' when argument is of floating point type [-Wabsolute-value]
    int idx = round(abs(idxf));
  rrd_hw.c:519:36: warning: absolute value function 'abs' given an
  argument of type 'long' but has parameter of type 'int' which may
  cause truncation of value [-Wabsolute-value]
    new_val = ((unsigned long) abs(val)) % mod;
src/rrd_hw.c
src/rrd_rpncalc.c