From: Holger Hoffstätte Date: Mon, 4 Sep 2023 12:05:21 +0000 (+0200) Subject: Fix warning about missing bomb(..) prototype X-Git-Tag: v3.4.0~23 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e55b190f4a7c0f9d942bc50be00ab176e3c4dc90;p=thirdparty%2Frsync.git Fix warning about missing bomb(..) prototype 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 --- diff --git a/lib/pool_alloc.c b/lib/pool_alloc.c index a1a7245f..bc1cc1a6 100644 --- a/lib/pool_alloc.c +++ b/lib/pool_alloc.c @@ -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 */