This fixes build on 32-bit systems where the addition may cause integer
promotion to an integer type larger than uintptr_t.
gcc 6.3.0 warning:
file-cache.c: In function 'file_cache_write':
macros.h:25:3: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
((void *) (((uintptr_t) (ptr)) + (offset)))
(((size) + MEM_ALIGN_SIZE-1) & ~((size_t) MEM_ALIGN_SIZE-1))
#define PTR_OFFSET(ptr, offset) \
- ((void *) (((uintptr_t) (ptr)) + (offset)))
+ ((void *) (((uintptr_t) (ptr)) + ((size_t) (offset))))
#define CONST_PTR_OFFSET(ptr, offset) \
- ((const void *) (((uintptr_t) (ptr)) + (offset)))
+ ((const void *) (((uintptr_t) (ptr)) + ((size_t) (offset))))
#define container_of(ptr, type, name) \
(type *)((uintptr_t)(ptr) - (uintptr_t)offsetof(type, name) + \