Path: utzoo!attcan!utgpu!news-server.csri.toronto.edu!mailrus!uwm.edu!zaphod.mps.ohio-state.edu!mips!pacbell.com!pacbell!sactoh0!jak From: jak@sactoh0.SAC.CA.US (Jay A. Konigsberg) Newsgroups: comp.lang.c Subject: Return value ignored warning from lint [was: Why use (void) func()] Message-ID: <4068@sactoh0.SAC.CA.US> Date: 29 Sep 90 18:00:49 GMT References: <586@dptechno.UUCP> <1990Sep24.193012.14074@diku.dk> <12141@crdgw1.crd.ge.com> Organization: Sacramento Public Access Unix, Sacramento, Ca. Lines: 19 In article <12141@crdgw1.crd.ge.com> volpe@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.