httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jim Jagielski <...@jaguNET.com>
Subject Re: New compile warning this AM
Date Sat, 21 Mar 1998 14:27:16 GMT
Marc Slemko wrote:
> 
> Using int is more bogus than long I think, but you  are right that
> unsigned probably makes less sense than signed.

Yep, but if a signed int, then we can cast to unsigned with no loss
of info, since, even though signed, getpid() will not return
a negative number.

> 
> On Fri, 20 Mar 1998, Dean Gaudet wrote:
> 
> > 
> > 
> > On Fri, 20 Mar 1998, Marc Slemko wrote:
> > 
> > > On Fri, 20 Mar 1998, Rodent of Unusual Size wrote:
> > > 
> > > > We've always treated getpid() as returning an unsigned long, haven't
> > > > we?  In which case the cast is changing nothing for the worse - so
> > > 
> > > No, we always treat it as whatever the heck we feel like at the moment,
> > > often int which could be more bogus.
> > 
> > int is less bogus than unsigned -- consider kill(), POSIX semantics, and
> > negative numbers -- they refer to process groups.  Thus pid_t is most
> > likely a signed quantity on recent systems.
> > 
> > Dean
> > 
> 
> 


-- 
===========================================================================
   Jim Jagielski   |||   jim@jaguNET.com   |||   http://www.jaguNET.com/
            "That's no ordinary rabbit... that's the most foul,
            cruel and bad-tempered rodent you ever laid eyes on"

Mime
View raw message