GCC warnings fix

Artur Zaprzała <[email protected]>
Newsgroups gmane.comp.web.fastcgi.devel
Message-ID <[email protected]>
When fcgi_config.c is compiled with -Wall switch, gcc will emit warnings 
like:
format '%ld' expects type 'long int', but argument 3 has type 'uid_t'

This patch will fix it.

_______________________________________________
FastCGI-developers mailing list
FastCGI-developers-xGejAJT2w6xVgU18Zptdi0EOCMrvLtNR@public.gmane.org
http://mailman.pins.net/mailman/listinfo.cgi/fastcgi-developers
mod_fastcgi-gcc.patch (text/x-patch, 1.3 KB)
diff -ur mod_fastcgi-2.4.2-orig/fcgi_config.c mod_fastcgi-2.4.2/fcgi_config.c
--- mod_fastcgi-2.4.2-orig/fcgi_config.c	2003-10-30 02:08:34.000000000 +0100
+++ mod_fastcgi-2.4.2/fcgi_config.c	2006-03-27 11:03:30.000000000 +0200
@@ -758,12 +758,12 @@
     {
         if (s->group == NULL)
         {
-            s->group = ap_psprintf(tp, "#%ld", fcgi_util_get_server_gid(cmd->server));
+            s->group = ap_psprintf(tp, "#%ld", (long)fcgi_util_get_server_gid(cmd->server));
         }
 
         if (s->user == NULL)
         {
-            s->user = ap_psprintf(p, "#%ld", fcgi_util_get_server_uid(cmd->server)); 
+            s->user = ap_psprintf(p, "#%ld", (long)fcgi_util_get_server_uid(cmd->server)); 
         }
 
         s->uid = ap_uname2id(s->user);
@@ -949,12 +949,12 @@
     {
         if (s->group == NULL)
         {
-            s->group = ap_psprintf(tp, "#%ld", fcgi_util_get_server_gid(cmd->server));
+            s->group = ap_psprintf(tp, "#%ld", (long)fcgi_util_get_server_gid(cmd->server));
         }
 
         if (s->user == NULL)
         {
-            s->user = ap_psprintf(p, "#%ld", fcgi_util_get_server_uid(cmd->server));
+            s->user = ap_psprintf(p, "#%ld", (long)fcgi_util_get_server_uid(cmd->server));
         }
 
         s->uid = ap_uname2id(s->user);
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.