DALnet / bahamut

The Bahamut IRC Daemon
http://www.dal.net/?page=Bahamut
Other
57 stars 42 forks source link

-Wabsolute-value warnings #224

Open ryandesign opened 1 year ago

ryandesign commented 1 year ago

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