Get rid of some compiler warnings.
* Silence a compiler warning by using the correct format.
* Hex pids are bogus anyway and on environments with APR_PID_T_FMT d this
breaks and print x.
Submitted by: rpluem
Reviewed by: rpluem, covener, trawick
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@614661
13f79535-47bb-0310-9956-
ffa450edef68
http://people.apache.org/~trawick/r529626_to_22x.txt
+1: trawick, rpluem, covener
- * various modules: Silence some compiler warnings
- Trunk version of patch:
- http://svn.apache.org/viewvc?rev=599651&view=rev
- http://svn.apache.org/viewvc?rev=608508&view=rev
- http://svn.apache.org/viewvc?rev=611376&view=rev
- Backport version for 2.2.x of patch:
- Trunk version of patch works
- +1: rpluem, covener, trawick
-
PATCHES PROPOSED TO BACKPORT FROM TRUNK:
[ New proposals should be added at the end of the list ]
int rc = 0, ldap_option = 0;
int version = LDAP_VERSION3;
apr_ldap_err_t *result = NULL;
+#ifdef LDAP_OPT_NETWORK_TIMEOUT
struct timeval timeOut = {10,0}; /* 10 second connection timeout */
+#endif
util_ldap_state_t *st =
(util_ldap_state_t *)ap_get_module_config(r->server->module_config,
&ldap_module);
void *dummy,
const char *ttl)
{
+#ifdef LDAP_OPT_NETWORK_TIMEOUT
util_ldap_state_t *st =
(util_ldap_state_t *)ap_get_module_config(cmd->server->module_config,
&ldap_module);
+#endif
const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY);
if (err != NULL) {
if (!(id = apr_table_get(r->subprocess_env, "UNIQUE_ID"))) {
/* we make the assumption that we can't go through all the PIDs in
under 1 second */
- id = apr_psprintf(r->pool, "%x:%lx:%x", getpid(), time(NULL),
- apr_atomic_inc32(&next_id));
+ id = apr_psprintf(r->pool, "%" APR_PID_T_FMT ":%lx:%x", getpid(),
+ time(NULL), apr_atomic_inc32(&next_id));
}
ap_set_module_config(r->request_config, &log_forensic_module, (char *)id);