[comp.sys.sgi] lint confused about signal

guido@cwi.nl (Guido van Rossum) (10/18/90)

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@cwi.nl or ..!hp4nl!cwi.nl!guido or guido%cwi.nl@uunet.uu.net
"A thing of beauty is a joy till sunrise"