Dimitry Andric
b9cfeb20f6
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
2014-11-22 23:50:18 +00:00
..
2014-10-02 19:11:18 +00:00
2014-06-20 09:57:27 +00:00
2014-08-19 15:04:32 +00:00
2014-06-20 09:57:27 +00:00
2014-06-20 09:57:27 +00:00
2014-06-20 09:57:27 +00:00
2014-06-20 09:57:27 +00:00
2014-09-01 20:18:09 +00:00
2014-11-22 16:48:29 +00:00
2014-11-19 18:19:21 +00:00
2014-10-10 21:48:59 +00:00
2014-06-27 15:20:34 +00:00
2014-07-29 19:49:27 +00:00
2014-06-20 09:57:27 +00:00
2014-06-20 09:57:27 +00:00
2014-06-20 09:57:27 +00:00
2014-11-11 19:37:17 +00:00
2014-10-31 23:52:02 +00:00
2014-11-22 23:50:18 +00:00
2014-08-19 15:04:32 +00:00
2014-07-17 18:24:34 +00:00
2014-06-20 09:57:27 +00:00
2014-07-17 06:57:26 +00:00
2014-07-29 19:49:27 +00:00
2014-06-20 13:13:38 +00:00
2014-08-19 15:04:32 +00:00
2014-08-19 15:04:32 +00:00
2014-11-06 00:48:36 +00:00
2014-11-22 15:09:18 +00:00
2014-06-23 18:13:42 +00:00
2014-06-20 09:57:27 +00:00
2014-06-20 09:57:27 +00:00
2014-06-20 09:57:27 +00:00
2014-08-19 15:04:32 +00:00
2014-06-20 09:57:27 +00:00
2014-10-29 18:01:09 +00:00
2014-09-28 11:32:46 +00:00
2014-06-20 09:57:27 +00:00
2014-11-06 13:13:47 +00:00
2014-06-20 09:57:27 +00:00
2014-11-18 13:38:09 +00:00
2014-10-13 22:15:26 +00:00
2014-06-20 09:57:27 +00:00
2014-06-20 09:57:27 +00:00
2014-06-20 09:57:27 +00:00
2014-08-26 09:10:28 +00:00
2014-09-13 02:15:31 +00:00
2014-11-12 03:59:26 +00:00
2014-05-06 04:22:01 +00:00
2014-11-09 21:33:01 +00:00
2014-06-20 09:57:27 +00:00
2014-06-20 09:57:27 +00:00
2014-11-22 15:09:18 +00:00
2014-08-04 16:32:08 +00:00
2014-05-06 04:22:01 +00:00
2014-08-26 09:40:14 +00:00
2014-08-26 10:55:08 +00:00
2014-06-20 09:57:27 +00:00
2014-06-20 09:57:27 +00:00
2014-06-20 09:57:27 +00:00
2014-09-18 17:01:45 +00:00
2014-08-19 15:04:32 +00:00
2014-08-26 22:20:02 +00:00
2014-09-18 03:11:59 +00:00
2014-08-19 15:04:32 +00:00
2014-07-07 00:27:09 +00:00
2014-09-19 23:38:44 +00:00
2014-06-20 09:57:27 +00:00
2014-06-20 09:57:27 +00:00
2014-08-19 21:04:31 +00:00
2014-06-20 09:57:27 +00:00
2014-06-20 09:57:27 +00:00
2014-05-06 04:22:01 +00:00
2014-09-18 14:41:57 +00:00
2014-06-20 09:57:27 +00:00
2014-06-20 09:57:27 +00:00
2014-07-18 06:48:02 +00:00
2014-10-08 17:44:30 +00:00
2014-08-10 20:05:13 +00:00
2014-07-17 18:24:34 +00:00
2014-06-20 09:57:27 +00:00
2014-10-09 00:32:33 +00:00
2014-10-06 18:16:45 +00:00
2014-11-06 18:50:59 +00:00
2014-06-20 09:57:27 +00:00
2014-06-20 09:57:27 +00:00
2014-06-20 09:57:27 +00:00
2014-10-22 23:35:56 +00:00
2014-06-20 09:57:27 +00:00
2014-10-28 14:11:54 +00:00
2014-06-20 09:57:27 +00:00
2014-06-20 09:57:27 +00:00
2014-10-27 15:50:47 +00:00
2014-06-20 09:57:27 +00:00
2014-08-21 19:04:15 +00:00
2014-07-17 18:24:34 +00:00
2014-08-19 15:04:32 +00:00
2014-10-11 21:53:06 +00:00
2014-11-19 23:07:46 +00:00
2014-06-20 09:57:27 +00:00
2014-08-20 17:27:15 +00:00
2014-06-20 09:57:27 +00:00
2014-06-20 09:57:27 +00:00
2014-06-20 09:57:27 +00:00
2014-11-06 10:07:26 +00:00
2014-06-20 09:57:27 +00:00
2014-11-22 23:04:33 +00:00
2014-06-20 09:57:27 +00:00
2014-10-11 20:46:06 +00:00
2014-06-28 15:53:28 +00:00
2014-06-20 09:57:27 +00:00
2014-08-19 15:04:32 +00:00
2014-07-16 19:02:30 +00:00
2014-06-20 09:57:27 +00:00
2014-09-01 16:12:29 +00:00
2014-06-20 09:57:27 +00:00
2014-05-06 04:22:01 +00:00
2014-11-05 01:24:44 +00:00
2014-05-06 04:22:01 +00:00
2014-05-06 04:22:01 +00:00
2014-06-20 09:57:27 +00:00
2014-06-06 04:09:07 +00:00
2014-08-17 19:06:26 +00:00
2014-09-01 14:04:51 +00:00
2014-05-06 04:22:01 +00:00
2014-11-11 19:45:14 +00:00
2014-07-05 20:08:25 +00:00
2014-09-08 09:16:07 +00:00
2014-11-12 14:52:44 +00:00
2014-06-20 09:57:27 +00:00
2014-06-20 09:57:27 +00:00
2014-10-23 12:38:05 +00:00
2014-06-20 09:57:27 +00:00
2014-07-17 18:24:34 +00:00
2014-11-16 09:44:30 +00:00
2014-08-25 05:52:05 +00:00
2014-11-15 14:55:05 +00:00
2014-06-20 09:57:27 +00:00
2014-06-20 09:57:27 +00:00
2014-06-20 09:57:27 +00:00
2014-06-20 09:57:27 +00:00
2014-06-19 13:18:23 +00:00
2014-11-09 21:33:01 +00:00
2014-09-13 02:15:31 +00:00
2014-10-18 08:07:17 +00:00