freebsd-dev/lib/libc
Conrad Meyer 7f8f79a5c4 libc qsort(3): Eliminate ambiguous sign comparison
The left side of the MIN() expression is the (signed) result of pointer
subtraction (ptrdiff_t).  The right hand side is the also the (signed)
result of pointer subtraction, additionally subtracting the element size
('es'), which is unsigned size_t.  This coerces the right-hand
expression into an unsigned value.  MIN(signed, unsigned) triggers
-Wsign-compare.

Sorting elements of size greater than SSIZE_MAX is nonsensical, so we
can instead treat the element size as ssize_t, leaving the right-hand
result the same signedness as the left.

Reviewed by:		arichardson, kib
Differential Revision:	https://reviews.freebsd.org/D31292
2021-07-28 20:59:20 -07:00
..
aarch64 libc: add _get_tp() private function 2021-04-09 23:46:24 +03:00
amd64 libc: add _get_tp() private function 2021-04-09 23:46:24 +03:00
arm libc: add _get_tp() private function 2021-04-09 23:46:24 +03:00
capability
compat-43
db
gdtoa
gen syslog.3 - Add detail about LOG_PID 2021-05-13 16:23:44 +02:00
gmon
i386 libc: add _get_tp() private function 2021-04-09 23:46:24 +03:00
iconv
include libc: add _get_tp() private function 2021-04-09 23:46:24 +03:00
inet
isc
locale Remove __NO_TLS. 2021-02-23 20:08:10 +02:00
md
mips libc: add _get_tp() private function 2021-04-09 23:46:24 +03:00
nameser
net Revert "lib/libc/net/nsdispatch.c: Fix missing unlock and add locking annotations" 2021-04-19 09:36:47 +01:00
nls
posix1e Fix leak in libc NFSv4 flags parsing 2021-04-20 15:39:56 -04:00
powerpc libc: add _get_tp() private function 2021-04-09 23:46:24 +03:00
powerpc64 libc: add _get_tp() private function 2021-04-09 23:46:24 +03:00
powerpcspe [PowerPC] [PowerPCSPE] Fix multiple issues in fpsetmask(). 2021-02-28 21:11:29 -06:00
quad
regex
resolv
riscv riscv: Implement non-stub __vdso_gettc and __vdso_gettimekeep 2021-07-05 16:16:53 +01:00
rpc Remove references to timed(8) 2021-05-13 09:53:08 +02:00
secure
softfloat libc: use standard LF line endings, not CRLF 2021-04-03 16:20:07 -04:00
stdio fread: improve performance for unbuffered reads 2021-06-01 16:00:28 -05:00
stdlib libc qsort(3): Eliminate ambiguous sign comparison 2021-07-28 20:59:20 -07:00
stdtime
string libc: add mempcpy(3) and wmempcpy(3) 2021-07-15 19:40:28 +03:00
sys socket: Implement SO_RERROR 2021-07-28 09:35:09 -07:00
tests resolv_test: Fix racy exit check, remove mutexes, and reduce output 2021-03-30 15:00:18 +01:00
uuid
x86
xdr
yp
libc_nossp.ldscript
libc.ldscript
Makefile libc: Use the initial-exec TLS model 2021-07-15 22:41:10 -04:00
Makefile.depend
Makefile.depend.options
Versions.def Create namespace for the symbols added during 14-CURRENT cycle. 2021-07-15 19:40:28 +03:00