]> git.ipfire.org Git - thirdparty/rsync.git/commitdiff
Fix warning about missing bomb(..) prototype
authorHolger Hoffstätte <holger@applied-asynchrony.com>
Mon, 4 Sep 2023 12:05:21 +0000 (14:05 +0200)
committerWayne Davison <wayne@opencoder.net>
Wed, 20 Nov 2024 05:28:39 +0000 (21:28 -0800)
Clang rightfully complains about invoking bomb(..) without a proper prototype:
  lib/pool_alloc.c:171:16: warning: passing arguments to a function without a prototype
  is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
                (*pool->bomb)(bomb_msg, __FILE__, __LINE__);
                             ^
1 warning generated.

Signed-off-by: Holger Hoffstätte <holger@applied-asynchrony.com>
lib/pool_alloc.c

index a1a7245f6f59c6e2d4d6e0be4a1bbe2cdecd23c1..bc1cc1a6bbab39b675c97613907e41c6959448a8 100644 (file)
@@ -9,7 +9,7 @@ struct alloc_pool
        size_t                  size;           /* extent size          */
        size_t                  quantum;        /* allocation quantum   */
        struct pool_extent      *extents;       /* top extent is "live" */
-       void                    (*bomb)();      /* called if malloc fails */
+       void                    (*bomb)(const char*, const char*, int); /* called if malloc fails */
        int                     flags;
 
        /* statistical data */