Why use (void) func() ? (lint beef)

Rob Lemley rcl at b15.INGR.COM
Thu Oct 4 23:34:52 AEST 1990


In <1014 at gistdev.gist.com> flint at gistdev.gist.com (Flint Pellett) writes:

>Something I think would help lint a lot would be the following two options:

>1. An option to ignore extern declarations made in a .h that aren't used.
>   The same goes for declarations I put in my own .h files.  Now if I have
>   an extern right there in the file that I haven't used, I want to know
>   about that, but if it's in some .h, who cares?

I don't think you can do this on System V Release 3.

>2. An option to not print out all the "function declared but never used"
>   and "function referenced but never declared".  . . . 

You CAN do this on System V Release 3.
>From the UNIX System V Release 3 Programmer's Reference Manual, LINT(1),

          The following options are used to suppress certain kinds of
	  complaints:

          -u   Suppress complaints about functions and external
               variables used and not defined, or defined and not
               used.  (This option is suitable for running lint on a
               subset of files of a larger program).

          -x   Do not report variables referred to by external
               declarations but never used.

--
-Rob Lemley                                                205-730-1546
 System Consultant, Scanning Software, Intergraph Corp., Huntsville, AL

 ...!uunet!ingr!b15!rcl
 b15!rcl at INGR.COM
 204-730-1546



More information about the Comp.lang.c mailing list