[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] malloca: pacify CHERI clang
From: |
Paul Eggert |
Subject: |
[PATCH] malloca: pacify CHERI clang |
Date: |
Mon, 11 Nov 2024 10:59:53 -0800 |
* lib/malloca.c (freea) [__CHERI_PURE_CAPABILITY__]:
Add a cast as the code otherwise doesn’t conform to C.
---
ChangeLog | 4 ++++
lib/malloca.c | 2 +-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
index abeae1e6b6..05594a9581 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +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.
+
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
--
2.47.0
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [PATCH] malloca: pacify CHERI clang,
Paul Eggert <=