ПРОЕКТЫ 


  АРХИВ 


Apache-Talk @lexa.ru 

Inet-Admins @info.east.ru 

Filmscanners @halftone.co.uk 

Security-alerts @yandex-team.ru 

nginx-ru @sysoev.ru 


  СТАТЬИ 


  ПЕРСОНАЛЬНОЕ 


  ПРОГРАММЫ 



ПИШИТЕ
ПИСЬМА












     АРХИВ :: nginx-ru
Nginx-ru mailing list archive (nginx-ru@sysoev.ru)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: nginx-0.8.2



On Mon, Jun 15, 2009 at 09:15:32PM +0400, proforg wrote:

> При попытке собрать под mac os ругается :
> 
> gcc -c -O -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter
> -Wunused-function -Wunused-variable -Wunused-value -Werror -g
> -I/opt/local/include -I src/core -I src/event -I src/event/modules -I
> src/os/unix -I objs >                 -o objs/src/event/ngx_event_accept.o >                 src/event/ngx_event_accept.c
> cc1: warnings being treated as errors
> src/event/ngx_event_accept.c: In function 'ngx_event_accept':
> src/event/ngx_event_accept.c:78: warning: value computed is not used
> src/event/ngx_event_accept.c:96: warning: value computed is not used
> src/event/ngx_event_accept.c:191: warning: value computed is not used
> src/event/ngx_event_accept.c: In function 'ngx_close_accepted_connection':
> src/event/ngx_event_accept.c:382: warning: value computed is not used
> make[1]: *** [objs/src/event/ngx_event_accept.o] Error 1
> make: *** [build] Error 2
> 
> >uname -a                                                                     
> >                                                     [21:09]
> Darwin orion.local 10.0.0b1 Darwin Kernel Version 10.0.0b1: Fri May 29
> 00:02:02 PDT 2009; root:xnu-1456~1/RELEASE_I386 i386 i386 MacBook1,1
> Darwin
> 
> >gcc -v                                                                       
> >                                                     [21:09]
> Using built-in specs.
> Target: i686-apple-darwin10
> Configured with: /var/tmp/gcc/gcc-5646~6/src/configure
> --disable-checking --enable-werror --prefix=/usr
> --mandir=/usr/share/man --enable-languages=c,objc,c++,obj-c++
> --program-transform-name=/^[cg][^.-]*$/s/$/-4.2/
> --with-slibdir=/usr/lib --build=i686-apple-darwin10
> --with-gxx-include-dir=/usr/include/c++/4.2.1
> --host=i686-apple-darwin10 --target=i686-apple-darwin10
> Thread model: posix
> gcc version 4.2.1 (Apple Inc. build 5646)

Патч. А откуда 4.2.1 взялся ? Это Snow Leopard, судя по darwin10 ?


-- 
Игорь Сысоев
http://sysoev.ru
Index: src/http/ngx_http_request.c
===================================================================
--- src/http/ngx_http_request.c (revision 2270)
+++ src/http/ngx_http_request.c (working copy)
@@ -198,7 +198,7 @@
     c->write->handler = ngx_http_empty_handler;
 
 #if (NGX_STAT_STUB)
