Hi Stefan,
Am 05.12.2011 10:38, schrieb s...@apache.org:
Author: sf
Date: Mon Dec  5 09:38:44 2011
New Revision: 1210378

URL: http://svn.apache.org/viewvc?rev=1210378&view=rev
Log:
Fix a few compiler warning reported by Steffen:
- some signed/unsigned mismatches
- const for a function does not make sense

Modified:
     httpd/httpd/trunk/server/util_expr_eval.c

Modified: httpd/httpd/trunk/server/util_expr_eval.c
URL: 
http://svn.apache.org/viewvc/httpd/httpd/trunk/server/util_expr_eval.c?rev=1210378&r1=1210377&r2=1210378&view=diff
==============================================================================
--- httpd/httpd/trunk/server/util_expr_eval.c (original)
+++ httpd/httpd/trunk/server/util_expr_eval.c Mon Dec  5 09:38:44 2011
@@ -47,9 +47,10 @@ AP_IMPLEMENT_HOOK_RUN_FIRST(int, expr_lo
  static const char *ap_expr_eval_string_func(ap_expr_eval_ctx_t *ctx,
                                              const ap_expr_t *info,
                                              const ap_expr_t *args);
-static const char *ap_expr_eval_re_backref(ap_expr_eval_ctx_t *ctx, int n);
+static const char *ap_expr_eval_re_backref(ap_expr_eval_ctx_t *ctx,
+                                           unsigned int n);
  static const char *ap_expr_eval_var(ap_expr_eval_ctx_t *ctx,
-                                    const ap_expr_var_func_t *func,
+                                    ap_expr_var_func_t *func,
                                      const void *data);

  /* define AP_EXPR_DEBUG to log the parse tree when parsing an expression */
@@ -132,7 +133,7 @@ static const char *ap_expr_eval_word(ap_
          break;
      }
      case op_RegexBackref: {
-        const int *np = node->node_arg1;
+        const unsigned int *np = node->node_arg1;
          result = ap_expr_eval_re_backref(ctx, *np);
          break;
      }
@@ -147,7 +148,7 @@ static const char *ap_expr_eval_word(ap_
  }

  static const char *ap_expr_eval_var(ap_expr_eval_ctx_t *ctx,
-                                    const ap_expr_var_func_t *func,
+                                    ap_expr_var_func_t *func,
                                      const void *data)
  {
      AP_DEBUG_ASSERT(func != NULL);
@@ -155,7 +156,7 @@ static const char *ap_expr_eval_var(ap_e
      return (*func)(ctx, data);
  }

-static const char *ap_expr_eval_re_backref(ap_expr_eval_ctx_t *ctx, int n)
+static const char *ap_expr_eval_re_backref(ap_expr_eval_ctx_t *ctx, unsigned 
int n)
  {
      int len;

@@ -673,7 +674,7 @@ static void expr_dump_tree(const ap_expr
  static int ap_expr_eval_unary_op(ap_expr_eval_ctx_t *ctx, const ap_expr_t 
*info,
                                   const ap_expr_t *arg)
  {
-    const ap_expr_op_unary_t *op_func = info->node_arg1;
+    ap_expr_op_unary_t *op_func = info->node_arg1;
      const void *data = info->node_arg2;

      AP_DEBUG_ASSERT(info->node_op == op_UnaryOpInfo);
@@ -686,7 +687,7 @@ static int ap_expr_eval_binary_op(ap_exp
                                    const ap_expr_t *info,
                                    const ap_expr_t *args)
  {
-    const ap_expr_op_binary_t *op_func = info->node_arg1;
+    ap_expr_op_binary_t *op_func = info->node_arg1;
      const void *data = info->node_arg2;
      const ap_expr_t *a1 = args->node_arg1;
      const ap_expr_t *a2 = args->node_arg2;
I got reported that since this commit NetWare compilation breaks:

> CC   server/util_expr_eval.c
> ### mwccnlm Compiler:
> #    File: server\util_expr_eval.c
> # --------------------------------
> # 92: result = ap_expr_eval_var(ctx, node->node_arg1, node->node_arg2); > # Error: ^
> #   illegal implicit conversion from 'const void *const ' to
> #   'char * (*)(struct  *, const void *)'
> ### mwccnlm Compiler:
> #     677:      ap_expr_op_unary_t *op_func = info->node_arg1;
> #   Error:                                                   ^
> #   illegal implicit conversion from 'const void *const ' to
> #   'int (*)(struct  *, const void *, const char *)'
> ### mwccnlm Compiler:
> #     690:      ap_expr_op_binary_t *op_func = info->node_arg1;
> #   Error:                                                    ^
> #   illegal implicit conversion from 'const void *const ' to
> #   'int (*)(struct  *, const void *, const char *, const char *)'

sorry, but I only post due to RC1 plans in the hope you can take a look - I had absolutely no time yet to look at (and ATM still dont have) ....

greets, Gün.


Reply via email to