[nginx] Configure: fixed compiler warnings with "-Wall -Wextra".

Sergey Kandaurov pluknet at nginx.com
Tue Jul 24 15:50:00 UTC 2018


details:   http://hg.nginx.org/nginx/rev/f7e79596baf2
branches:  
changeset: 7327:f7e79596baf2
user:      Sergey Kandaurov <pluknet at nginx.com>
date:      Tue Jul 24 18:46:54 2018 +0300
description:
Configure: fixed compiler warnings with "-Wall -Wextra".

diffstat:

 auto/lib/google-perftools/conf |  3 ++-
 auto/lib/libgd/conf            |  6 ++++--
 auto/lib/libxslt/conf          |  4 ++--
 auto/os/linux                  |  2 ++
 4 files changed, 10 insertions(+), 5 deletions(-)

diffs (62 lines):

diff -r 308819020438 -r f7e79596baf2 auto/lib/google-perftools/conf
--- a/auto/lib/google-perftools/conf	Tue Jul 24 18:46:18 2018 +0300
+++ b/auto/lib/google-perftools/conf	Tue Jul 24 18:46:54 2018 +0300
@@ -9,7 +9,8 @@
     ngx_feature_incs=
     ngx_feature_path=
     ngx_feature_libs="-lprofiler"
-    ngx_feature_test="ProfilerStop()"
+    ngx_feature_test="void ProfilerStop(void);
+                      ProfilerStop()"
     . auto/feature
 
 
diff -r 308819020438 -r f7e79596baf2 auto/lib/libgd/conf
--- a/auto/lib/libgd/conf	Tue Jul 24 18:46:18 2018 +0300
+++ b/auto/lib/libgd/conf	Tue Jul 24 18:46:54 2018 +0300
@@ -9,7 +9,8 @@
     ngx_feature_incs="#include <gd.h>"
     ngx_feature_path=
     ngx_feature_libs="-lgd"
-    ngx_feature_test="gdImagePtr img = gdImageCreateFromGifPtr(1, NULL);"
+    ngx_feature_test="gdImagePtr img = gdImageCreateFromGifPtr(1, NULL);
+                      (void) img"
     . auto/feature
 
 
@@ -76,7 +77,8 @@ if [ $ngx_found = yes ]; then
 
     ngx_feature="GD WebP support"
     ngx_feature_name="NGX_HAVE_GD_WEBP"
-    ngx_feature_test="gdImagePtr img = gdImageCreateFromWebpPtr(1, NULL);"
+    ngx_feature_test="gdImagePtr img = gdImageCreateFromWebpPtr(1, NULL);
+                      (void) img"
     . auto/feature
 
 else
diff -r 308819020438 -r f7e79596baf2 auto/lib/libxslt/conf
--- a/auto/lib/libxslt/conf	Tue Jul 24 18:46:18 2018 +0300
+++ b/auto/lib/libxslt/conf	Tue Jul 24 18:46:54 2018 +0300
@@ -16,8 +16,8 @@
     ngx_feature_libs="-lxml2 -lxslt"
     ngx_feature_test="xmlParserCtxtPtr    ctxt = NULL;
                       xsltStylesheetPtr   sheet = NULL;
-                      xmlDocPtr           doc;
-                      doc = xmlParseChunk(ctxt, NULL, 0, 0);
+                      xmlDocPtr           doc = NULL;
+                      xmlParseChunk(ctxt, NULL, 0, 0);
                       xsltApplyStylesheet(sheet, doc, NULL);"
     . auto/feature
 
diff -r 308819020438 -r f7e79596baf2 auto/os/linux
--- a/auto/os/linux	Tue Jul 24 18:46:18 2018 +0300
+++ b/auto/os/linux	Tue Jul 24 18:46:54 2018 +0300
@@ -185,6 +185,8 @@ ngx_feature_test="struct __user_cap_data
                   data.effective = CAP_TO_MASK(CAP_NET_RAW);
                   data.permitted = 0;
 
+                  (void) header;
+                  (void) data;
                   (void) SYS_capset"
 . auto/feature
 


More information about the nginx-devel mailing list