]> Savannah Git Hosting - gnulib.git/commitdiff
malloca: pacify CHERI clang
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 11 Nov 2024 18:59:16 +0000 (10:59 -0800)
committerBruno Haible <bruno@clisp.org>
Tue, 12 Nov 2024 00:47:10 +0000 (01:47 +0100)
* lib/malloca.c (freea) [__CHERI_PURE_CAPABILITY__]:
Add a cast as the code otherwise doesn’t conform to C.

ChangeLog
lib/malloca.c

index 4a90fade6ad09c35ace1b3e7bf80fb28ba4eef01..01b4f44bba088b5618839519995d6418f63cf68b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2024-11-11  Paul Eggert  <eggert@cs.ucla.edu>
+
+       malloca: pacify CHERI clang
+       * lib/malloca.c (freea) [__CHERI_PURE_CAPABILITY__]:
+       Add a cast as the code otherwise doesn’t conform to C.
+
 2024-11-11  Bruno Haible  <bruno@clisp.org>
 
        acl-permissions: Define the inline functions in this module.
index e75c72df84ce4ef35a3c94d71b4b4e8eaffa70d5..b89437fd9baad2e296a0c7c213564d68084078b5 100644 (file)
@@ -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