Skip to content

Commit 20a6015

Browse files
authored
Changed (size_t) typecasts to (uintptr_t). (#81)
* Changed (size_t) typecasts to (uintptr_t). --------- Authored-by: Aleksey Vaneev <D:\The Bat!\Mail>
1 parent 9ae907a commit 20a6015

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pffft_common.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11

22
#include "pffft.h"
33

4+
#include <stdint.h>
45
#include <stdlib.h>
56

67
/* SSE and co like 16-bytes aligned pointers
@@ -10,7 +11,7 @@
1011
static void * Valigned_malloc(size_t nb_bytes) {
1112
void *p, *p0 = malloc(nb_bytes + MALLOC_V4SF_ALIGNMENT);
1213
if (!p0) return (void *) 0;
13-
p = (void *) (((size_t) p0 + MALLOC_V4SF_ALIGNMENT) & (~((size_t) (MALLOC_V4SF_ALIGNMENT-1))));
14+
p = (void *) (((uintptr_t) p0 + MALLOC_V4SF_ALIGNMENT) & (~((uintptr_t) (MALLOC_V4SF_ALIGNMENT-1))));
1415
*((void **) p - 1) = p0;
1516
return p;
1617
}

0 commit comments

Comments
 (0)