lint confused about signal()?

Guido van Rossum guido at cwi.nl
Thu Oct 18 22:05:37 AEST 1990


Why does lint (on IRIX 3.3) complain about the following program?

#include <signal.h>

extern void handler(int);

f()
{
	signal(SIGINT, handler);
}

==============
function argument ( number ) used inconsistently
    signal( arg 1 )   	llib-lc.c(245) :: x.c(7)
    signal( arg 2 )   	llib-lc.c(245) :: x.c(7)

The relevant line in /usr/lib/lint/llib-lc looks like this:

void (*signal(int s, void (*a)(int, ...)))(int, ...) { static void (*b)(); return (b); }

I could imagine that a very picky lint complains that the handler
argument isn't quite the right type; but what on earth is wrong with the
first argument?  Surely SIGINT is 1?

--Guido

--
Guido van Rossum, Centre for Mathematics and Computer Science (CWI), Amsterdam
guido at cwi.nl or ..!hp4nl!cwi.nl!guido or guido%cwi.nl at uunet.uu.net
"A thing of beauty is a joy till sunrise"



More information about the Comp.sys.sgi mailing list