From 2b0dba578fed500c1955979a8e281f4fad53bad9 Mon Sep 17 00:00:00 2001 From: Maxim Dounin Date: Wed, 4 Sep 2013 21:16:59 +0400 Subject: Handling of ngx_int_t != intptr_t case. Casts between pointers and integers produce warnings on size mismatch. To silence them, cast to (u)intptr_t should be used. Prevoiusly, casts to ngx_(u)int_t were used in some cases, and several ngx_int_t expressions had no casts. As of now it's mostly style as ngx_int_t is defined as intptr_t. --- src/core/ngx_slab.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/core') diff --git a/src/core/ngx_slab.c b/src/core/ngx_slab.c index ae9d6f3fc..6d18abb72 100644 --- a/src/core/ngx_slab.c +++ b/src/core/ngx_slab.c @@ -440,7 +440,8 @@ ngx_slab_free_locked(ngx_slab_pool_t *pool, void *p) n = ((uintptr_t) p & (ngx_pagesize - 1)) >> shift; m = (uintptr_t) 1 << (n & (sizeof(uintptr_t) * 8 - 1)); n /= (sizeof(uintptr_t) * 8); - bitmap = (uintptr_t *) ((uintptr_t) p & ~(ngx_pagesize - 1)); + bitmap = (uintptr_t *) + ((uintptr_t) p & ~((uintptr_t) ngx_pagesize - 1)); if (bitmap[n] & m) { -- cgit