Return value ignored warning from lint [was: Why use (void) func()]
Jay A. Konigsberg
jak at sactoh0.SAC.CA.US
Sun Sep 30 04:00:49 AEST 1990
In article <12141 at crdgw1.crd.ge.com> volpe at underdog.crd.ge.com (Christopher R Volpe) writes:
> What I do mind is when lint warns me about return values from
>printf being ignored, which I, as well as most people, routinely ignore.
>Our dain-bramaged lint does the annoying thing in both circumstances:
Not necessarly. If I happen to write something like:
fd=open("name", O_WRITE);
fprintf(fd, "some string with or without variables");
or dup() a file descriptor to stdout and use printf() to write to a
file, then I definiatly want to know about ignoring the return
value.
--
-------------------------------------------------------------
Jay @ SAC-UNIX, Sacramento, Ca. UUCP=...pacbell!sactoh0!jak
If something is worth doing, it's worth doing correctly.
More information about the Comp.lang.c
mailing list