Page MenuHomeFreeBSD

D31292.id92691.diff
No OneTemporary

D31292.id92691.diff

Index: lib/libc/stdlib/Makefile.inc
===================================================================
--- lib/libc/stdlib/Makefile.inc
+++ lib/libc/stdlib/Makefile.inc
@@ -18,6 +18,8 @@
strtol.c strtold.c strtoll.c strtoq.c strtoul.c strtonum.c strtoull.c \
strtoumax.c strtouq.c system.c tdelete.c tfind.c tsearch.c twalk.c
+CFLAGS.qsort.c+= -Wsign-compare
+
# Work around an issue on case-insensitive file systems.
# libc has both _Exit.c and _exit.s and they both yield
# _exit.o (case insensitively speaking).
Index: lib/libc/stdlib/qsort.c
===================================================================
--- lib/libc/stdlib/qsort.c
+++ lib/libc/stdlib/qsort.c
@@ -36,6 +36,7 @@
__FBSDID("$FreeBSD$");
#include <errno.h>
+#include <stddef.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
@@ -171,7 +172,7 @@
pn = (char *)a + n * es;
d1 = MIN(pa - (char *)a, pb - pa);
vecswap(a, pb - d1, d1);
- d1 = MIN(pd - pc, pn - pd - es);
+ d1 = MIN(pd - pc, pn - pd - (ptrdiff_t)es);
vecswap(pb, pn - d1, d1);
d1 = pb - pa;

File Metadata

Mime Type
text/plain
Expires
Tue, May 19, 1:14 AM (17 h, 40 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33282326
Default Alt Text
D31292.id92691.diff (1 KB)

Event Timeline