linuxbox2 / ntirpc

New development on tirpc
Other
24 stars 94 forks source link

Clang compile warning #6

Closed kalebskeithley closed 7 years ago

kalebskeithley commented 8 years ago

... [ 95%] Building C object src/CMakeFiles/ntirpc.dir/authgss_hash.c.o cd /home/kkeithle/src/ntirpc-1.3.1/src && /usr/bin/clang -DHAVE_CONFIG_H -DINET6 -DPORTMAP -D_GNU_SOURCE -Dntirpc_EXPORTS -fPIC -fPIC -I/home/kkeithle/src/ntirpc-1.3.1/ntirpc -I/home/kkeithle/src/ntirpc-1.3.1 -o CMakeFiles/ntirpc.dir/authgss_hash.c.o -c /home/kkeithle/src/ntirpc-1.3.1/src/authgss_hash.c /home/kkeithle/src/ntirpc-1.3.1/src/authgss_hash.c:274:11: warning: taking the absolute value of unsigned type 'unsigned int' has no effect [-Wabsolute-value] ((abs(axp->gen - gd->gen) > ^ /home/kkeithle/src/ntirpc-1.3.1/ntirpc/intrinsic.h:32:42: note: expanded from macro 'unlikely'

define unlikely(x) __builtin_expect(!!(x), 0)

                                     ^

/home/kkeithle/src/ntirpc-1.3.1/src/authgss_hash.c:274:11: note: remove the call to 'abs' since unsigned values cannot be negative ((abs(axp->gen - gd->gen) > ^~~ /home/kkeithle/src/ntirpc-1.3.1/ntirpc/intrinsic.h:32:42: note: expanded from macro 'unlikely'

define unlikely(x) __builtin_expect(!!(x), 0)

                                     ^

1 warning generated. ...