httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chuck Murcko <>
Subject Re: Solaris 2.4 warnings/error
Date Sun, 16 Jun 1996 22:14:36 GMT
Brian Behlendorf liltingly intones:
> On Thu, 13 Jun 1996, Michael Douglass wrote:
> > expect a value returned; regardless of what it will do with it.  So how about
> > adding a
> > 
> > return( 0 );
> > 
> > at the end of main.  That will get all compilers to shutup.
> Hmm, there is an "exit (0);" at the end of main()....
Yep. Another great conundrum. Exit() is the value one expects to send back
to the invoking process, but that *may* be modified by the OS, say, if
files don't close, or memory doesn't free up. One of the great Pains in
the Arse is to guarantee that the return() value from int main() gets to
invoking process unaltered. That's different from the exit() code, remember.
The Solaris compiler is just complaining that there's no return value
specified, and the function is declared to return one. As far as it goes,
exit() doesn't count as a function return value, but it does count as a
likely (not guaranteed) program return value..

Sigh. I'm a little wasted, been up about 36 hours. I'll be more coherent

Chuck Murcko	N2K Inc.	Wayne PA
And now, on a lighter note:
By trying, we can easily learn to endure adversity -- another man's, I
		-- Mark Twain

View raw message