bahamut icon indicating copy to clipboard operation
bahamut copied to clipboard

-Wabsolute-value warnings

Open ryandesign opened this issue 2 years ago • 0 comments

This warning appears when compiling with a modern Clang compiler:

s_serv.c:337:14: 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]
    deltat = abs(theirtime - tmptime);
             ^
s_serv.c:337:14: note: use function 'labs' instead
    deltat = abs(theirtime - tmptime);
             ^~~
             labs

ryandesign avatar Jul 06 '23 20:07 ryandesign