aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Chisnall <theraven@FreeBSD.org>2014-04-05 08:17:48 +0000
committerDavid Chisnall <theraven@FreeBSD.org>2014-04-05 08:17:48 +0000
commitc8aeb6b44755c6f6773a5e15958759adb623692c (patch)
treead1d7faf6eebba173cc8271756232b03ea30b047
parent09adfca39f0fca1f857cdf11e85aced12b07db91 (diff)
downloadsrc-c8aeb6b44755c6f6773a5e15958759adb623692c.tar.gz
src-c8aeb6b44755c6f6773a5e15958759adb623692c.zip
Silence a warning with GCC that was breaking the build with Juniper's GCC.
Reviewed by: marcel
Notes
Notes: svn path=/head/; revision=264143
-rw-r--r--lib/libc/stdlib/atexit.c3
-rw-r--r--lib/libc/stdlib/heapsort.c3
-rw-r--r--lib/libc/stdlib/qsort_r.c5
3 files changed, 7 insertions, 4 deletions
diff --git a/lib/libc/stdlib/atexit.c b/lib/libc/stdlib/atexit.c
index 43b6aa1f4d72..0a5048a97018 100644
--- a/lib/libc/stdlib/atexit.c
+++ b/lib/libc/stdlib/atexit.c
@@ -80,6 +80,7 @@ struct atexit {
};
static struct atexit *__atexit; /* points to head of LIFO stack */
+typedef DECLARE_BLOCK(void, atexit_block, void);
/*
* Register the function described by 'fptr' to be called at application
@@ -141,7 +142,7 @@ atexit(void (*func)(void))
* Register a block to be performed at exit.
*/
int
-atexit_b(DECLARE_BLOCK(void, func, void))
+atexit_b(atexit_block func)
{
struct atexit_fn fn;
int error;
diff --git a/lib/libc/stdlib/heapsort.c b/lib/libc/stdlib/heapsort.c
index 9286d6df13bc..673a6a17e322 100644
--- a/lib/libc/stdlib/heapsort.c
+++ b/lib/libc/stdlib/heapsort.c
@@ -45,6 +45,7 @@ __FBSDID("$FreeBSD$");
#ifdef I_AM_HEAPSORT_B
#include "block_abi.h"
#define COMPAR(x, y) CALL_BLOCK(compar, x, y)
+typedef DECLARE_BLOCK(int, heapsort_block, const void *, const void *);
#else
#define COMPAR(x, y) compar(x, y)
#endif
@@ -149,7 +150,7 @@ int
heapsort_b(vbase, nmemb, size, compar)
void *vbase;
size_t nmemb, size;
- DECLARE_BLOCK(int, compar, const void *, const void *);
+ heapsort_block compar;
#else
int
heapsort(vbase, nmemb, size, compar)
diff --git a/lib/libc/stdlib/qsort_r.c b/lib/libc/stdlib/qsort_r.c
index 02469db83548..f489d31c2335 100644
--- a/lib/libc/stdlib/qsort_r.c
+++ b/lib/libc/stdlib/qsort_r.c
@@ -8,9 +8,10 @@
#define I_AM_QSORT_R
#include "qsort.c"
+typedef DECLARE_BLOCK(int, qsort_block, const void *, const void *);
+
void
-qsort_b(void *base, size_t nel, size_t width,
- DECLARE_BLOCK(int, compar, const void *, const void *))
+qsort_b(void *base, size_t nel, size_t width, qsort_block compar)
{
qsort_r(base, nel, width, compar,
(int (*)(void *, const void *, const void *))