From: Chris Darroch Date: Thu, 4 Jan 2007 03:12:48 +0000 (+0000) Subject: Fix several strict compiler warnings for both the threaded X-Git-Tag: 2.3.0~1941 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1ec60b4325ad050c88204439e158b22e80238389;p=thirdparty%2Fapache%2Fhttpd.git Fix several strict compiler warnings for both the threaded and non-threaded versions. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@492394 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/database/mod_dbd.c b/modules/database/mod_dbd.c index 56270f91531..ea5414a5488 100644 --- a/modules/database/mod_dbd.c +++ b/modules/database/mod_dbd.c @@ -128,14 +128,18 @@ static void *merge_dbd_config(apr_pool_t *pool, void *basev, void *addv) return svr; } -#define ISINT(val) \ - for (p = val; *p; ++p) \ - if (!apr_isdigit(*p)) \ - return "Argument must be numeric!" +#define ISINT(val) do { \ + const char *p; \ + \ + for (p = val; *p; ++p) { \ + if (!apr_isdigit(*p)) { \ + return "Argument must be numeric!"; \ + } \ + } \ + } while (0) static const char *dbd_param(cmd_parms *cmd, void *dconf, const char *val) { - const char *p; const apr_dbd_driver_t *driver = NULL; svr_cfg *svr = ap_get_module_config(cmd->server->module_config, &dbd_module); @@ -559,7 +563,7 @@ DBD_DECLARE_NONSTD(ap_dbd_t*) ap_dbd_open(apr_pool_t *pool, server_rec *s) if (!svr->persist) { /* Return a once-only connection */ - dbd_construct((void**) &rec, svr, s->process->pool); + dbd_construct((void*) &rec, svr, s->process->pool); return rec; } @@ -570,7 +574,7 @@ DBD_DECLARE_NONSTD(ap_dbd_t*) ap_dbd_open(apr_pool_t *pool, server_rec *s) } } - rv = apr_reslist_acquire(svr->reslist, (void**) &rec); + rv = apr_reslist_acquire(svr->reslist, (void*) &rec); if (rv != APR_SUCCESS) { ap_log_error(APLOG_MARK, APLOG_ERR, rv, s, "Failed to acquire DBD connection from pool!"); @@ -595,7 +599,7 @@ DBD_DECLARE_NONSTD(ap_dbd_t*) ap_dbd_open(apr_pool_t *pool, server_rec *s) /* We don't have a connection right now, so we'll open one */ if (!rec) { - dbd_construct((void**) &rec, svr, s->process->pool); + dbd_construct((void*) &rec, svr, s->process->pool); svr->rec = rec; if (rec) {