You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by rj...@apache.org on 2015/01/18 19:57:53 UTC

svn commit: r1652829 - /httpd/httpd/trunk/modules/aaa/mod_authnz_fcgi.c

Author: rjung
Date: Sun Jan 18 18:57:53 2015
New Revision: 1652829

URL: http://svn.apache.org/r1652829
Log:
Silence compiler warnings:

- modules/aaa/mod_authnz_fcgi.c:705: warning:
  'orspbuflen' may be used uninitialized in this function

- modules/aaa/mod_authnz_fcgi.c:1235: warning:
  comparison is always false due to limited range of data type

Modified:
    httpd/httpd/trunk/modules/aaa/mod_authnz_fcgi.c

Modified: httpd/httpd/trunk/modules/aaa/mod_authnz_fcgi.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/aaa/mod_authnz_fcgi.c?rev=1652829&r1=1652828&r2=1652829&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/aaa/mod_authnz_fcgi.c (original)
+++ httpd/httpd/trunk/modules/aaa/mod_authnz_fcgi.c Sun Jan 18 18:57:53 2015
@@ -701,7 +701,7 @@ static void req_rsp(request_rec *r, cons
 {
     const char *fn = "req_rsp";
     apr_pool_t *temp_pool;
-    apr_size_t orspbuflen;
+    apr_size_t orspbuflen = 0;
     apr_socket_t *s;
     apr_status_t rv;
     apr_table_t *saved_subprocess_env = 
@@ -1167,7 +1167,7 @@ static const char *fcgi_define_provider(
     char *host;
     const char *err, *stype;
     fcgi_provider_conf *conf = apr_pcalloc(cmd->pool, sizeof(*conf));
-    int ca = 0, rc;
+    int ca = 0, rc, port;
 
     fcgi_backend_regex = ap_rxplus_compile(cmd->pool, FCGI_BACKEND_REGEX_STR);
     if (!fcgi_backend_regex) {
@@ -1230,8 +1230,8 @@ static const char *fcgi_define_provider(
         host[strlen(host) - 1] = '\0';
     }
 
-    conf->port = atoi(ap_rxplus_pmatch(cmd->pool, fcgi_backend_regex, 2));
-    if (conf->port > 65535) {
+    port = atoi(ap_rxplus_pmatch(cmd->pool, fcgi_backend_regex, 2));
+    if (port > 65535) {
         return apr_pstrcat(cmd->pool,
                            dname, ": backend-address '",
                            argv[ca],
@@ -1241,6 +1241,7 @@ static const char *fcgi_define_provider(
 
     conf->backend = argv[ca];
     conf->host = host;
+    conf->port = port;
     ca++;
 
     rv = apr_sockaddr_info_get(&conf->backend_addrs, conf->host,