Thread View: gnu.gcc.bug
1 messages
1 total messages
Started by roger reynolds
Mon, 28 Sep 1992 21:07
Why does this need a cast?
Author: roger reynolds
Date: Mon, 28 Sep 1992 21:07
Date: Mon, 28 Sep 1992 21:07
26 lines
1294 bytes
1294 bytes
I am just getting it together as far as switching over to
ANSI C, and am having a small problem, which I believe is
a bug in gcc, though maybe I am just doing something wrong:
I am using gcc version 2.2.2
Here is a function definition:
XtEventHandler
dbSelectRecord(Widget w, FormRecPtr f, XButtonEvent *ev, Boolean *flag)
{
...
}
and later on in the same source file, I call XtAddEventHandler as :
XtAddEventHandler (f->selectionText, ButtonPressMask,
FALSE, dbSelectRecord, f);
My confusion is that I get a warning saying that dbSelectRecord
is not the right kind of arg for this function. If I cast it
to (XtEventHandler)dbSelectRecord, then all is fine.
Seems to me like this ain't right.
Any comments would be quite appreciated,
rogerr@netcom.com
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads