Path: utzoo!utgpu!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!cornell!rochester!uhura.cc.rochester.edu!ur-valhalla!micropen!dave From: dave@micropen (David F. Carlson) Newsgroups: comp.lang.c Subject: Re: Strange lint mumblings Summary: lint ain't too brite Message-ID: <599@micropen> Date: 27 Dec 88 21:25:35 GMT References: <416@marob.MASA.COM> <11467@dartvax.Dartmouth.EDU> <179@amsdsg.UUCP> <782@auspex.UUCP> Organization: Micropen Dirent Writing Systems, Pittsford, NY Lines: 31 In article <782@auspex.UUCP>, guy@auspex.UUCP (Guy Harris) writes: > >How about: > > > > void main () > ... > > Doesn't help (I tried it), and isn't correct anyway. The dpANS > indicates, as I remember, that "main" is expected (at least in a hosted > environment) to return an "int", and that if "main" returns "exit" is > then called with its return value as an argument. int main() { .... if (blah) exit(-1); ... return( 0 ); } I have solved this "problem" by not using the function exit() to return to the calling environment main() status. Rather, use return at the end of main(). Lint seems to like return from functions. It never has been able to deal with exit() properly, ("statement not reached", etc.) so why try? -- David F. Carlson, Micropen, Inc. micropen!dave@ee.rochester.edu "The faster I go, the behinder I get." --Lewis Carroll