From 310a0975a59bb0fd8dda049820ad4c46d067fec7 Mon Sep 17 00:00:00 2001 From: Fabien Coelho Date: Sat, 8 Dec 2012 19:06:50 +0000 Subject: [PATCH] remove C99 features from 'Warning' directive handling git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1418734 13f79535-47bb-0310-9956-ffa450edef68 --- server/core.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/server/core.c b/server/core.c index 1f2aa66654..1d07b47a37 100644 --- a/server/core.c +++ b/server/core.c @@ -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. */ -- 2.40.0