opnsense-src/sys
Dimitry Andric d41b89cca5 Fix the following -Werror warning from clang 3.5.0, while building the
ath kernel module:

sys/dev/ath/ath_hal/ar5212/ar5212_reset.c:2642:7: error: taking the absolute value of unsigned type 'unsigned int' has no effect [-Werror,-Wabsolute-value]
                if (abs(lp[0] * EEP_SCALE - target) < EEP_DELTA) {
                    ^
sys/dev/ath/ah_osdep.h:74:18: note: expanded from macro 'abs'
#define abs(_a)         __builtin_abs(_a)
                        ^
sys/dev/ath/ath_hal/ar5212/ar5212_reset.c:2642:7: note: remove the call to '__builtin_abs' since unsigned values cannot be negative
sys/dev/ath/ah_osdep.h:74:18: note: expanded from macro 'abs'
#define abs(_a)         __builtin_abs(_a)
                        ^
1 error generated.

This warning occurs because both lp[0] and target are unsigned, 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:	adrian
MFC after:	3 days
Differential Revision: https://reviews.freebsd.org/D1212
2014-11-23 18:31:55 +00:00
..
amd64 Improve support for XSAVE with debuggers. 2014-11-21 20:53:17 +00:00
arm When doing a PREREAD sync of an mbuf-type dma buffer, do a writeback of 2014-11-22 03:03:11 +00:00
boot Merge from CheriBSD: 2014-11-21 21:34:19 +00:00
bsm
cam Make iSCSI frontend less chatty while waiting for tasks termination. 2014-11-22 04:40:24 +00:00
cddl Fix the following -Werror warning from clang 3.5.0, while building cddl/lib/libctf: 2014-11-19 07:44:21 +00:00
compat Improve support for XSAVE with debuggers. 2014-11-21 20:53:17 +00:00
conf There never was a PC Card joystick attachment that worked. Kill the 2014-11-22 20:31:20 +00:00
contrib Set the current vnet inside the ioctl handler for ipfilter. 2014-11-20 08:11:54 +00:00
crypto Fix gcc build: preserve const qualifier when casting input values. 2014-11-11 13:37:28 +00:00
ddb ddb: ANSI-fy function declarations. 2014-10-12 18:01:52 +00:00
dev Fix the following -Werror warning from clang 3.5.0, while building the 2014-11-23 18:31:55 +00:00
fs Implement "automount -c". 2014-11-22 16:48:29 +00:00
gdb Add support for gdb's memory searching capabilities to our in-kernel gdb 2014-09-05 16:40:47 +00:00
geom Actually, that was a bad idea. Go back to MAXPARTITIONS. 2014-11-20 17:31:25 +00:00
gnu reiserfs: Use signed i_nlink 2014-09-25 19:10:32 +00:00
i386 Improve support for XSAVE with debuggers. 2014-11-21 20:53:17 +00:00
isa
kern Merge from projects/sendfile: 2014-11-23 12:01:52 +00:00
kgssapi Avoid dynamic syscall overhead for statically compiled modules. 2014-10-26 19:42:44 +00:00
libkern Sync with userland variant. 2014-11-17 21:01:35 +00:00
mips Merge from CheriBSD: 2014-11-21 21:34:19 +00:00
modules There never was a PC Card joystick attachment that worked. Kill the 2014-11-22 20:31:20 +00:00
net Finish r274175: do control plane MTU tracking. 2014-11-17 01:05:29 +00:00
net80211 Fix multiple incorrect SYSCTL arguments in the kernel: 2014-10-21 07:31:21 +00:00
netgraph In preparation of merging projects/sendfile, transform bare access to 2014-11-12 09:57:15 +00:00
netinet Re-introduce padding fields removed with r264321 to keep 2014-11-17 14:56:02 +00:00
netinet6 Finish r274175: do control plane MTU tracking. 2014-11-17 01:05:29 +00:00
netipsec Count statistics for the specific address family. 2014-11-13 12:58:33 +00:00
netnatm
netpfil pf(4) needs to have a correct checksum during its processing. 2014-11-19 13:31:08 +00:00
netsmb
nfs Avoid dynamic syscall overhead for statically compiled modules. 2014-10-26 19:42:44 +00:00
nfsclient Follow up to r225617. In order to maximize the re-usability of kernel code 2014-10-16 18:04:43 +00:00
nfsserver Change NFS readdir() to only ignore cookies preceding the given offset for 2014-07-01 20:00:35 +00:00
nlm Avoid dynamic syscall overhead for statically compiled modules. 2014-10-26 19:42:44 +00:00
ofed In preparation of merging projects/sendfile, transform bare access to 2014-11-12 09:57:15 +00:00
opencrypto Fix build for kernels without COMPAT_FREEBSD32. 2014-09-22 17:32:27 +00:00
pc98 Renove faith(4) and faithd(8) from base. It looks like industry 2014-11-09 21:33:01 +00:00
powerpc Fix the powerpc64 build. 2014-11-21 02:45:39 +00:00
rpc In preparation of merging projects/sendfile, transform bare access to 2014-11-12 09:57:15 +00:00
security Replace dev_clone with cdevpriv(9) KPI in audit_pipe code. 2014-08-20 16:04:30 +00:00
sparc64 Use canonical __PIC__ flag 2014-11-21 02:05:48 +00:00
sys Merge from projects/sendfile: 2014-11-23 12:01:52 +00:00
teken
tools Allow the make_dtb script to work outside of a "make buildkernel" context 2014-08-30 22:39:15 +00:00
ufs Merge from projects/sendfile: 2014-11-23 12:01:52 +00:00
vm Merge from projects/sendfile: 2014-11-23 12:01:52 +00:00
x86 Improve support for XSAVE with debuggers. 2014-11-21 20:53:17 +00:00
xdr
xen opt_global.h is included automatically in the build. No need to 2014-11-18 17:06:56 +00:00
Makefile Remove "pci" from CSCOPEDIRS. 2014-09-23 06:32:19 +00:00