mirror of
https://github.com/libevent/libevent.git
synced 2025-01-09 00:56:20 +08:00
r15226@tombo: nickm | 2008-04-17 15:25:25 -0400
Fix a couple of gcc warnings on 64-bit platforms svn:r719
This commit is contained in:
parent
8863ff7625
commit
3eb21c0d33
@ -67,7 +67,7 @@ static struct event *events;
|
|||||||
static void
|
static void
|
||||||
read_cb(int fd, short which, void *arg)
|
read_cb(int fd, short which, void *arg)
|
||||||
{
|
{
|
||||||
int idx = (int) arg, widx = idx + 1;
|
long idx = (long) arg, widx = idx + 1;
|
||||||
u_char ch;
|
u_char ch;
|
||||||
|
|
||||||
count += read(fd, &ch, sizeof(ch));
|
count += read(fd, &ch, sizeof(ch));
|
||||||
@ -83,7 +83,8 @@ read_cb(int fd, short which, void *arg)
|
|||||||
static struct timeval *
|
static struct timeval *
|
||||||
run_once(void)
|
run_once(void)
|
||||||
{
|
{
|
||||||
int *cp, i, space;
|
int *cp, space;
|
||||||
|
long i;
|
||||||
static struct timeval ts, te;
|
static struct timeval ts, te;
|
||||||
|
|
||||||
for (cp = pipes, i = 0; i < num_pipes; i++, cp += 2) {
|
for (cp = pipes, i = 0; i < num_pipes; i++, cp += 2) {
|
||||||
|
@ -65,7 +65,7 @@ static void
|
|||||||
read_cb(int fd, short which, void *arg)
|
read_cb(int fd, short which, void *arg)
|
||||||
{
|
{
|
||||||
char ch;
|
char ch;
|
||||||
int idx = (int) arg;
|
long idx = (long) arg;
|
||||||
|
|
||||||
read(fd, &ch, sizeof(ch));
|
read(fd, &ch, sizeof(ch));
|
||||||
if (idx >= 0)
|
if (idx >= 0)
|
||||||
@ -95,7 +95,7 @@ run_once(int num_pipes)
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (cp = pipes, i = 0; i < num_pipes; i++, cp += 2) {
|
for (cp = pipes, i = 0; i < num_pipes; i++, cp += 2) {
|
||||||
int fd = i < num_pipes - 1 ? cp[3] : -1;
|
long fd = i < num_pipes - 1 ? cp[3] : -1;
|
||||||
event_set(&events[i], cp[0], EV_READ, read_cb, (void *) fd);
|
event_set(&events[i], cp[0], EV_READ, read_cb, (void *) fd);
|
||||||
event_add(&events[i], NULL);
|
event_add(&events[i], NULL);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user