]> granicus.if.org Git - apache/commitdiff
modules: Fix some compiler warnings.
authorGraham Leggett <minfrin@apache.org>
Sat, 14 Sep 2013 14:44:23 +0000 (14:44 +0000)
committerGraham Leggett <minfrin@apache.org>
Sat, 14 Sep 2013 14:44:23 +0000 (14:44 +0000)
trunk patch: http://svn.apache.org/r1500345
             http://svn.apache.org/r1500362
             http://svn.apache.org/r1500423
             http://svn.apache.org/r1500483
             http://svn.apache.org/r1500519

Submitted by: fuankg
Reviewed by: jim, minfrin

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1523259 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
STATUS
include/util_ldap.h
modules/cache/mod_socache_memcache.c
modules/filters/mod_charset_lite.c
modules/filters/mod_data.c
modules/generators/mod_info.c
modules/lua/lua_request.c
modules/proxy/mod_proxy_connect.c
modules/proxy/mod_proxy_fcgi.c

diff --git a/CHANGES b/CHANGES
index 31d11b29f3a88ce77884df91cb5b7b9cc9f33ea1..4695a6710b13e943990d42f7db016aa439ade7aa 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,8 @@
 
 Changes with Apache 2.4.7
 
+  *) modules: Fix some compiler warnings. [Guenter Knauf]
+
   * skiplist: Add skiplist capability to httpd [Jim Jagielski]
 
   * Sync 2.4 and trunk
diff --git a/STATUS b/STATUS
index df2a59d8308a6d0489cf0591f0cfdd65bd38da57..92557cfdbf98387bcadaa507afa04e820ad0b4f5 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -164,21 +164,6 @@ PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
     2.4.x patch: trunk patch works
     +1: trawick, covener, humbedooh
 
-  * modules: Fix some compiler warnings.
-    trunk patch: http://svn.apache.org/r1500345
-                 http://svn.apache.org/r1500362
-                 http://svn.apache.org/r1500423
-                 http://svn.apache.org/r1500483
-                 http://svn.apache.org/r1500519
-    2.4.x patch: trunk patches work
-    +1: fuankg, jim, minfrin
-    comments:
-         jim: In general, casts are sometimes used to "hide" problems
-              that exist, esp when using the incorrect data types...
-              Are these casts safe?
-      fuankg: replied to list with further details about patches.
-      humbedooh: in r1500362, the lua changes can just be backported now :)
-
 
 PATCHES PROPOSED TO BACKPORT FROM TRUNK:
   [ New proposals should be added at the end of the list ]
index c31539817e285f8d9c25bb477af34413c1e0cb33..2db507f5b6b4508774a863cfba5ac5f9e2f902a7 100644 (file)
 #define LDAP_DECLARE_DATA             __declspec(dllimport)
 #endif
 
