From: Paul Eggert Date: Mon, 11 Nov 2024 18:59:16 +0000 (-0800) Subject: malloca: pacify CHERI clang X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=6025b9a1892d5a0e120da17ec2e7e4908222d1b1;p=gnulib.git malloca: pacify CHERI clang * lib/malloca.c (freea) [__CHERI_PURE_CAPABILITY__]: Add a cast as the code otherwise doesn’t conform to C. --- diff --git a/ChangeLog b/ChangeLog index abeae1e6b6..05594a9581 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2024-11-11 Paul Eggert + malloca: pacify CHERI clang + * lib/malloca.c (freea) [__CHERI_PURE_CAPABILITY__]: + Add a cast as the code otherwise doesn’t conform to C. + file-has-acl: another nofollow fix for FreeBSD * lib/file-has-acl.c (file_has_aclinfo): On FreeBSD, NetBSD >= 10, if we don’t follow symlinks the first time, also don’t follow diff --git a/lib/malloca.c b/lib/malloca.c index 520f34d280..2219459490 100644 --- a/lib/malloca.c +++ b/lib/malloca.c @@ -118,7 +118,7 @@ freea (void *p) char *cp = p; small_t *sp = p; # if defined __CHERI_PURE_CAPABILITY__ - void *mem = sp[-1]; + void *mem = (void *) sp[-1]; # else void *mem = cp - sp[-1]; # endif