summaryrefslogtreecommitdiffstats
path: root/usr.bin/man/man.sh
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2014-11-22 23:50:18 +0000
committerdim <dim@FreeBSD.org>2014-11-22 23:50:18 +0000
commitfdb2e482eef4ef9885b81593f8ba53c8400978be (patch)
tree4282dd46d939e588ea0e7fbda3380b350131fc33 /usr.bin/man/man.sh
parent6c8ea83ec558fc24d94e27f2623cdb9f1f16402a (diff)
downloadFreeBSD-src-fdb2e482eef4ef9885b81593f8ba53c8400978be.zip
FreeBSD-src-fdb2e482eef4ef9885b81593f8ba53c8400978be.tar.gz
Fix the following -Werror warnings from clang 3.5.0, while building
bsnmpd's snmp_hostres module: usr.sbin/bsnmpd/modules/snmp_hostres/hostres_snmp.c:204:20: error: absolute value function 'abs' given an argument of type 'const long' but has parameter of type 'int' which may cause truncation of value [-Werror,-Wabsolute-value] str[9] = (u_char)(abs(tm->tm_gmtoff) / 3600); ^ usr.sbin/bsnmpd/modules/snmp_hostres/hostres_snmp.c:204:20: note: use function 'labs' instead str[9] = (u_char)(abs(tm->tm_gmtoff) / 3600); ^~~ labs usr.sbin/bsnmpd/modules/snmp_hostres/hostres_snmp.c:205:22: error: absolute value function 'abs' given an argument of type 'const long' but has parameter of type 'int' which may cause truncation of value [-Werror,-Wabsolute-value] str[10] = (u_char)((abs(tm->tm_gmtoff) % 3600) / 60); ^ usr.sbin/bsnmpd/modules/snmp_hostres/hostres_snmp.c:205:22: note: use function 'labs' instead str[10] = (u_char)((abs(tm->tm_gmtoff) % 3600) / 60); ^~~ labs Since tm::tm_gmtoff is a long, use labs(3) instead. MFC after: 3 days
Diffstat (limited to 'usr.bin/man/man.sh')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud