Commit c16b2f83 authored by Chris Darroch's avatar Chris Darroch
Browse files

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
parent 0c8126de
Loading
Loading
Loading
Loading
+12 −8
Changes for modules/database/mod_dbd.c: 12 added lines, 8 removed lines.
Original line number Diff line number Diff line
@@ -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) {