Subject: Goofy lint error
To: None <tech-toolchain@netbsd.org>
From: Bill Studenmund <wrstuden@nas.nasa.gov>
List: tech-toolchain
Date: 02/02/2000 12:54:41
I'm seeing a strange lint error which isn't really there, and I don't know
what to do. The .c file compiles fine, but lint always stops with this
file.
The error is:
path/cl_lib.c(1310): cvr_q undefined
path/cl_lib.c(1310): syntax error
That line is:
EnQCVR(cvrp, &CVolReqQ);
EnQCVR is a macro defined (in scope) to be:
#define EnQCVR(cvreqp, headp) ENQUEUE(cvreqp, headp, cvr_q, CVolReq_t)
#define ENQUEUE ENQUEUE_T /* enqueue at tail if not specified */
#define ENQUEUE_T(structp, headp, Qnam, structnam) { \
char *c_sp = (char *)(structp); \
structnam *s_sp = (structnam *)(structp); \
\
(structp)->Qnam.q_next = s_sp->Qnam.q_prev = NULL; \
if ((headp)->q_tail) { \
((structnam *) ((headp)->q_tail))->Qnam.q_next = c_sp; \
s_sp->Qnam.q_prev = (char *) ((headp)->q_tail); \
} \
(headp)->q_tail = c_sp; \
if ((headp)->q_head == NULL) \
(headp)->q_head = c_sp; \
}
so cvr_q is a field name. It's not supposed to be a defined variable. ;-)
cc -E reports fine (if only moderatly readable) C code, and cc -Werror was
happy..
This is on a 1.4 system, but I've tried with a -current lint.
What's up?
Is there some way I can tell lint to ignore the problem line? Adding /*
LINTED */ didn't help. :-(
Take care,
Bill