]> granicus.if.org Git - apache/commitdiff
remove C99 features from 'Warning' directive handling
authorFabien Coelho <fabien@apache.org>
Sat, 8 Dec 2012 19:06:50 +0000 (19:06 +0000)
committerFabien Coelho <fabien@apache.org>
Sat, 8 Dec 2012 19:06:50 +0000 (19:06 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1418734 13f79535-47bb-0310-9956-ffa450edef68

server/core.c

index 1f2aa666545be73a950384dcb6f5cd51af380eaa..1d07b47a372d9530f7c1181bbe890f0de1bcfc26 100644 (file)
@@ -1349,6 +1349,12 @@ static const char *generate_message(cmd_parms *cmd, void *dummy,
 {
     /* cast with 64-bit warning avoidance */
     int level = (cmd->info==(void*)APLOG_ERR)? APLOG_ERR: APLOG_WARNING;
+    char * msg;
+
+    /* get position information from wherever we can? */
+    ap_configfile_t * cf = cmd->config_file;
+    ap_directive_t const * ed1 = cmd->directive;
+    ap_directive_t const * ed2 = cmd->err_directive;
 
     /* expect an argument */
     if (!arg || !*arg) {
@@ -1356,7 +1362,7 @@ static const char *generate_message(cmd_parms *cmd, void *dummy,
     }
 
     /* set message, strip off quotes if necessary */
-    char * msg = (char *)arg;
+    msg = (char *)arg;
     if (*arg == '"' || *arg == '\'') {
         apr_size_t len = strlen(arg);
         char last = *(arg + len - 1);
@@ -1366,11 +1372,6 @@ static const char *generate_message(cmd_parms *cmd, void *dummy,
         }
     }
 
-    /* get position information from wherever we can? */
-    ap_configfile_t * cf = cmd->config_file;
-    ap_directive_t const * ed1 = cmd->directive;
-    ap_directive_t const * ed2 = cmd->err_directive;
-
     /* generate error or warning with a configuration file position.
      * the log is displayed on the terminal as no log file is opened yet.
      */