Updates to quiet some compiler warnings.

This commit is contained in:
brectanus 2007-03-01 11:49:56 +00:00
parent 79d232ccff
commit f4fb4ed4f6
6 changed files with 11 additions and 9 deletions

View File

@ -1,11 +1,13 @@
01 Mar 2007 - 2.2.0
?? ??? 2007 - ?????
-------------------
* Fixed the date on the 2.1.0 release from 2006 to 2007 below.
* Fixed some casting issues for compiling on NetWare (patch from Guenter_Knauf).
* Updates to quiet some compiler warnings.
23 Feb 2007 - 2.1.0
-------------------

View File

@ -291,7 +291,7 @@ static int multipart_process_part_header(modsec_rec *msr, char **error_msg) {
*/
static int multipart_process_part_data(modsec_rec *msr, char **error_msg) {
char *p = msr->mpd->buf + (MULTIPART_BUF_SIZE - msr->mpd->bufleft) - 2;
char localreserve[2];
char localreserve[2] = { '\0', '\0' }; /* initialized to quiet warning */
int bytes_reserved = 0;
if (error_msg == NULL) return -1;

View File

@ -666,11 +666,11 @@ int urldecode_nonstrict_inplace_ex(unsigned char *input, long int input_len, int
*d++ = c2;
count += 3;
i += 3;
*invalid_count++;
(*invalid_count)++; /* parens quiet compiler warning */
}
} else {
/* Not enough bytes available, copy the raw bytes. */
*invalid_count++;
(*invalid_count)++; /* parens quiet compiler warning */
*d++ = '%';
count++;

View File

@ -646,7 +646,7 @@ static apr_status_t msre_action_ctl_execute(modsec_rec *msr, apr_pool_t *mptmp,
if (*s != c) {
*d++ = *s++;
} else {
*s++;
(*s)++; /* parens quiet compiler warning */
}
}
*d = '\0';

View File

@ -261,7 +261,7 @@ static int msre_op_validateDTD_execute(modsec_rec *msr, msre_rule *rule, msre_va
return -1;
}
dtd = xmlParseDTD(NULL, rule->op_param); /* EHN support relative filenames */
dtd = xmlParseDTD(NULL, (const xmlChar *)rule->op_param); /* EHN support relative filenames */
if (dtd == NULL) {
*error_msg = apr_psprintf(msr->mp, "XML: Failed to load DTD: %s", rule->op_param);
return -1;

View File

@ -370,7 +370,7 @@ static int var_xml_generate(modsec_rec *msr, msre_var *var, msre_rule *rule,
/* Process the XPath expression. */
count = 0;
xpathExpr = var->param;
xpathExpr = (const xmlChar*)var->param;
xpathCtx = xmlXPathNewContext(msr->xml->doc);
if (xpathCtx == NULL) {
@ -392,7 +392,7 @@ static int var_xml_generate(modsec_rec *msr, msre_var *var, msre_rule *rule,
if (parse_name_eq_value(mptmp, action->param, &prefix, &href) < 0) return -1;
if ((prefix == NULL)||(href == NULL)) return -1;
if(xmlXPathRegisterNs(xpathCtx, prefix, href) != 0) {
if(xmlXPathRegisterNs(xpathCtx, (const xmlChar*)prefix, (const xmlChar*)href) != 0) {
msr_log(msr, 1, "Failed to register XML namespace href \"%s\" prefix \"%s\".",
log_escape(mptmp, prefix), log_escape(mptmp, href));
return -1;
@ -424,7 +424,7 @@ static int var_xml_generate(modsec_rec *msr, msre_var *var, msre_rule *rule,
msre_var *rvar = NULL;
char *content = NULL;
content = xmlNodeGetContent(nodes->nodeTab[i]);
content = (char *)xmlNodeGetContent(nodes->nodeTab[i]);
if (content != NULL) {
rvar = apr_pmemdup(mptmp, var, sizeof(msre_var));
rvar->value = apr_pstrdup(mptmp, content);