You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Tom Tromey <tr...@creche.cygnus.com> on 1996/09/25 00:11:01 UTC

Irix 6.2 warning

The Irix 6.2 compiler generates warnings in util.c because it wants
non-void functions to return values (and it isn't smart enough to
recognize that the functions in question are ok).

Appended is a patch which clears up the warnings.

Tom
-- 
tromey@cygnus.com                 Member, League for Programming Freedom

Index: util.c
===================================================================
RCS file: /rel/cvsfiles/devo/apache/src/util.c,v
retrieving revision 1.6
diff -c -5 -r1.6 util.c
*** util.c	1996/09/19 20:26:30	1.6
--- util.c	1996/09/24 20:51:31
***************
*** 936,946 ****
  
      if(!(ent = getpwnam(name))) {
          fprintf(stderr,"httpd: bad user name %s\n",name);
          exit(1);
      }
!     else return(ent->pw_uid);
  }
  
  gid_t gname2id(char *name) {
      struct group *ent;
  
--- 936,946 ----
  
      if(!(ent = getpwnam(name))) {
          fprintf(stderr,"httpd: bad user name %s\n",name);
          exit(1);
      }
!     return(ent->pw_uid);
  }
  
  gid_t gname2id(char *name) {
      struct group *ent;
  
***************
*** 949,959 ****
  
      if(!(ent = getgrnam(name))) {
          fprintf(stderr,"httpd: bad group name %s\n",name);
          exit(1);
      }
!     else return(ent->gr_gid);
  }
  
  #if 0
  int get_portnum(int sd) {
      struct sockaddr addr;
--- 949,959 ----
  
      if(!(ent = getgrnam(name))) {
          fprintf(stderr,"httpd: bad group name %s\n",name);
          exit(1);
      }
!     return(ent->gr_gid);
  }
  
  #if 0
  int get_portnum(int sd) {
      struct sockaddr addr;

Re: Irix 6.2 warning

Posted by Brian Behlendorf <br...@organic.com>.
Okay, this is committed.  I found a third place this happened too.

	Brian

On 24 Sep 1996, Tom Tromey wrote:
> The Irix 6.2 compiler generates warnings in util.c because it wants
> non-void functions to return values (and it isn't smart enough to
> recognize that the functions in question are ok).
> 
> Appended is a patch which clears up the warnings.
> 
> Tom
> -- 
> tromey@cygnus.com                 Member, League for Programming Freedom
> 
> Index: util.c
> ===================================================================
> RCS file: /rel/cvsfiles/devo/apache/src/util.c,v
> retrieving revision 1.6
> diff -c -5 -r1.6 util.c
> *** util.c	1996/09/19 20:26:30	1.6
> --- util.c	1996/09/24 20:51:31
> ***************
> *** 936,946 ****
>   
>       if(!(ent = getpwnam(name))) {
>           fprintf(stderr,"httpd: bad user name %s\n",name);
>           exit(1);
>       }
> !     else return(ent->pw_uid);
>   }
>   
>   gid_t gname2id(char *name) {
>       struct group *ent;
>   
> --- 936,946 ----
>   
>       if(!(ent = getpwnam(name))) {
>           fprintf(stderr,"httpd: bad user name %s\n",name);
>           exit(1);
>       }
> !     return(ent->pw_uid);
>   }
>   
>   gid_t gname2id(char *name) {
>       struct group *ent;
>   
> ***************
> *** 949,959 ****
>   
>       if(!(ent = getgrnam(name))) {
>           fprintf(stderr,"httpd: bad group name %s\n",name);
>           exit(1);
>       }
> !     else return(ent->gr_gid);
>   }
>   
>   #if 0
>   int get_portnum(int sd) {
>       struct sockaddr addr;
> --- 949,959 ----
>   
>       if(!(ent = getgrnam(name))) {
>           fprintf(stderr,"httpd: bad group name %s\n",name);
>           exit(1);
>       }
> !     return(ent->gr_gid);
>   }
>   
>   #if 0
>   int get_portnum(int sd) {
>       struct sockaddr addr;
> 
> 

--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--
brian@organic.com  www.apache.org  hyperreal.com  http://www.organic.com/JOBS