Subject: Re: ignoring return values from functions.
To: Andrew Brown <atatat@atatdot.net>
From: Ignatios Souvatzis <is@netbsd.org>
List: tech-userlevel
Date: 09/20/2001 20:18:06
On Thu, Sep 20, 2001 at 02:08:51PM -0400, Andrew Brown wrote:
> >>     sleep used( ioctl.c(98) ), but not defined
> >>     wait used( ioctl.c(68) ), but not defined
> >>     tcsetattr used( ioctl.c(138) ), but not defined
> >>     err used( ioctl.c(69) ), but not defined
> >>     tcgetattr used( ioctl.c(85) ), but not defined
> >
> >For these particular errors you'll almost certainly get similar warnings
> >from GCC with:
> >
> >    -Werror -Wall -Wshadow -Wswitch -Wreturn-type -Wpointer-arith -Wconversion -Wimplicit -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes
> >
> >If your code can pass through GCC with the above options enabled then
> >it'll generally pass through 'lint' cleanly too (though not always --
> >lint does catch things GCC doesn't or cannot).
> 
> i just added your warnings en masse to my warnings flags and now i get
> this:
> 
>    % cc -O2 -Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wno-uninitialized -Wreturn-type -Wcast-qual -Wpointer-arith -Wwrite-strings -Wswitch -Wshadow -Werror -Werror -Wall -Wshadow -Wswitch -Wreturn-type -Wpointer-arith -Wconversion -Wimplicit -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -c ioctl.c
>    % cc -O2 -Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wno-uninitialized -Wreturn-type -Wcast-qual -Wpointer-arith -Wwrite-strings -Wswitch -Wshadow -Werror -Werror -Wall -Wshadow -Wswitch -Wreturn-type -Wpointer-arith -Wconversion -Wimplicit -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes  -o ioctl ioctl.o -lutil
>    % 
> 
> so gcc has no problems with that.  lint still doesn't like it.  this

something wrong with your lint libraries?

	-is