diff --git a/src/pqsort.c b/src/pqsort.c index 508c09f92..fab54e026 100644 --- a/src/pqsort.c +++ b/src/pqsort.c @@ -38,7 +38,7 @@ */ #include - +#include #include #include @@ -62,7 +62,7 @@ static inline void swapfunc (char *, char *, size_t, int); } while (--i > 0); \ } -#define SWAPINIT(a, es) swaptype = ((char *)a - (char *)0) % sizeof(long) || \ +#define SWAPINIT(a, es) swaptype = (uintptr_t)a % sizeof(long) || \ es % sizeof(long) ? 2 : es == sizeof(long)? 0 : 1; static inline void