Commit 8b0003ca authored by William A. Rowe Jr's avatar William A. Rowe Jr
Browse files

Clean up some miscellaneous warnings from Fortify or Intel's compiler

Backports;

 r991516, mod_rewrite.c::cmd_rewritecond(): use enum value instead of 
          integer literal
 r991515, util.c::ap_pregsub(): don't needlessly set var
 r991507, scoreboard.c::ap_create_scoreboard(): don't needlessly set var
 r987629+r987631, config.c::ap_build_cont_config(): don't needlessly
                  check var for NULL
 r986901+r987860, core.c::dirsection(): remove dead error check
 r983066, mod_cern_meta.c: remove unexpected ";" after end of block
 r987339, main.c::usage(): don't overlay stack buffer with impossibly
          long argv[0]
 r982050, mpm_unix.c (backported to mpm_common.c): remove unused vars

Author: trawick
Reviewed by: sf, wrowe


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@1005523 13f79535-47bb-0310-9956-ffa450edef68
parent 95640189
Loading
Loading
Loading
Loading
+0 −16
Changes for STATUS: 0 added lines, 16 removed lines.
Original line number Diff line number Diff line
@@ -113,22 +113,6 @@ PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
     2.2 patch: trunk patch works
     +1: trawick, sf, wrowe

   * clean up some miscellaneous warnings from Fortify or Intel's compiler
     Trunk revisions:
       r991516, mod_rewrite.c::cmd_rewritecond(): use enum value instead of 
         integer literal
       r991515, util.c::ap_pregsub(): don't needlessly set var
       r991507, scoreboard.c::ap_create_scoreboard(): don't needlessly set var
       r987629+r987631, config.c::ap_build_cont_config(): don't needlessly
         check var for NULL
       r986901+r987860, core.c::dirsection(): remove dead error check
       r983066, mod_cern_meta.c: remove unexpected ";" after end of block
       r987339, main.c::usage(): don't overlay stack buffer with impossibly
         long argv[0]
       r982050, mpm_unix.c (backported to mpm_common.c): remove unused vars
     2.2.x patch: http://people.apache.org/~trawick/fewerwarnings-2.txt
     +1: trawick, sf, wrowe


PATCHES PROPOSED TO BACKPORT FROM TRUNK:
  [ New proposals should be added at the end of the list ]
+1 −1
Changes for modules/mappers/mod_rewrite.c: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -3180,7 +3180,7 @@ static const char *cmd_rewritecond(cmd_parms *cmd, void *in_dconf,
    }

    /* determine the pattern type */
    newcond->ptype = 0;
    newcond->ptype = CONDPAT_REGEX;
    if (*a2 && a2[1]) {
        if (!a2[2] && *a2 == '-') {
            switch (a2[1]) {
+5 −5
Changes for modules/metadata/mod_cern_meta.c: 5 added lines, 5 removed lines.
Original line number Diff line number Diff line
@@ -281,18 +281,18 @@ static int add_cern_meta_data(request_rec *r)

    if (!dconf->metafiles) {
        return DECLINED;
    };
    }

    /* if ./.web/$1.meta exists then output 'asis' */

    if (r->finfo.filetype == 0) {
        return DECLINED;
    };
    }

    /* is this a directory? */
    if (r->finfo.filetype == APR_DIR || r->uri[strlen(r->uri) - 1] == '/') {
        return DECLINED;
    };
    }

    /* what directory is this file in? */
    scrap_book = apr_pstrdup(r->pool, r->filename);
@@ -311,7 +311,7 @@ static int add_cern_meta_data(request_rec *r)
            "internal error in mod_cern_meta: %s", r->filename);
        /* should really barf, but hey, let's be friends... */
        return DECLINED;
    };
    }

    metafilename = apr_pstrcat(r->pool, scrap_book, "/",
               dconf->metadir ? dconf->metadir : DEFAULT_METADIR,
@@ -345,7 +345,7 @@ static int add_cern_meta_data(request_rec *r)
        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
            "meta file permissions deny server access: %s", metafilename);
        return HTTP_FORBIDDEN;
    };
    }

    /* read the headers in */
    rv = scan_meta_file(r, f);
+2 −2
Changes for server/config.c: 2 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -1112,11 +1112,11 @@ AP_DECLARE(const char *) ap_build_cont_config(apr_pool_t *p,
        if (retval != NULL)
            return retval;

        if (sub_tree == NULL && curr_parent != NULL) {
        if (sub_tree == NULL) {
            sub_tree = *curr_parent;
        }

        if (sub_tree == NULL && current != NULL) {
        if (sub_tree == NULL) {
            sub_tree = *current;
        }
    }
+0 −7
Changes for server/core.c: 0 added lines, 7 removed lines.
Original line number Diff line number Diff line
@@ -1840,13 +1840,6 @@ static const char *dirsection(cmd_parms *cmd, void *mconfig, const char *arg)
        return missing_container_arg(cmd);
    }

    if (!arg) {
        if (thiscmd->cmd_data)
            return "<DirectoryMatch > block must specify a path";
        else
            return "<Directory > block must specify a path";
    }

    cmd->path = ap_getword_conf(cmd->pool, &arg);
    cmd->override = OR_ALL|ACCESS_CONF;

Loading