From: Willy Tarreau Date: Fri, 22 Nov 2024 08:41:02 +0000 (+0100) Subject: BUILD: activity/memprofile: fix a build warning in the posix_memalign handler X-Git-Tag: v3.1.0~40 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b30639848e502f79829abc28c8093aa0e34ba1f9;p=thirdparty%2Fhaproxy.git BUILD: activity/memprofile: fix a build warning in the posix_memalign handler A "return NULL" statement was placed for error handling in the posix_memalign() handler instead of an int errno value, by recent commit 5ddc8b3ad4 ("MINOR: activity/memprofile: monitor non-portable calls as well"). Surprisingly the warning only triggered on gcc-4.8. Let's use ENOMEM instead. No backport needed. --- diff --git a/src/activity.c b/src/activity.c index 0aa1027e86..64ec5de93c 100644 --- a/src/activity.c +++ b/src/activity.c @@ -282,7 +282,7 @@ static int memprof_posix_memalign_initial_handler(void **ptr, size_t al, size_t { if (in_memprof) { /* probably that dlsym() needs posix_memalign(), let's fail */ - return NULL; + return ENOMEM; } memprof_init();