summaryrefslogtreecommitdiffstats
path: root/sys/libkern
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>2001-09-10 10:33:46 +0000
committerpeter <peter@FreeBSD.org>2001-09-10 10:33:46 +0000
commitad6be0c2bd2edb2e408a6cf331be4bfa16955946 (patch)
treef5e744827448c791e841676a3911d196c868cdda /sys/libkern
parent0e5689df6586ed595c6dbdecf96d70202196e119 (diff)
downloadFreeBSD-src-ad6be0c2bd2edb2e408a6cf331be4bfa16955946.zip
FreeBSD-src-ad6be0c2bd2edb2e408a6cf331be4bfa16955946.tar.gz
Fix a warning in bsearch(). Like index() etc, it de-qualifies its
arguments. Caveat Emptor. However, the only two consumer of it (cam) deals with it correctly and preserves the constness.
Diffstat (limited to 'sys/libkern')
-rw-r--r--sys/libkern/bsearch.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/libkern/bsearch.c b/sys/libkern/bsearch.c
index 6aceaa7..f3f318c 100644
--- a/sys/libkern/bsearch.c
+++ b/sys/libkern/bsearch.c
@@ -74,7 +74,7 @@ bsearch(key, base0, nmemb, size, compar)
p = base + (lim >> 1) * size;
cmp = (*compar)(key, p);
if (cmp == 0)
- return ((void *)p);
+ return ((void *)(uintptr_t)p);
if (cmp > 0) { /* key > p: move right */
base = (const char *)p + size;
lim--;
OpenPOWER on IntegriCloud