httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brian Havard" <bri...@kheldar.apana.org.au>
Subject [PATCH] fix a few warnings in OS/2 build (was Re: const stuff)
Date Mon, 25 May 1998 09:20:32 GMT
On Sun, 24 May 1998 15:48:41 -0700 (PDT), Dean Gaudet wrote:

[...]

>Personally I think that all code should pass:
>
>    -Wall -O -g     note that -O adds to what gcc can detect, and on
>		    x86 at least, gcc is so poor that you can easily
>		    debug -O code

Using "-Wall -Wshadow -Wmissing-prototypes" I get quite a few warnings in the 
OS/2 build. The patch below fixes most of the OS/2 specific ones but there are 
a few general ones I'd expect to show up on other platforms:

http_log.c: In function `ap_open_piped_log':
http_log.c:656: warning: passing arg 2 of `ap_spawn_child_err' from incompatible pointer type
util_script.c: In function `ap_send_size':
util_script.c:550: warning: int format, long int arg (arg 3)
util_script.c:554: warning: int format, long int arg (arg 3)
mod_autoindex.c: In function `make_autoindex_entry':
mod_autoindex.c:716: warning: int format, long int arg (arg 4)


The "int format, long int arg" warnings are from feeding a size_t to %d but 
for me size_t is an unsigned long. Would an int cast be appropriate?



Index: include/conf.h
===================================================================
RCS file: /cvs/apache-1.3/src/include/conf.h,v
retrieving revision 1.210
diff -u -w -r1.210 conf.h
--- conf.h	1998/05/11 19:59:01	1.210
+++ conf.h	1998/05/25 08:37:42
@@ -677,6 +677,7 @@
 #define MAXSOCKETS 4096
 #define USE_OS2_SCOREBOARD
 #define NO_RELIABLE_PIPED_LOGS
+#define HAVE_SYS_SELECT_H 1
 
 #elif defined(__MACHTEN__)
 typedef int rlim_t;
Index: include/httpd.h
===================================================================
RCS file: /cvs/apache-1.3/src/include/httpd.h,v
retrieving revision 1.214
diff -u -w -r1.214 httpd.h
--- httpd.h	1998/05/22 00:37:29	1.214
+++ httpd.h	1998/05/25 08:37:58
@@ -887,6 +887,9 @@
 API_EXPORT(int) ap_strcmp_match(const char *str, const char *exp);
 API_EXPORT(int) ap_strcasecmp_match(const char *str, const char *exp);
 API_EXPORT(char *) ap_uudecode(pool *, const char *);
+#ifdef __EMX__
+void os2pathname(char *path);
+#endif
 
 API_EXPORT(char *) ap_pregsub(pool *p, const char *input, const char *source,
 			   size_t nmatch, regmatch_t pmatch[]);
Index: main/http_main.c
===================================================================
RCS file: /cvs/apache-1.3/src/main/http_main.c,v
retrieving revision 1.354
diff -u -w -r1.354 http_main.c
--- http_main.c	1998/05/21 04:07:21	1.354
+++ http_main.c	1998/05/25 08:38:30
@@ -189,6 +189,7 @@
 #ifdef USE_OS2_SCOREBOARD
     /* Add MMAP style functionality to OS/2 */
 #define INCL_DOSMEMMGR
+#define INCL_DOSEXCEPTIONS
 #include <os2.h>
 #include <umalloc.h>
 #include <stdio.h>
@@ -1484,8 +1485,6 @@
 static void setup_shared_mem(pool *p)
 {
     caddr_t m;
-
-    char errstr[MAX_STRING_LEN];
     int rc;
 
     m = (caddr_t) create_shared_heap("\\SHAREMEM\\SCOREBOARD", SCOREBOARD_SIZE);

--
 ______________________________________________________________________________
 |  Brian Havard                 |  "He is not the messiah!                   |
 |  brianh@kheldar.apana.org.au  |  He's a very naughty boy!" - Life of Brian |
 ------------------------------------------------------------------------------


Mime
View raw message