aboutsummaryrefslogtreecommitdiffstats
path: root/src/alloc.c
diff options
context:
space:
mode:
authorPo Lu2025-02-01 20:59:24 +0800
committerPo Lu2025-02-01 20:59:24 +0800
commit532ff6e29df87b9fdc84c56cddd9c587c5895e48 (patch)
tree665265b1473ceff07539e7a67e75570daf36d5d9 /src/alloc.c
parentd58fe6619f9b31069ebb420f0e85c7ce00a5fcb7 (diff)
downloademacs-532ff6e29df87b9fdc84c56cddd9c587c5895e48.tar.gz
emacs-532ff6e29df87b9fdc84c56cddd9c587c5895e48.zip
Fix compilation warnings on Android
* src/alloc.c (pointer_align): Only define if !USE_ALIGNED_ALLOC.
Diffstat (limited to 'src/alloc.c')
-rw-r--r--src/alloc.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/alloc.c b/src/alloc.c
index 40a59854a87..c39459e1f2e 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -501,14 +501,6 @@ Lisp_Object const *staticvec[NSTATICS];
501 501
502int staticidx; 502int staticidx;
503 503
504#ifndef HAVE_ALIGNED_ALLOC
505static void *
506pointer_align (void *ptr, int alignment)
507{
508 return (void *) ROUNDUP ((uintptr_t) ptr, alignment);
509}
510#endif
511
512/* Extract the pointer hidden within O. */ 504/* Extract the pointer hidden within O. */
513 505
514static ATTRIBUTE_NO_SANITIZE_UNDEFINED void * 506static ATTRIBUTE_NO_SANITIZE_UNDEFINED void *
@@ -1095,6 +1087,16 @@ struct ablocks
1095/* The list of free ablock. */ 1087/* The list of free ablock. */
1096static struct ablock *free_ablock; 1088static struct ablock *free_ablock;
1097 1089
1090#if !USE_ALIGNED_ALLOC
1091
1092static void *
1093pointer_align (void *ptr, int alignment)
1094{
1095 return (void *) ROUNDUP ((uintptr_t) ptr, alignment);
1096}
1097
1098#endif /* !USE_ALIGNED_ALLOC */
1099
1098/* Allocate an aligned block of nbytes. 1100/* Allocate an aligned block of nbytes.
1099 Alignment is on a multiple of BLOCK_ALIGN and `nbytes' has to be 1101 Alignment is on a multiple of BLOCK_ALIGN and `nbytes' has to be
1100 smaller or equal to BLOCK_BYTES. */ 1102 smaller or equal to BLOCK_BYTES. */