-    ngx_atomic_fetch_add(ngx_stat_reading, 1);
+    (void) ngx_atomic_fetch_add(ngx_stat_reading, 1);
 #endif
 
     if (rev->ready) {
@@ -217,7 +217,7 @@
 
     if (ngx_handle_read_event(rev, 0) != NGX_OK) {
 #if (NGX_STAT_STUB)
-        ngx_atomic_fetch_add(ngx_stat_reading, -1);
+        (void) ngx_atomic_fetch_add(ngx_stat_reading, -1);
 #endif
         ngx_http_close_connection(c);
         return;
@@ -247,7 +247,7 @@
 #endif
 
 #if (NGX_STAT_STUB)
-    ngx_atomic_fetch_add(ngx_stat_reading, -1);
+    (void) ngx_atomic_fetch_add(ngx_stat_reading, -1);
 #endif
 
     c = rev->data;
@@ -500,9 +500,9 @@
     r->log_handler = ngx_http_log_error_handler;
 
 #if (NGX_STAT_STUB)
-    ngx_atomic_fetch_add(ngx_stat_reading, 1);
+    (void) ngx_atomic_fetch_add(ngx_stat_reading, 1);
     r->stat_reading = 1;
-    ngx_atomic_fetch_add(ngx_stat_requests, 1);
+    (void) ngx_atomic_fetch_add(ngx_stat_requests, 1);
 #endif
 
     rev->handler(rev);
@@ -1547,9 +1547,9 @@
     }
 
 #if (NGX_STAT_STUB)
-    ngx_atomic_fetch_add(ngx_stat_reading, -1);
+    (void) ngx_atomic_fetch_add(ngx_stat_reading, -1);
     r->stat_reading = 0;
-    ngx_atomic_fetch_add(ngx_stat_writing, 1);
+    (void) ngx_atomic_fetch_add(ngx_stat_writing, 1);
     r->stat_writing = 1;
 #endif
 
@@ -2319,7 +2319,7 @@
         ngx_log_debug0(NGX_LOG_DEBUG_HTTP, c->log, 0, "pipelined request");
 
 #if (NGX_STAT_STUB)
-        ngx_atomic_fetch_add(ngx_stat_reading, 1);
+        (void) ngx_atomic_fetch_add(ngx_stat_reading, 1);
 #endif
 
         hc->pipeline = 1;
@@ -2549,7 +2549,7 @@
     b->last += n;
 
 #if (NGX_STAT_STUB)
-    ngx_atomic_fetch_add(ngx_stat_reading, 1);
+    (void) ngx_atomic_fetch_add(ngx_stat_reading, 1);
 #endif
 
     c->log->handler = ngx_http_log_error;
@@ -2778,11 +2778,11 @@
 #if (NGX_STAT_STUB)
 
     if (r->stat_reading) {
-        ngx_atomic_fetch_add(ngx_stat_reading, -1);
+        (void) ngx_atomic_fetch_add(ngx_stat_reading, -1);
     }
 
     if (r->stat_writing) {
-        ngx_atomic_fetch_add(ngx_stat_writing, -1);
+        (void) ngx_atomic_fetch_add(ngx_stat_writing, -1);
     }
 
 #endif
@@ -2863,7 +2863,7 @@
 #endif
 
 #if (NGX_STAT_STUB)
-    ngx_atomic_fetch_add(ngx_stat_active, -1);
+    (void) ngx_atomic_fetch_add(ngx_stat_active, -1);
 #endif
 
     c->destroyed = 1;
Index: src/event/ngx_event_accept.c
===================================================================
--- src/event/ngx_event_accept.c        (revision 2270)
+++ src/event/ngx_event_accept.c        (working copy)
@@ -75,7 +75,7 @@
         }
 
 #if (NGX_STAT_STUB)
-        ngx_atomic_fetch_add(ngx_stat_accepted, 1);
+        (void) ngx_atomic_fetch_add(ngx_stat_accepted, 1);
 #endif
 
         ngx_accept_disabled = ngx_cycle->connection_n / 8
@@ -93,7 +93,7 @@
         }
 
 #if (NGX_STAT_STUB)
-        ngx_atomic_fetch_add(ngx_stat_active, 1);
+        (void) ngx_atomic_fetch_add(ngx_stat_active, 1);
 #endif
 
         c->pool = ngx_create_pool(ls->pool_size, ev->log);
@@ -188,7 +188,7 @@
         c->number = ngx_atomic_fetch_add(ngx_connection_counter, 1);
 
 #if (NGX_STAT_STUB)
-        ngx_atomic_fetch_add(ngx_stat_handled, 1);
+        (void) ngx_atomic_fetch_add(ngx_stat_handled, 1);
 #endif
 
 #if (NGX_THREADS)
@@ -379,7 +379,7 @@
     }
 
 #if (NGX_STAT_STUB)
-    ngx_atomic_fetch_add(ngx_stat_active, -1);
+    (void) ngx_atomic_fetch_add(ngx_stat_active, -1);
 #endif
 }
 
Index: src/mail/ngx_mail_handler.c
===================================================================
--- src/mail/ngx_mail_handler.c (revision 2270)
+++ src/mail/ngx_mail_handler.c (working copy)
@@ -710,7 +710,7 @@
 #endif
 
 #if (NGX_STAT_STUB)
-    ngx_atomic_fetch_add(ngx_stat_active, -1);
+    (void) ngx_atomic_fetch_add(ngx_stat_active, -1);
 #endif
 
     c->destroyed = 1;


 




Copyright © Lexa Software, 1996-2009.