httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Douglass <>
Subject Re: Solaris 2.4 warnings/error
Date Thu, 13 Jun 1996 21:38:43 GMT
On Thu, 13 Jun 1996, Alexei Kosut wrote:

> Well, main's been prototyped as an int, so one might expect it (like any
> other int) function to, well, return an int.
> Changing it to void makes this warning go away. Is that portable to other
> systems, or is there a good reason it's an int currently?

Umm....  I have major reservations about every declaring a main function to
return void.  Think about it this way, the shell (or init) is going to
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.

Michael Douglass
Texas Networking, Inc.

  "To be a saint is to be an exception; to be a true man is the rule.
   Err, fail, sin if you must, but be upright.  To sin as little as
   possible is the law for men; to sin not at all is a dream for angels."

              - Victor Hugo, "Les Miserables"

View raw message