Newsgroups: comp.lang.c Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!think.com!snorkelwacker.mit.edu!thunder.mcrcim.mcgill.edu!mouse From: mouse@thunder.mcrcim.mcgill.edu (der Mouse) Subject: Re: Funny mistake Message-ID: <1991Mar23.105434.13986@thunder.mcrcim.mcgill.edu> Organization: McGill Research Centre for Intelligent Machines References: <15481@smoke.brl.mil> <13584@helios.TAMU.EDU> Date: Sat, 23 Mar 91 10:54:34 GMT Lines: 33 In article <13584@helios.TAMU.EDU>, byron@archone.tamu.edu (Byron Rakitzis) writes: > Flame on: Whooossshhhhh.... > I have had uniformly bad experience with lint. [...] [M]any of its > warnings are not pertinent to the code. For example, the "pointer > alignment" problem with every call to malloc, and the "returns a > value which is ignored" problem with every call to printf. As someone else pointed out, printf can fail. Nonetheless, I agree with you - the level of robustness that calls for error-checking every call to printf is seldom called for. What I did was to write a wrapper for lint that chucks complaints based on egrep patterns (kept in ~/.lintx). My list of patterns, for example: ^ioctl, arg. 3 used inconsistently ^malloc, arg. 1 used inconsistently returns value which is always ignored$ returns value which is sometimes ignored$ ^argvec used(.*), but not defined$ #include of /usr/include/... may be non-portable$ the last one being due to an idiocy in Sun's cpp, and the next-to-last because nobody (yet :-) seems to agree with me about argvec/argcnt. > Flame off. ...ssshhhhh *snik* der Mouse old: mcgill-vision!mouse new: mouse@larry.mcrcim.mcgill.edu