

![]() | Start a set with this search |
![]() | Include this search in one of my sets |
![]() | Exclude this search from one of my sets |
![]() | Permalink to these results Paste this link in email or IM: |
| Atom feed for tracking future search results Paste this URL into your reader: |
1 message in ru.sysoev.nginxRe: Compile Problem| From | Sent On | Attachments |
|---|---|---|
| Igor Sysoev | Nov 28, 2006 3:34 am | .txt |

![]() | Permalink for this message Paste this link in email or IM: |
![]() | Permalink for this thread Paste this link in email or IM: |
| Atom feed for this thread Paste this URL into your reader: |
| Subject: | Re: Compile Problem | Actions... |
|---|---|---|
| From: | Igor Sysoev (is-G...@public.gmane.org) | |
| Date: | Nov 28, 2006 3:34:08 am | |
| List: | ru.sysoev.nginx | |
| Attachments: | ||
On Tue, 28 Nov 2006, Felix Huber wrote:
just want to let you know that there seems to be a compile problem with the .14 release
gcc -c -O -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Wno-unused-function -Wunused-variable -Wunused-value -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \ -o objs/src/core/ngx_slab.o \ src/core/ngx_slab.c cc1: warnings being treated as errors src/core/ngx_slab.c: In function ?ngx_slab_alloc?: src/core/ngx_slab.c:285: warning: left shift count >= width of type src/core/ngx_slab.c:290: warning: left shift count >= width of type src/core/ngx_slab.c:372: warning: left shift count >= width of type make[1]: *** [objs/src/core/ngx_slab.o] Error 1 make[1]: Leaving directory `/tmp/nginx-0.4.14' make: *** [build] Error 2
The older versions run fine (tried Ubuntu and RHEL4)
The patch for 64-bit platforms.
Igor Sysoev http://sysoev.ru/en/
Index: src/core/ngx_slab.c =================================================================== --- src/core/ngx_slab.c (revision 194) +++ src/core/ngx_slab.c (working copy) @@ -149,8 +149,8 @@ ngx_slab_alloc(ngx_slab_pool_t *pool, size_t size) { size_t s; - uintptr_t p, mask, *bitmap; - ngx_uint_t i, n, m, slot, shift, map; + uintptr_t p, n, m, mask, *bitmap; + ngx_uint_t i, slot, shift, map; ngx_slab_page_t *page, *prev, *slots;
ngx_shmtx_lock(&pool->mutex); @@ -287,7 +287,7 @@ do { if ((page->slab & NGX_SLAB_MAP_MASK) != mask) {
- for (m = 1 << NGX_SLAB_MAP_SHIFT, i = 0; + for (m = (uintptr_t) 1 << NGX_SLAB_MAP_SHIFT, i = 0; m & mask; m <<= 1, i++) { @@ -369,7 +369,7 @@
} else { /* size < ngx_pagesize */
- page->slab = (1 << NGX_SLAB_MAP_SHIFT) | shift; + page->slab = ((uintptr_t) 1 << NGX_SLAB_MAP_SHIFT) | shift; page->next = &slots[slot]; page->prev = (uintptr_t) &slots[slot] | NGX_SLAB_BIG;








.txt