ignore ngx_atomic_fetch_add() result

this fixes building at least by gcc 4.2.1 on Mac OS X 10.6
This commit is contained in:
Igor Sysoev 2009-06-18 13:14:51 +00:00
parent 1f823708e0
commit a5fe5881c6
3 changed files with 17 additions and 17 deletions

View File

@ -75,7 +75,7 @@ ngx_event_accept(ngx_event_t *ev)
} }
#if (NGX_STAT_STUB) #if (NGX_STAT_STUB)
ngx_atomic_fetch_add(ngx_stat_accepted, 1); (void) ngx_atomic_fetch_add(ngx_stat_accepted, 1);
#endif #endif
ngx_accept_disabled = ngx_cycle->connection_n / 8 ngx_accept_disabled = ngx_cycle->connection_n / 8
@ -93,7 +93,7 @@ ngx_event_accept(ngx_event_t *ev)
} }
#if (NGX_STAT_STUB) #if (NGX_STAT_STUB)
ngx_atomic_fetch_add(ngx_stat_active, 1); (void) ngx_atomic_fetch_add(ngx_stat_active, 1);
#endif #endif
c->pool = ngx_create_pool(ls->pool_size, ev->log); c->pool = ngx_create_pool(ls->pool_size, ev->log);
@ -188,7 +188,7 @@ ngx_event_accept(ngx_event_t *ev)
c->number = ngx_atomic_fetch_add(ngx_connection_counter, 1); c->number = ngx_atomic_fetch_add(ngx_connection_counter, 1);
#if (NGX_STAT_STUB) #if (NGX_STAT_STUB)
ngx_atomic_fetch_add(ngx_stat_handled, 1); (void) ngx_atomic_fetch_add(ngx_stat_handled, 1);
#endif #endif
#if (NGX_THREADS) #if (NGX_THREADS)
@ -379,7 +379,7 @@ ngx_close_accepted_connection(ngx_connection_t *c)
} }
#if (NGX_STAT_STUB) #if (NGX_STAT_STUB)
ngx_atomic_fetch_add(ngx_stat_active, -1); (void) ngx_atomic_fetch_add(ngx_stat_active, -1);
#endif #endif
} }

View File

@ -198,7 +198,7 @@ ngx_http_init_connection(ngx_connection_t *c)
c->write->handler = ngx_http_empty_handler; c->write->handler = ngx_http_empty_handler;
#if (NGX_STAT_STUB) #if (NGX_STAT_STUB)
ngx_atomic_fetch_add(ngx_stat_reading, 1); (void) ngx_atomic_fetch_add(ngx_stat_reading, 1);
#endif #endif
if (rev->ready) { if (rev->ready) {
@ -217,7 +217,7 @@ ngx_http_init_connection(ngx_connection_t *c)
if (ngx_handle_read_event(rev, 0) != NGX_OK) { if (ngx_handle_read_event(rev, 0) != NGX_OK) {
#if (NGX_STAT_STUB) #if (NGX_STAT_STUB)
ngx_atomic_fetch_add(ngx_stat_reading, -1); (void) ngx_atomic_fetch_add(ngx_stat_reading, -1);
#endif #endif
ngx_http_close_connection(c); ngx_http_close_connection(c);
return; return;
@ -247,7 +247,7 @@ ngx_http_init_request(ngx_event_t *rev)
#endif #endif
#if (NGX_STAT_STUB) #if (NGX_STAT_STUB)
ngx_atomic_fetch_add(ngx_stat_reading, -1); (void) ngx_atomic_fetch_add(ngx_stat_reading, -1);
#endif #endif
c = rev->data; c = rev->data;
@ -500,9 +500,9 @@ ngx_http_init_request(ngx_event_t *rev)
r->log_handler = ngx_http_log_error_handler; r->log_handler = ngx_http_log_error_handler;
#if (NGX_STAT_STUB) #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; r->stat_reading = 1;
ngx_atomic_fetch_add(ngx_stat_requests, 1); (void) ngx_atomic_fetch_add(ngx_stat_requests, 1);
#endif #endif
rev->handler(rev); rev->handler(rev);
@ -1547,9 +1547,9 @@ ngx_http_process_request(ngx_http_request_t *r)
} }
#if (NGX_STAT_STUB) #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; 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; r->stat_writing = 1;
#endif #endif
@ -2319,7 +2319,7 @@ ngx_http_set_keepalive(ngx_http_request_t *r)
ngx_log_debug0(NGX_LOG_DEBUG_HTTP, c->log, 0, "pipelined request"); ngx_log_debug0(NGX_LOG_DEBUG_HTTP, c->log, 0, "pipelined request");
#if (NGX_STAT_STUB) #if (NGX_STAT_STUB)
ngx_atomic_fetch_add(ngx_stat_reading, 1); (void) ngx_atomic_fetch_add(ngx_stat_reading, 1);
#endif #endif
hc->pipeline = 1; hc->pipeline = 1;
@ -2549,7 +2549,7 @@ ngx_http_keepalive_handler(ngx_event_t *rev)
b->last += n; b->last += n;
#if (NGX_STAT_STUB) #if (NGX_STAT_STUB)
ngx_atomic_fetch_add(ngx_stat_reading, 1); (void) ngx_atomic_fetch_add(ngx_stat_reading, 1);
#endif #endif
c->log->handler = ngx_http_log_error; c->log->handler = ngx_http_log_error;
@ -2778,11 +2778,11 @@ ngx_http_request_done(ngx_http_request_t *r, ngx_int_t error)
#if (NGX_STAT_STUB) #if (NGX_STAT_STUB)
if (r->stat_reading) { 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) { if (r->stat_writing) {
ngx_atomic_fetch_add(ngx_stat_writing, -1); (void) ngx_atomic_fetch_add(ngx_stat_writing, -1);
} }
#endif #endif
@ -2863,7 +2863,7 @@ ngx_http_close_connection(ngx_connection_t *c)
#endif #endif
#if (NGX_STAT_STUB) #if (NGX_STAT_STUB)
ngx_atomic_fetch_add(ngx_stat_active, -1); (void) ngx_atomic_fetch_add(ngx_stat_active, -1);
#endif #endif
c->destroyed = 1; c->destroyed = 1;

View File

@ -710,7 +710,7 @@ ngx_mail_close_connection(ngx_connection_t *c)
#endif #endif
#if (NGX_STAT_STUB) #if (NGX_STAT_STUB)
ngx_atomic_fetch_add(ngx_stat_active, -1); (void) ngx_atomic_fetch_add(ngx_stat_active, -1);
#endif #endif
c->destroyed = 1; c->destroyed = 1;