From 94c5270ab5eeb35247997b1c0c7e0df2d7270e06 Mon Sep 17 00:00:00 2001 From: Stefan Fritsch Date: Sun, 7 Nov 2010 13:00:00 +0000 Subject: [PATCH] More fixes for picky compilers git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1032268 13f79535-47bb-0310-9956-ffa450edef68 --- server/util_expr_eval.c | 4 ++-- server/util_expr_scan.c | 6 ++---- server/util_expr_scan.l | 6 ++---- 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/server/util_expr_eval.c b/server/util_expr_eval.c index df19df399e..968e1a07e8 100644 --- a/server/util_expr_eval.c +++ b/server/util_expr_eval.c @@ -83,7 +83,7 @@ static const char *ap_expr_eval_var(ap_expr_eval_ctx *ctx, static const char *ap_expr_eval_string_func(ap_expr_eval_ctx *ctx, const ap_expr *info, const ap_expr *arg) { - ap_expr_string_func_t *func = info->node_arg1; + ap_expr_string_func_t *func = (ap_expr_string_func_t *)info->node_arg1; const void *data = info->node_arg2; AP_DEBUG_ASSERT(info->node_op == op_StringFuncInfo); @@ -186,7 +186,7 @@ static int ap_expr_eval_comp(ap_expr_eval_ctx *ctx, const ap_expr *node) else if (e2->node_op == op_ListFuncCall) { const ap_expr *info = e2->node_arg1; const ap_expr *arg = e2->node_arg2; - ap_expr_list_func_t *func = info->node_arg1; + ap_expr_list_func_t *func = (ap_expr_list_func_t *)info->node_arg1; apr_array_header_t *haystack; int i = 0; AP_DEBUG_ASSERT(func != NULL); diff --git a/server/util_expr_scan.c b/server/util_expr_scan.c index 86e7a39eee..5eea9522ef 100644 --- a/server/util_expr_scan.c +++ b/server/util_expr_scan.c @@ -1138,9 +1138,8 @@ case 21: YY_RULE_SETUP #line 198 "util_expr_scan.l" { - char c[2] = { yytext[0], '\0' }; char *msg = apr_psprintf(yyextra->pool, - "Invalid character in variable name '%s'", c); + "Invalid character in variable name '%c'", yytext[0]); PERROR(msg); } YY_BREAK @@ -1443,8 +1442,7 @@ case 64: YY_RULE_SETUP #line 336 "util_expr_scan.l" { - char c[2] = { yytext[0], '\0' }; - char *msg = apr_psprintf(yyextra->pool, "Parse error near '%s'", c); + char *msg = apr_psprintf(yyextra->pool, "Parse error near '%c'", yytext[0]); PERROR(msg); } YY_BREAK diff --git a/server/util_expr_scan.l b/server/util_expr_scan.l index d2840a00b4..1ee8f8b1f2 100644 --- a/server/util_expr_scan.l +++ b/server/util_expr_scan.l @@ -196,9 +196,8 @@ } .|\n { - char c[2] = { yytext[0], '\0' }; char *msg = apr_psprintf(yyextra->pool, - "Invalid character in variable name '%s'", c); + "Invalid character in variable name '%c'", yytext[0]); PERROR(msg); } @@ -334,8 +333,7 @@ * Anything else is an error */ .|\n { - char c[2] = { yytext[0], '\0' }; - char *msg = apr_psprintf(yyextra->pool, "Parse error near '%s'", c); + char *msg = apr_psprintf(yyextra->pool, "Parse error near '%c'", yytext[0]); PERROR(msg); } -- 2.40.0