asort: fix gcc warning.
authorRusty Russell <rusty@rustcorp.com.au>
Wed, 24 Feb 2010 03:42:22 +0000 (14:12 +1030)
committerRusty Russell <rusty@rustcorp.com.au>
Wed, 24 Feb 2010 03:42:22 +0000 (14:12 +1030)
ccan/asort/asort.c

index cf8d8d9d196afe0613a5133b37c14c6c06ea034f..3f7b7fd6c792cb6fe68f2e78e873c9ad9ca3db9f 100644 (file)
@@ -7,8 +7,8 @@ void _asort(void *base, size_t nmemb, size_t size,
 {
 #if HAVE_NESTED_FUNCTIONS
        /* 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)
        {
                return compar(a, b, ctx);