]> git.kaiwu.me - nginx.git/commitdiff
fix building by gcc 4.x with -O2/3/s in some Linux distributions:
authorIgor Sysoev <igor@sysoev.ru>
Mon, 21 Dec 2009 21:56:48 +0000 (21:56 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Mon, 21 Dec 2009 21:56:48 +0000 (21:56 +0000)
   dereferencing type-punned pointer will break strict-aliasing rules
the bug has been introduced in r3065

src/http/ngx_http.h

index b717c803243474a78834226406756174e6bd75d2..bb19daf83bf7fdecf6dd7d6b4f3b996adca42e57 100644 (file)
@@ -94,7 +94,7 @@ void ngx_http_empty_handler(ngx_event_t *wev);
 void ngx_http_request_empty_handler(ngx_http_request_t *r);
 
 
-#define ngx_http_ephemeral(r)  (ngx_http_ephemeral_t *) (&r->uri_start)
+#define ngx_http_ephemeral(r)  (void *) (&r->uri_start)
 
 
 #define NGX_HTTP_LAST   1