mirror of
https://github.com/cuberite/libevent.git
synced 2025-09-12 22:10:12 -04:00
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:
parent
9af9aba62f
commit
267472dcd3
11
test/bench.c
11
test/bench.c
@ -63,12 +63,16 @@ static int *pipes;
|
|||||||
static int num_pipes, num_active, num_writes;
|
static int num_pipes, num_active, num_writes;
|
||||||
static struct event *events;
|
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
|
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;
|
EV_INTPTR_T idx = (ev_uint64_t) arg, widx = idx + 1;
|
||||||
u_char ch;
|
u_char ch;
|
||||||
|
|
||||||
count += read(fd, &ch, sizeof(ch));
|
count += read(fd, &ch, sizeof(ch));
|
||||||
@ -84,7 +88,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;
|
||||||
|
EV_INTPTR_T 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) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user