Browse Source

asort: fix gcc warning.

Rusty Russell 16 years ago
parent
commit
e96830aefa
1 changed files with 2 additions and 2 deletions
  1. 2 2
      ccan/asort/asort.c

+ 2 - 2
ccan/asort/asort.c

@@ -7,8 +7,8 @@ void _asort(void *base, size_t nmemb, size_t size,
 {
 {
 #if HAVE_NESTED_FUNCTIONS
 #if HAVE_NESTED_FUNCTIONS
 	/* This gives bogus "warning: no previous prototype for ‘cmp’"
 	/* This gives bogus "warning: no previous prototype for ‘cmp’"
-	 * with gcc 4 with -Wmissing-prototypes.  But there's no way
-	 * to predeclare it, so we lose. */
+	 * with gcc 4 with -Wmissing-prototypes.  Hence the auto crap. */
+	auto int cmp(const void *a, const void *b);
 	int cmp(const void *a, const void *b)
 	int cmp(const void *a, const void *b)
 	{
 	{
 		return compar(a, b, ctx);
 		return compar(a, b, ctx);