ossp-pkg/pth/pth_event.c 1.62 -> 1.63
--- pth_event.c 2004/07/13 10:50:49 1.62
+++ pth_event.c 2004/07/13 11:00:43 1.63
@@ -196,7 +196,7 @@
/* custom function event */
ev->ev_type = PTH_EVENT_FUNC;
ev->ev_goal = (int)(spec & (PTH_UNTIL_OCCURRED));
- ev->ev_args.FUNC.func = (int (*)(void *))va_arg(ap, void *);
+ ev->ev_args.FUNC.func = va_arg(ap, int (*)(void *));
ev->ev_args.FUNC.arg = va_arg(ap, void *);
ev->ev_args.FUNC.tv = va_arg(ap, pth_time_t);
}
@@ -266,10 +266,10 @@
}
else if (ev->ev_type & PTH_EVENT_FUNC) {
/* custom function event */
- void **func = va_arg(ap, void **);
- void **arg = va_arg(ap, void **);
- pth_time_t *tv = va_arg(ap, pth_time_t *);
- *func = (int (**)(void *))ev->ev_args.FUNC.func;
+ int (**func)(void *) = va_arg(ap, int (**)(void *));
+ void **arg = va_arg(ap, void **);
+ pth_time_t *tv = va_arg(ap, pth_time_t *);
+ *func = ev->ev_args.FUNC.func;
*arg = ev->ev_args.FUNC.arg;
*tv = ev->ev_args.FUNC.tv;
}
|
|