[njs] Fixed building by GCC 4.1.

Igor Sysoev igor at sysoev.ru
Fri Mar 4 11:58:53 UTC 2016


details:   http://hg.nginx.org/njs/rev/480849ab9e96
branches:  
changeset: 83:480849ab9e96
user:      Igor Sysoev <igor at sysoev.ru>
date:      Fri Mar 04 14:57:21 2016 +0300
description:
Fixed building by GCC 4.1.

diffstat:

 nginx/ngx_http_js_module.c |  3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diffs (13 lines):

diff -r 0dce9318807a -r 480849ab9e96 nginx/ngx_http_js_module.c
--- a/nginx/ngx_http_js_module.c	Wed Mar 02 15:10:28 2016 +0300
+++ b/nginx/ngx_http_js_module.c	Fri Mar 04 14:57:21 2016 +0300
@@ -449,7 +449,8 @@ ngx_http_js_vm_run(ngx_http_request_t *r
     cln->handler = ngx_http_js_cleanup_mem_cache_pool;
     cln->data = mcp;
 
-    nvm = njs_vm_clone(js->vm, mcp, (void **) &r);
+    /* The double cast is required by GCC 4.1. */
+    nvm = njs_vm_clone(js->vm, mcp, (void **) (void *) &r);
     if (nvm == NULL) {
         return NGX_ERROR;
     }



More information about the nginx-devel mailing list