Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!dogie.macc.wisc.edu!indri!aplcen!jhunix!c08_d107 From: c08_d107@jhunix.HCF.JHU.EDU (Eric B. Hymowitz) Newsgroups: comp.lang.c Subject: Re: strange behaviour of lint? Message-ID: <1740@jhunix.HCF.JHU.EDU> Date: 6 May 89 20:34:20 GMT References: <1325@rivm05.UUCP> Reply-To: c08_d107@jhunix.UUCP (Eric B. Hymowitz) Organization: The Johns Hopkins University Lines: 34 In article <1325@rivm05.UUCP> ccea3@rivm.UUCP (Adri Verhoef) writes: program deleted... hope you don't mind... in effect, it has a main() with one line: exit(0). > >============== >value type declared inconsistently > exit llib-lc(46) :: c.c(3) >$ sed -n 46p /usr/lib/llib-lc >void exit(s) {} >$ exit > >My question: Is lint wrong, or am I misusing "(void)"? as far as i (and my friends) can tell, lint prefers ''return 0'' to exit(0). that may solve some problems... also, (at the risk of repeating other people), lint must be taken with a teaspoon of salt. :) it also complains if you don't use the values returned from functions like printf. there's nothing wrong with exit(0) as opposed to return 0, if you don't mind lint complaining. --eric disclaimer: my disdain for capital letters is just that. it does not imply a disliking toward any person, object, or other proper noun or adjective beyond the extent that it requires capitalization. disclaimer: my idiocies are mine alone. i speak for no idiots other than myself. any idiot who wishes me to speak for him may inquire of me; if any idiots take my proposal, their names shall be listed with mine.