Fix compilation warnings on Android
* src/alloc.c (pointer_align): Only define if !USE_ALIGNED_ALLOC.
This commit is contained in:
parent
d58fe6619f
commit
532ff6e29d
1 changed files with 10 additions and 8 deletions
18
src/alloc.c
18
src/alloc.c
|
@ -501,14 +501,6 @@ Lisp_Object const *staticvec[NSTATICS];
|
|||
|
||||
int staticidx;
|
||||
|
||||
#ifndef HAVE_ALIGNED_ALLOC
|
||||
static void *
|
||||
pointer_align (void *ptr, int alignment)
|
||||
{
|
||||
return (void *) ROUNDUP ((uintptr_t) ptr, alignment);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Extract the pointer hidden within O. */
|
||||
|
||||
static ATTRIBUTE_NO_SANITIZE_UNDEFINED void *
|
||||
|
@ -1095,6 +1087,16 @@ struct ablocks
|
|||
/* The list of free ablock. */
|
||||
static struct ablock *free_ablock;
|
||||
|
||||
#if !USE_ALIGNED_ALLOC
|
||||
|
||||
static void *
|
||||
pointer_align (void *ptr, int alignment)
|
||||
{
|
||||
return (void *) ROUNDUP ((uintptr_t) ptr, alignment);
|
||||
}
|
||||
|
||||
#endif /* !USE_ALIGNED_ALLOC */
|
||||
|
||||
/* Allocate an aligned block of nbytes.
|
||||
Alignment is on a multiple of BLOCK_ALIGN and `nbytes' has to be
|
||||
smaller or equal to BLOCK_BYTES. */
|
||||
|
|
Loading…
Add table
Reference in a new issue