]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUILD: memprof: make the old caller pointer a const in get_prof_bin()
authorWilly Tarreau <w@1wt.eu>
Sun, 9 May 2021 21:18:50 +0000 (23:18 +0200)
committerWilly Tarreau <w@1wt.eu>
Sun, 9 May 2021 21:18:50 +0000 (23:18 +0200)
It's a const void* in the target, we can't use a void* in the caller,
this causes a build warning with clang.

src/activity.c

index 2080fd6dd64b8cb078a2d7b4eee826f9e12cc22e..179ff1f32ff23a0bc5b27fecd772835b09b1a06f 100644 (file)
@@ -187,7 +187,7 @@ static void  memprof_free_initial_handler(void *ptr)
 static struct memprof_stats *memprof_get_bin(const void *ra)
 {
        int retries = 16; // up to 16 consecutive entries may be tested.
-       void *old;
+       const void *old;
        unsigned int bin;
 
        bin = memprof_hash_ptr(ra);