Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nginx/nginx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxim Dounin <mdounin@mdounin.ru>2013-09-04 21:16:59 +0400
committerMaxim Dounin <mdounin@mdounin.ru>2013-09-04 21:16:59 +0400
commit2b0dba578fed500c1955979a8e281f4fad53bad9 (patch)
treee6f6e6e857fba187334f34036d6793ba8c2943ae /src/core/ngx_slab.c
parent5ab74625d6b28860a08d64ee808a62508a1491dc (diff)
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.
Diffstat (limited to 'src/core/ngx_slab.c')
-rw-r--r--src/core/ngx_slab.c3
1 files changed, 2 insertions, 1 deletions
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) {