strange behaviour of lint?
Eric B. Hymowitz
c08_d107 at jhunix.HCF.JHU.EDU
Sun May 7 06:34:20 AEST 1989
In article <1325 at rivm05.UUCP> ccea3 at 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.
More information about the Comp.lang.c
mailing list