strange behaviour of lint?
Adri Verhoef
ccea3 at rivm.UUCP
Fri May 5 21:54:11 AEST 1989
$ cat c.c
main()
{
(void) exit(0);
/* Make lint happy, preventing following message:
* "warning: main() returns random value to invocation environment"
*/
return 0;
}
$ lint c.c
==============
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)"?
PS. lint complains about any void function, not just exit().
--
19:89 - TIME TO WAKE UP!
More information about the Comp.lang.c
mailing list