declaring routines which return function pointers
Robert Lake
lake at alberta.UUCP
Wed Dec 12 04:06:53 AEST 1984
I have a routine which resembles the following:
int (*f)();
int fa(), fb();
fa() {
f = fb;
return(f);
}
fb() {
}
The problem with the above is that lint complains about an illegal combin-
ation of a pointer with an integer in the 'return' statement. I have tried
various casts and function declarations to try to satisfy lint, but none of
them have worked. Does anybody know what I should do to keep lint happy?
Robert Lake (alberta!lake)
University of Alberta
More information about the Comp.lang.c
mailing list