[Freeswitch-svn] [commit] r11039 - freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su
FreeSWITCH SVN
mikej at freeswitch.org
Wed Dec 31 14:26:31 PST 2008
Author: mikej
Date: Wed Dec 31 17:26:30 2008
New Revision: 11039
Log:
fix silly compiler warning caused by freebsd not making int same size as void* on some 64 bit amd (SFSIP-113)
Modified:
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_kqueue_port.c
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_kqueue_port.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_kqueue_port.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_kqueue_port.c Wed Dec 31 17:26:30 2008
@@ -242,21 +242,21 @@
i = ser->ser_id;
flags = (wait->events & SU_WAIT_IN) ? EV_ADD : EV_ADD | EV_DISABLE;
- EV_SET(ev, wait->fd, EVFILT_READ, flags, 0, 0, (void *)i);
+ EV_SET(ev, wait->fd, EVFILT_READ, flags, 0, 0, (void *)(intptr_t)i);
if (kevent(self->sup_kqueue, ev, 1, NULL, 0, NULL) == -1) {
SU_DEBUG_0(("kevent((%u, %s, %u, %p)) failed: %s\n",
- wait->fd, "EVFILT_READ", flags, (void *)i, strerror(errno)));
+ wait->fd, "EVFILT_READ", flags, (void *)(intptr_t)i, strerror(errno)));
return -1;
}
flags = (wait->events & SU_WAIT_OUT) ? EV_ADD : EV_ADD | EV_DISABLE;
- EV_SET(ev, wait->fd, EVFILT_WRITE, flags, 0, 0, (void *)i);
+ EV_SET(ev, wait->fd, EVFILT_WRITE, flags, 0, 0, (void *)(intptr_t)i);
if (kevent(self->sup_kqueue, ev, 1, NULL, 0, NULL) == -1) {
int error = errno;
SU_DEBUG_0(("kevent((%u, %s, %u, %p)) failed: %s\n",
- wait->fd, "EVFILT_WRITE", flags, (void *)i, strerror(error)));
+ wait->fd, "EVFILT_WRITE", flags, (void *)(intptr_t)i, strerror(error)));
- EV_SET(ev, wait->fd, EVFILT_READ, EV_DELETE, 0, 0, (void *)i);
+ EV_SET(ev, wait->fd, EVFILT_READ, EV_DELETE, 0, 0, (void *)(intptr_t)i);
kevent(self->sup_kqueue, ev, 1, NULL, 0, NULL);
errno = error;
@@ -294,17 +294,17 @@
wait = ser->ser_wait;
- EV_SET(ev, wait->fd, EVFILT_READ, EV_DELETE, 0, 0, (void *)i);
+ EV_SET(ev, wait->fd, EVFILT_READ, EV_DELETE, 0, 0, (void *)(intptr_t)i);
if (kevent(self->sup_kqueue, ev, 1, NULL, 0, NULL) == -1) {
SU_DEBUG_0(("remove kevent((%u, %s, %s, %p)) failed: %s\n",
- wait->fd, "EVFILT_READ", "EV_DELETE", (void *)i,
+ wait->fd, "EVFILT_READ", "EV_DELETE", (void *)(intptr_t)i,
strerror(errno)));
}
- EV_SET(ev, wait->fd, EVFILT_WRITE, EV_DELETE, 0, 0, (void *)i);
+ EV_SET(ev, wait->fd, EVFILT_WRITE, EV_DELETE, 0, 0, (void *)(intptr_t)i);
if (kevent(self->sup_kqueue, ev, 1, NULL, 0, NULL) == -1) {
SU_DEBUG_0(("remove kevent((%u, %s, %s, %p)) failed: %s\n",
- wait->fd, "EVFILT_WRITE", "EV_DELETE", (void *)i,
+ wait->fd, "EVFILT_WRITE", "EV_DELETE", (void *)(intptr_t)i,
strerror(errno)));
}
@@ -461,21 +461,21 @@
wait->events = events;
flags = (wait->events & SU_WAIT_IN) ? EV_ADD | EV_ENABLE : EV_ADD | EV_DISABLE;
- EV_SET(ev, wait->fd, EVFILT_READ, flags, 0, 0, (void *)index);
+ EV_SET(ev, wait->fd, EVFILT_READ, flags, 0, 0, (void *)(intptr_t)index);
if (kevent(self->sup_kqueue, ev, 1, NULL, 0, NULL) == -1) {
SU_DEBUG_0(("modify kevent((%u, %s, %s, %p)) failed: %s\n",
wait->fd, "EVFILT_READ",
(events & SU_WAIT_IN) ? "EV_ENABLE" : "EV_DISABLE",
- (void *)index, strerror(errno)));
+ (void *)(intptr_t)index, strerror(errno)));
}
flags = (wait->events & SU_WAIT_OUT) ? EV_ADD | EV_ENABLE : EV_ADD | EV_DISABLE;
- EV_SET(ev, wait->fd, EVFILT_WRITE, flags, 0, 0, (void *)index);
+ EV_SET(ev, wait->fd, EVFILT_WRITE, flags, 0, 0, (void *)(intptr_t)index);
if (kevent(self->sup_kqueue, ev, 1, NULL, 0, NULL) == -1) {
SU_DEBUG_0(("modify kevent((%u, %s, %s, %p)) failed: %s\n",
wait->fd, "EVFILT_WRITE",
(events & SU_WAIT_OUT) ? "EV_ENABLE" : "EV_DISABLE",
- (void *)index, strerror(errno)));
+ (void *)(intptr_t)index, strerror(errno)));
}
return 0;
@@ -539,7 +539,7 @@
struct su_register *ser;
su_root_magic_t *magic;
- index = (int)ev[j].udata;
+ index = (int)(intptr_t)ev[j].udata;
if (index <= 0 || self->sup_max_index < index)
continue;
ser = self->sup_indices[index];
More information about the Freeswitch-svn
mailing list