+#ifdef WIN32
+#define timeval l_timeval
+#endif
+
 #ifdef __cplusplus
 extern "C" {
 #endif
index beeeec2c982e4c5dbe61b5f4fbe56ec946fdc103..8cabd8a50ba7b3dcf58e8ff5dc28f044dceefeb8 100644 (file)
@@ -85,7 +85,7 @@ static apr_status_t socache_mc_init(ap_socache_instance_t *ctx,
 {
     apr_status_t rv;
     int thread_limit = 0;
-    int nservers = 0;
+    apr_uint16_t nservers = 0;
     char *cache_config;
     char *split;
     char *tok;
index 2d3d1439964ca911f2ae9d3c86611c20e3763a79..934f04774d42e11a464ba431462ac13dc86b1369 100644 (file)
@@ -474,7 +474,7 @@ static void log_xlate_error(ap_filter_t *f, apr_status_t rv)
     charset_filter_ctx_t *ctx = f->ctx;
     const char *msg;
     char msgbuf[100];
-    int len;
+    apr_size_t len;
 
     switch(ctx->ees) {
     case EES_LIMIT:
index 83284dd2d8a143957354cd187004d81ece344e01..d083d322047c429596233de9f7065da649b773d8 100644 (file)
@@ -109,7 +109,8 @@ static apr_status_t data_out_filter(ap_filter_t *f, apr_bucket_brigade *bb)
             apr_brigade_length(ctx->bb, 1, &len);
             clen = apr_atoi64(content_length);
             if (clen >= 0 && clen < APR_INT32_MAX) {
-                ap_set_content_length(r, len + apr_base64_encode_len(clen) - 1);
+                ap_set_content_length(r, len +
+                                      apr_base64_encode_len((int)clen) - 1);
             }
             else {
                 apr_table_unset(r->headers_out, "Content-Length");
index 2f2db9fa61d1d327ded4f0f81f811eea63aeb361..e5e63de1378413f2ffa77bd39d3ad79e76f53f12 100644 (file)
@@ -113,7 +113,7 @@ static void put_int_flush_right(request_rec * r, int i, int field)
         if (r)
             ap_rputc('0' + i % 10, r);
         else
-            apr_file_putc('0' + i % 10, out);
+            apr_file_putc((char)('0' + i % 10), out);
     }
     else {
         if (r)
index c2cfb5354872ccdea1cfda20197fdb3390d91642..eb6aef1d164a4a8a39de00f977ef5208dc622f6f 100644 (file)
@@ -884,7 +884,7 @@ static int lua_apr_touch(lua_State *L)
     r = ap_lua_check_request_rec(L, 1);
     luaL_checktype(L, 2, LUA_TSTRING);
     path = lua_tostring(L, 2);
-    mtime = luaL_optnumber(L, 3, apr_time_now());
+    mtime = (apr_time_t)luaL_optnumber(L, 3, (lua_Number)apr_time_now());
     status = apr_file_mtime_set(path, mtime, r->pool);
     lua_pushboolean(L, (status == 0));
     return 1;
index b38edc91f44d5d79d590e4b131ba837a77b12878..9a1bfefb7f63a727683fcc516387e7445269e34f 100644 (file)
@@ -220,7 +220,7 @@ static int proxy_connect_handler(request_rec *r, proxy_worker *worker,
 
     apr_uri_t uri;
     const char *connectname;
-    int connectport = 0;
+    apr_port_t connectport = 0;
 
     /* is this for us? */
     if (r->method_number != M_CONNECT) {
index 0f844163dc9b9008ae838587c1b06192392c0418..875153fe357eef1fbd2199331a602382fcd52c8d 100644 (file)
@@ -234,7 +234,8 @@ static apr_status_t get_data(proxy_conn_rec *conn,
     return rv;
 }
 
-static apr_status_t send_begin_request(proxy_conn_rec *conn, int request_id)
+static apr_status_t send_begin_request(proxy_conn_rec *conn,
+                                       apr_uint16_t request_id)
 {
     struct iovec vec[2];
     fcgi_header header;
@@ -266,7 +267,7 @@ static apr_status_t send_begin_request(proxy_conn_rec *conn, int request_id)
 }
 
 static apr_status_t send_environment(proxy_conn_rec *conn, request_rec *r,
-                                     int request_id)
+                                     apr_uint16_t request_id)
 {
     const apr_array_header_t *envarr;
     const apr_table_entry_t *elts;
@@ -390,7 +391,7 @@ static apr_status_t send_environment(proxy_conn_rec *conn, request_rec *r,
         itr += vallen;
     }
 
-    fill_in_header(&header, FCGI_PARAMS, request_id, bodylen, 0);
+    fill_in_header(&header, FCGI_PARAMS, request_id, (apr_uint16_t)bodylen, 0);
     fcgi_header_to_array(&header, farray);
 
     vec[0].iov_base = (void *)farray;
@@ -543,7 +544,7 @@ static void dump_header_to_log(request_rec *r, unsigned char fheader[],
 }
 
 static apr_status_t dispatch(proxy_conn_rec *conn, proxy_dir_conf *conf,
-                             request_rec *r, int request_id)
+                             request_rec *r, apr_uint16_t request_id)
 {
     apr_bucket_brigade *ib, *ob;
     int seen_end_of_headers = 0, done = 0;
@@ -884,7 +885,7 @@ static int fcgi_do_request(apr_pool_t *p, request_rec *r,
      * multiple requests to the same FastCGI connection, but
      * we don't support that, and always use a value of '1' to
      * keep things simple. */
-    int request_id = 1;
+    apr_uint16_t request_id = 1;
     apr_status_t rv;
 
     /* Step 1: Send FCGI_BEGIN_REQUEST */