]> granicus.if.org Git - apache/commitdiff
fix Sun Studio type mismatch warnings
authorJeff Trawick <trawick@apache.org>
Thu, 23 Sep 2010 19:21:43 +0000 (19:21 +0000)
committerJeff Trawick <trawick@apache.org>
Thu, 23 Sep 2010 19:21:43 +0000 (19:21 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1000589 13f79535-47bb-0310-9956-ffa450edef68

server/util_regex.c

index 2175d22b8a96528e3e704ccf7a73485f3db61901..73eccec761d439eeaa1dd91515555703d832712d 100644 (file)
 #include "ap_regex.h"
 #include "httpd.h"
 
+static apr_status_t rxplus_cleanup(void *preg)
+{
+    ap_regfree((ap_regex_t *) preg);
+    return APR_SUCCESS;
+}
+
 AP_DECLARE(ap_rxplus_t*) ap_rxplus_compile(apr_pool_t *pool,
                                            const char *pattern)
 {
@@ -61,7 +67,7 @@ AP_DECLARE(ap_rxplus_t*) ap_rxplus_compile(apr_pool_t *pool,
     }
     if (!endp) { /* there's no delim  or flags */
         if (ap_regcomp(&ret->rx, pattern, 0) == 0) {
-            apr_pool_cleanup_register(pool, &ret->rx, (void*) ap_regfree,
+            apr_pool_cleanup_register(pool, &ret->rx, rxplus_cleanup,
                                       apr_pool_cleanup_null);
             return ret;
         }
@@ -100,7 +106,7 @@ AP_DECLARE(ap_rxplus_t*) ap_rxplus_compile(apr_pool_t *pool,
         }
     }
     if (ap_regcomp(&ret->rx, rxstr, ret->flags) == 0) {
-        apr_pool_cleanup_register(pool, &ret->rx, (void*) ap_regfree,
+        apr_pool_cleanup_register(pool, &ret->rx, rxplus_cleanup,
                                   apr_pool_cleanup_null);
     }
     else {