logo       

Unrecognized macros like "timerisset" "timercmp": msg#00001

programming.splint.general

Subject: Unrecognized macros like "timerisset" "timercmp"


I'm a new guy on splint, does anyone can help me about the error of
"unrecognized ids"!

following is my simple c file "test2.c"

1. #include <stdio.h>
2. #include <stdlib.h>
3. #include <sys/types.h>
4. #include <sys/time.h>
5.
6.
7. typedef struct timeval * p_timer;
8. typedef struct timeval obj_timer;
9. obj_timer now;
10. int
11. _timer_expire(p_timer tp)
12. {
13. if (timerisset(tp) && timercmp((&now), (tp), >)) {
14. timerclear(tp);
15. return 1;
16. }
17. return 0;
18. }

I use the splint cmd like this:

splint +posixlib -skip-posix-headers test2.c

it outputs :

Splint 3.1.1 --- 06 Jan 2006

test2.c: (in function _timer_expire)
test2.c:13:6: Unrecognized identifier: timerisset
Identifier used in code has not been declared. (Use -unrecog
to inhibit
warning)
test2.c:13:24: Unrecognized identifier: timercmp
test2.c:13:48: Parse Error. (For help on parse errors, see
splint -help
parseerrors.)
*** Cannot continue.

It seems splint can not recognize the macro in <sys/time.h> like
"timerisset" & "timercmp"

Help me!!!!
Thanks a lot!!


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise