1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-19 10:53:58 +00:00
freebsd/usr.sbin
Dimitry Andric f28c40aee0 Fix the following -Werror warnings from clang 3.5.0, while building
usr.sbin/rtadvd:

usr.sbin/rtadvd/rtadvd.c:1291:7: error: taking the absolute value of unsigned type 'unsigned int' has no effect [-Werror,-Wabsolute-value]
                    abs(preferred_time - pfx->pfx_pltimeexpire) > rai->rai_clockskew) {
                    ^
usr.sbin/rtadvd/rtadvd.c:1291:7: note: remove the call to 'abs' since unsigned values cannot be negative
                    abs(preferred_time - pfx->pfx_pltimeexpire) > rai->rai_clockskew) {
                    ^~~
usr.sbin/rtadvd/rtadvd.c:1324:7: error: taking the absolute value of unsigned type 'unsigned int' has no effect [-Werror,-Wabsolute-value]
                    abs(valid_time - pfx->pfx_vltimeexpire) > rai->rai_clockskew) {
                    ^
usr.sbin/rtadvd/rtadvd.c:1324:7: note: remove the call to 'abs' since unsigned values cannot be negative
                    abs(valid_time - pfx->pfx_vltimeexpire) > rai->rai_clockskew) {
                    ^~~
2 errors generated.

These warnings occur because both preferred_time and pfx_pltimeexpire
are uint32_t's, so the subtraction expression is also unsigned, and
calling abs() is a no-op.

However, the intention was to look at the absolute difference between
the two unsigned quantities.  Introduce a small static function to
clarify what we're doing, and call that instead.

Reviewed by:	hrs
MFC after:	3 days
Differential Revision: https://reviews.freebsd.org/D1197
2014-11-22 23:04:33 +00:00
..
ac
accton
acpi Merge ACPICA 20140926. 2014-10-02 19:11:18 +00:00
adduser use .Mt to mark up email addresses consistently (part2) 2014-06-20 09:57:27 +00:00
amd Revert r267233 for now. PIE support needs to be reworked. 2014-08-19 15:04:32 +00:00
ancontrol use .Mt to mark up email addresses consistently (part2) 2014-06-20 09:57:27 +00:00
apm use .Mt to mark up email addresses consistently (part2) 2014-06-20 09:57:27 +00:00
apmd use .Mt to mark up email addresses consistently (part2) 2014-06-20 09:57:27 +00:00
arp
asf use .Mt to mark up email addresses consistently (part2) 2014-06-20 09:57:27 +00:00
audit
auditd
auditdistd Add -Wthread-safety to WARNS=6. 2014-09-01 20:18:09 +00:00
auditreduce
authpf
autofs Implement "automount -c". 2014-11-22 16:48:29 +00:00
bhyve Fix improper .Fx macro usage. 2014-11-19 18:19:21 +00:00
bhyvectl Fix bhyvectl so it works correctly on AMD/SVM hosts. Also, add command line 2014-10-10 21:48:59 +00:00
bhyveload Sort command flags in usage output and the manpages. 2014-06-27 15:20:34 +00:00
binmiscctl mdoc: kill EOL whitespace. 2014-07-29 19:49:27 +00:00
bluetooth use .Mt to mark up email addresses consistently (part2) 2014-06-20 09:57:27 +00:00
boot0cfg use .Mt to mark up email addresses consistently (part2) 2014-06-20 09:57:27 +00:00
boot98cfg
bootparamd use .Mt to mark up email addresses consistently (part2) 2014-06-20 09:57:27 +00:00
bsdconfig Default bsdconfig timezone' and tzsetup' to `-s' in a VM. 2014-11-11 19:37:17 +00:00
bsdinstall Rewrite some of the disk setup documentation to be clearer and contain 2014-10-31 23:52:02 +00:00
bsnmpd Remove ia64. 2014-07-07 00:27:09 +00:00
btxld Revert r267233 for now. PIE support needs to be reworked. 2014-08-19 15:04:32 +00:00
cdcontrol Replace all uses of libncurses and libtermcap with their wide character 2014-07-17 18:24:34 +00:00
chkgrp use .Mt to mark up email addresses consistently (part2) 2014-06-20 09:57:27 +00:00
chown chown: Fix chown test number 2014-07-17 06:57:26 +00:00
chroot
ckdist
clear_locks
config mdoc: kill EOL whitespace. 2014-07-29 19:49:27 +00:00
cpucontrol Restore the ABI of the cpuctl(4) ioctl request CPUCTL_CPUID, use 2014-06-20 13:13:38 +00:00
crashinfo
cron Revert r267233 for now. PIE support needs to be reworked. 2014-08-19 15:04:32 +00:00
crunch Revert r267233 for now. PIE support needs to be reworked. 2014-08-19 15:04:32 +00:00
ctladm Add to CTL support for logical block provisioning threshold notifications. 2014-11-06 00:48:36 +00:00
ctld For both iSCSI initiator and target increase socket buffer sizes before 2014-11-22 15:09:18 +00:00
ctm With the move away from GNATS, drop the CTM config file for downloading 2014-06-23 18:13:42 +00:00
daemon
dconschat use .Mt to mark up email addresses consistently (part2) 2014-06-20 09:57:27 +00:00
devinfo use .Mt to mark up email addresses consistently (part2) 2014-06-20 09:57:27 +00:00
digictl
diskinfo
dumpcis use .Mt to mark up email addresses consistently (part2) 2014-06-20 09:57:27 +00:00
editmap Revert r267233 for now. PIE support needs to be reworked. 2014-08-19 15:04:32 +00:00
edquota
eeprom use .Mt to mark up email addresses consistently (part2) 2014-06-20 09:57:27 +00:00
etcupdate Rework the EXAMPLES section to be a bit clearer. 2014-10-29 18:01:09 +00:00
extattr
extattrctl
fdcontrol
fdformat
fdread - Cleanups pc98 code. 2014-09-28 11:32:46 +00:00
fdwrite use .Mt to mark up email addresses consistently (part2) 2014-06-20 09:57:27 +00:00
fifolog fifolog_writer does not depend on libutil 2014-11-06 13:13:47 +00:00
flowctl use .Mt to mark up email addresses consistently (part2) 2014-06-20 09:57:27 +00:00
freebsd-update Re-work non-persistent filesystem detection as it was not possible to 2014-11-18 13:38:09 +00:00
ftp-proxy Promote libevent to lib/ level and fold ftp-proxy into its parent Makefile. 2014-10-13 22:15:26 +00:00
fwcontrol use .Mt to mark up email addresses consistently (part2) 2014-06-20 09:57:27 +00:00
getfmac
getpmac
gpioctl use .Mt to mark up email addresses consistently (part2) 2014-06-20 09:57:27 +00:00
gssd use .Mt to mark up email addresses consistently (part2) 2014-06-20 09:57:27 +00:00
gstat Convert LIBCURSES to LIBNCURSES to fix "make checkdpadd" 2014-08-26 09:10:28 +00:00
hyperv Import HyperV Key-Value Pair (KVP) driver and daemon code by Microsoft, 2014-09-13 02:15:31 +00:00
i2c Fix a few cases of use of uninitialized variables. Found with -Wall. 2014-11-12 03:59:26 +00:00
ifmcstat
inetd Renove faith(4) and faithd(8) from base. It looks like industry 2014-11-09 21:33:01 +00:00
iostat use .Mt to mark up email addresses consistently (part2) 2014-06-20 09:57:27 +00:00
ip6addrctl
ipfwpcap use .Mt to mark up email addresses consistently (part2) 2014-06-20 09:57:27 +00:00
iscsid For both iSCSI initiator and target increase socket buffer sizes before 2014-11-22 15:09:18 +00:00
jail Added support for extra ifconfig args to jail ip4.addr & ip6.addr params 2014-08-04 16:32:08 +00:00
jexec
jls
kbdcontrol Update man-pages to correctly refer to changed pathes and naming conventions 2014-08-26 09:40:14 +00:00
kbdmap More man pages that need to know about vt in addition to syscons. 2014-08-26 10:55:08 +00:00
keyserv
kgmon
kgzip use .Mt to mark up email addresses consistently (part2) 2014-06-20 09:57:27 +00:00
kldxref use .Mt to mark up email addresses consistently (part2) 2014-06-20 09:57:27 +00:00
lastlogin
lmcconfig use .Mt to mark up email addresses consistently (part2) 2014-06-20 09:57:27 +00:00
lpr lpr: replace setpgrp(2) with setpgid(2). 2014-09-18 17:01:45 +00:00
lptcontrol
mailstats Revert r267233 for now. PIE support needs to be reworked. 2014-08-19 15:04:32 +00:00
mailwrapper Allow mailwrapper to use mailer.conf from localbase (respecting LOCALBASE env var if set) 2014-08-26 22:20:02 +00:00
makefs r258695 introduces a sanity check for makefs in order to verify that 2014-09-18 03:11:59 +00:00
makemap Revert r267233 for now. PIE support needs to be reworked. 2014-08-19 15:04:32 +00:00
manctl
memcontrol
mergemaster Remove ia64. 2014-07-07 00:27:09 +00:00
mfiutil Style (9) fixes, spaces to tabs. 2014-09-19 23:38:44 +00:00
mixer use .Mt to mark up email addresses consistently (part2) 2014-06-20 09:57:27 +00:00
mld6query
mlxcontrol use .Mt to mark up email addresses consistently (part2) 2014-06-20 09:57:27 +00:00
mount_smbfs
mountd Avoid showing stale errors when nmount(2) fails. 2014-08-19 21:04:31 +00:00
moused use .Mt to mark up email addresses consistently (part2) 2014-06-20 09:57:27 +00:00
mptable use .Mt to mark up email addresses consistently (part2) 2014-06-20 09:57:27 +00:00
mptutil
mtest
mtree Fix incremental builds involving non-root users with read-only source files. 2014-09-18 14:41:57 +00:00
nandsim use .Mt to mark up email addresses consistently (part2) 2014-06-20 09:57:27 +00:00
nandtool
ndiscvt use .Mt to mark up email addresses consistently (part2) 2014-06-20 09:57:27 +00:00
ndp Fix "ndp -d hostname". 2014-07-18 06:48:02 +00:00
newsyslog If we fail to send a signal after rotation, print the pidfile from which 2014-10-08 17:44:30 +00:00
nfscbd
nfsd Document the use of the vfs.nfsd sysctls that control the size of 2014-08-10 20:05:13 +00:00
nfsdumpstate
nfsrevoke
nfsuserd
ngctl Replace all uses of libncurses and libtermcap with their wide character 2014-07-17 18:24:34 +00:00
nghook use .Mt to mark up email addresses consistently (part2) 2014-06-20 09:57:27 +00:00
nmtree Integrate usr.sbin/nmtree/tests from NetBSD into atf/kyua 2014-10-09 00:32:33 +00:00
nologin
nscd Properly set the timeout in a query_state. The global query_timeout 2014-10-06 18:16:45 +00:00
ntp Backout 274170 it breaks for mips 2014-11-06 18:50:59 +00:00
nvram use .Mt to mark up email addresses consistently (part2) 2014-06-20 09:57:27 +00:00
ofwdump use .Mt to mark up email addresses consistently (part2) 2014-06-20 09:57:27 +00:00
pc-sysinstall use .Mt to mark up email addresses consistently (part2) 2014-06-20 09:57:27 +00:00
pciconf Fix some buglets in the error-handling of getdevice(). In particular, report 2014-10-22 23:35:56 +00:00
periodic use .Mt to mark up email addresses consistently (part2) 2014-06-20 09:57:27 +00:00
pkg Remove spurious libelf dependency. 2014-10-28 14:11:54 +00:00
pmcannotate use .Mt to mark up email addresses consistently (part2) 2014-06-20 09:57:27 +00:00
pmccontrol use .Mt to mark up email addresses consistently (part2) 2014-06-20 09:57:27 +00:00
pmcstat Fix rendering 2014-10-27 15:50:47 +00:00
pnpinfo
portsnap use .Mt to mark up email addresses consistently (part2) 2014-06-20 09:57:27 +00:00
powerd
ppp Change file permissions for some setuid executables so they are "o+r". 2014-08-21 19:04:15 +00:00
pppctl Replace all uses of libncurses and libtermcap with their wide character 2014-07-17 18:24:34 +00:00
praliases Revert r267233 for now. PIE support needs to be reworked. 2014-08-19 15:04:32 +00:00
praudit
procctl
pstat pstat(8): Correct description of the SESS column in pstat -t. 2014-10-11 21:53:06 +00:00
pw Replace the pw(1) calls with a variable, to make it easier to to change across all the tests as needed. 2014-11-19 23:07:46 +00:00
pwd_mkdb
quot
quotaon
rarpd use .Mt to mark up email addresses consistently (part2) 2014-06-20 09:57:27 +00:00
repquota
rip6query
rmt
route6d Recover sin6_scope_id of gateway addresses in riprecv() by using the if_index 2014-08-20 17:27:15 +00:00
rpc.lockd
rpc.statd
rpc.umntall use .Mt to mark up email addresses consistently (part2) 2014-06-20 09:57:27 +00:00
rpc.yppasswdd use .Mt to mark up email addresses consistently (part2) 2014-06-20 09:57:27 +00:00
rpc.ypupdated
rpc.ypxfrd use .Mt to mark up email addresses consistently (part2) 2014-06-20 09:57:27 +00:00
rpcbind rpcbind does not need to be linked to libutil 2014-11-06 10:07:26 +00:00
rrenumd
rtadvctl use .Mt to mark up email addresses consistently (part2) 2014-06-20 09:57:27 +00:00
rtadvd Fix the following -Werror warnings from clang 3.5.0, while building 2014-11-22 23:04:33 +00:00
rtprio use .Mt to mark up email addresses consistently (part2) 2014-06-20 09:57:27 +00:00
rtsold Fix buffer overrun. 2014-10-11 20:46:06 +00:00
rwhod Don't accidently skip every second line when calculating the 2014-06-28 15:53:28 +00:00
sa use .Mt to mark up email addresses consistently (part2) 2014-06-20 09:57:27 +00:00
sendmail Revert r267233 for now. PIE support needs to be reworked. 2014-08-19 15:04:32 +00:00
service Revert previous revision (r268461) for reasons documented in PR. 2014-07-16 19:02:30 +00:00
services_mkdb
setfib
setfmac
setpmac
sicontrol use .Mt to mark up email addresses consistently (part2) 2014-06-20 09:57:27 +00:00
smbmsg Fix typo (by -> be). 2014-09-01 16:12:29 +00:00
snapinfo use .Mt to mark up email addresses consistently (part2) 2014-06-20 09:57:27 +00:00
spkrtest
spray
syslogd
sysrc Add EXAMPLES-section entry for new key+=append syntax of sysrc(8). 2014-11-05 01:24:44 +00:00
tcpdchk
tcpdmatch
tcpdrop use .Mt to mark up email addresses consistently (part2) 2014-06-20 09:57:27 +00:00
tcpdump When building picobsd, define WITHOUT_OPENSSL and WITHOUT_KERBEROS and 2014-06-06 04:09:07 +00:00
tests
timed Remove LOG_ODELAY because it does nothing. 2014-08-17 19:06:26 +00:00
traceroute Make SOCK_RAW sockets to be truly raw, not modifying received and sent 2014-09-01 14:04:51 +00:00
traceroute6
trpt
tzsetup Fix whitespace. 2014-11-11 19:45:14 +00:00
uathload
ugidfw
uhsoctl Use %zu not %zd for printing size_t. 2014-07-05 20:08:25 +00:00
unbound Fix support for IPv6 nameservers. 2014-09-08 09:16:07 +00:00
usbconfig Decode more fields when dumping USB descriptors. 2014-11-12 14:52:44 +00:00
usbdump use .Mt to mark up email addresses consistently (part2) 2014-06-20 09:57:27 +00:00
utx use .Mt to mark up email addresses consistently (part2) 2014-06-20 09:57:27 +00:00
vidcontrol vt(4): Add PIO_VFONT_DEFAULT ioctl to restore the default builtin font 2014-10-23 12:38:05 +00:00
vipw
wake use .Mt to mark up email addresses consistently (part2) 2014-06-20 09:57:27 +00:00
watch Replace all uses of libncurses and libtermcap with their wide character 2014-07-17 18:24:34 +00:00
watchdogd Default to use 10 seconds as nap interval instead of 1. 2014-11-16 09:44:30 +00:00
wlandebug Fix a typo to catch correct condition. 2014-08-25 05:52:05 +00:00
wlconfig
wpa wpa_cli does not use libedit anymore since version 1.0 2014-11-15 14:55:05 +00:00
yp_mkdb use .Mt to mark up email addresses consistently (part2) 2014-06-20 09:57:27 +00:00
ypbind use .Mt to mark up email addresses consistently (part2) 2014-06-20 09:57:27 +00:00
yppoll
yppush use .Mt to mark up email addresses consistently (part2) 2014-06-20 09:57:27 +00:00
ypserv use .Mt to mark up email addresses consistently (part2) 2014-06-20 09:57:27 +00:00
ypset
zic
zzz Use Mt macro to properly format mailto links 2014-06-19 13:18:23 +00:00
Makefile Renove faith(4) and faithd(8) from base. It looks like industry 2014-11-09 21:33:01 +00:00
Makefile.amd64 Import HyperV Key-Value Pair (KVP) driver and daemon code by Microsoft, 2014-09-13 02:15:31 +00:00
Makefile.arm
Makefile.i386 Disable hyperv on pc98. 2014-10-18 08:07:17 +00:00
Makefile.inc
Makefile.mips
Makefile.powerpc
Makefile.sparc64