Do a quick-and-dirty hack to fix a gcc warning on 1.4 with a 64-bit arch

svn:r1368
This commit is contained in:
Nick Mathewson 2009-07-21 17:57:31 +00:00
parent 9af9aba62f
commit 267472dcd3

View File

@ -63,12 +63,16 @@ static int *pipes;
static int num_pipes, num_active, num_writes;
static struct event *events;
#if SIZEOF_VOID_P == 4
#define EV_INTPTR_T ev_int32_t
#elif SIZEOF_VOID_P == 8
#define EV_INTPTR_T ev_int64_t
#endif
static void
read_cb(int fd, short which, void *arg)
{
int idx = (int) arg, widx = idx + 1;
EV_INTPTR_T idx = (ev_uint64_t) arg, widx = idx + 1;
u_char ch;
count += read(fd, &ch, sizeof(ch));
@ -84,7 +88,8 @@ read_cb(int fd, short which, void *arg)
static struct timeval *
run_once(void)
{
int *cp, i, space;
int *cp, space;
EV_INTPTR_T i;
static struct timeval ts, te;
for (cp = pipes, i = 0; i < num_pipes; i++, cp += 2) {