httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dean Gaudet <dgau...@arctic.org>
Subject [PATCH] mod_speling 64-bit issues (was Re: Build of apache_19971016130014)
Date Tue, 21 Oct 1997 04:53:05 GMT
Yeah these (long) casts are how it's worked around elsewhere, but this is
kind of ugly for mod_speling.  Try this patch instead. 

Dean

On Thu, 16 Oct 1997, Martin Kraemer wrote:

> I'm just curious and didn't look at how the other modules deal with
> an int->pointer casting problem.. Does the appended patch remove the
> warnings for mod_speling?
> 
>     Martin
> 
> On Thu, Oct 16, 1997 at 03:58:59PM -0500, Ben Hyde wrote:
> > mod_speling.c: In function `set_speling':
> > mod_speling.c:94: warning: cast to pointer from integer of different size
> > mod_speling.c: In function `check_speling':
> > mod_speling.c:186: warning: cast from pointer to integer of different size


Index: mod_speling.c
===================================================================
RCS file: /export/home/cvs/apachen/src/modules/standard/mod_speling.c,v
retrieving revision 1.6
diff -u -r1.6 mod_speling.c
--- mod_speling.c	1997/10/20 13:28:02	1.6
+++ mod_speling.c	1997/10/21 04:51:33
@@ -91,11 +91,12 @@
 {
     void *server_conf = cmd->server->module_config;
 
-    set_module_config(server_conf, &speling_module, (void *) arg);
+    /* any non-NULL pointer means speling is enabled */
+    set_module_config(server_conf, &speling_module, arg ? (void *)&speling_module
: NULL);
     return NULL;
 }
 
-command_rec speling_cmds[] =
+static command_rec speling_cmds[] =
 {
     {"CheckSpelling", set_speling, NULL, RSRC_CONF, FLAG,
     "whether or not to fix miscapitalized/misspelled requests"},
@@ -183,7 +184,7 @@
     struct DIR_TYPE *dir_entry;
     array_header *candidates = NULL;
 
-    if (!(int) get_module_config(server_conf, &speling_module))
+    if (!get_module_config(server_conf, &speling_module))
         return DECLINED;
 
     /* We only want to worry about GETs */

Mime
  • Unnamed multipart/mixed (inline, None, 0 bytes)
View raw message