]> granicus.if.org Git - apache/commitdiff
* modules/experimental/util_ldap.c (util_ldap_cache_compare): Fix
authorJoe Orton <jorton@apache.org>
Wed, 12 May 2004 18:44:27 +0000 (18:44 +0000)
committerJoe Orton <jorton@apache.org>
Wed, 12 May 2004 18:44:27 +0000 (18:44 +0000)
uninitialized variable warning from gcc -Wall.
(util_ldap_set_cache_bytes, util_ldap_post_config): Use correct APR
printf format string macros.
(util_ldap_set_cert_type): Make static to fix gcc warning.
(util_ldap_cleanup_module): Fix unused variable warning.

* modules/experimental/mod_auth_ldap.c (derive_codepage_from_lang):
Remove unused variable.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@103664 13f79535-47bb-0310-9956-ffa450edef68

modules/experimental/mod_auth_ldap.c
modules/experimental/util_ldap.c

index cf8e14e75e4995ddf6c22f9689b5d50c9c50abef..b2fed9f694fc8218677c2a144318a8f290d7f036 100644 (file)
@@ -113,7 +113,6 @@ static char *to_charset = NULL;           /* UTF-8 identifier derived from the c
 static char* derive_codepage_from_lang (apr_pool_t *p, char *language)
 {
     int lang_len;
-    int check_short = 0;
     char *charset;
     
     if (!language)          /* our default codepage */
index 147e598bf9fb4e359ac58efd37fb8183377b1c9d..0fc8b533b8f86a6bbba160dc494247a080ec2395 100644 (file)
@@ -617,7 +617,7 @@ LDAP_DECLARE(int) util_ldap_cache_compare(request_rec *r, util_ldap_connection_t
     util_url_node_t curnode;
     util_compare_node_t *compare_nodep;
     util_compare_node_t the_compare_node;
-    apr_time_t curtime;
+    apr_time_t curtime = 0; /* silence gcc -Wall */
     int failures = 0;
 
     util_ldap_state_t *st = 
@@ -961,8 +961,9 @@ static const char *util_ldap_set_cache_bytes(cmd_parms *cmd, void *dummy, const
     st->cache_bytes = atol(bytes);
 
     ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, cmd->server, 
-                      "[%d] ldap cache: Setting shared memory cache size to %d bytes.", 
-                      getpid(), st->cache_bytes);
+                 "[%" APR_PID_T_FMT "] ldap cache: Setting shared memory "
+                 " cache size to %" APR_SIZE_T_FMT " bytes.", 
+                 getpid(), st->cache_bytes);
 
     return NULL;
 }
@@ -1070,7 +1071,7 @@ static const char *util_ldap_set_cert_auth(cmd_parms *cmd, void *dummy, const ch
 }
 
 
-const char *util_ldap_set_cert_type(cmd_parms *cmd, void *dummy, const char *Type)
+static const char *util_ldap_set_cert_type(cmd_parms *cmd, void *dummy, const char *Type)
 {
     util_ldap_state_t *st = 
     (util_ldap_state_t *)ap_get_module_config(cmd->server->module_config, 
@@ -1118,19 +1119,16 @@ void *util_ldap_create_config(apr_pool_t *p, server_rec *s)
 
 static apr_status_t util_ldap_cleanup_module(void *data)
 {
+#if APR_HAS_LDAP_SSL && APR_HAS_NOVELL_LDAPSDK
     server_rec *s = data;
-
     util_ldap_state_t *st = (util_ldap_state_t *)ap_get_module_config(
-                                          s->module_config, &ldap_module);
+        s->module_config, &ldap_module);
+    
+    if (st->ssl_support)
+        ldapssl_client_deinit();
 
-    #if APR_HAS_LDAP_SSL
-        #if APR_HAS_NOVELL_LDAPSDK
-            if (st->ssl_support)
-                ldapssl_client_deinit();
-        #endif
-    #endif
-   
-    return(APR_SUCCESS);
+#endif
+    return APR_SUCCESS;
 }
 
 static int util_ldap_post_config(apr_pool_t *p, apr_pool_t *plog, 
@@ -1160,7 +1158,7 @@ static int util_ldap_post_config(apr_pool_t *p, apr_pool_t *plog,
         s_vhost = s->next;
         while (s_vhost) {
             ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, result, s, 
-                         "LDAP merging Shared Cache conf: shm=0x%x rmm=0x%x for VHOST: %s",
+                         "LDAP merging Shared Cache conf: shm=0x%pp rmm=0x%pp for VHOST: %s",
                          st->cache_shm, st->cache_rmm, s_vhost->server_hostname);
 
             st_vhost = (util_ldap_state_t *)ap_get_module_config(s_vhost->module_config, &ldap_module);