@@ -200,7 +200,7 @@ asyncproxy_run(void *args)
200
200
201
201
ap = (struct asyncproxy * )args ;
202
202
if (ap -> debug > 1 ) {
203
- fprintf (stderr , "asyncproxy_run(%p)\n" , ap );
203
+ fprintf (stderr , "asyncproxy_run(%p)\n" , ( void * ) ap );
204
204
fflush (stderr );
205
205
}
206
206
pthread_mutex_lock (& ap -> mutex );
@@ -239,7 +239,7 @@ asyncproxy_run(void *args)
239
239
pthread_mutex_unlock (& ap -> mutex );
240
240
if (state != AP_STATE_RUN ) {
241
241
if (ap -> debug > 2 ) {
242
- fprintf (stderr , "asyncproxy_run(%p): exit on state %d\n" , ap , state );
242
+ fprintf (stderr , "asyncproxy_run(%p): exit on state %d\n" , ( void * ) ap , state );
243
243
fflush (stderr );
244
244
}
245
245
break ;
@@ -250,7 +250,7 @@ asyncproxy_run(void *args)
250
250
fflush (stderr );
251
251
}
252
252
if (ap -> debug > 3 ) {
253
- fprintf (stderr , "asyncproxy_run(%p): poll() = %d\n" , ap , n );
253
+ fprintf (stderr , "asyncproxy_run(%p): poll() = %d\n" , ( void * ) ap , n );
254
254
fflush (stderr );
255
255
}
256
256
if (n <= 0 ) {
@@ -260,14 +260,15 @@ asyncproxy_run(void *args)
260
260
for (i = 0 ; i < 2 ; i ++ ) {
261
261
if (ap -> debug > 0 ) {
262
262
if (ap -> debug > 3 ) {
263
- fprintf (stderr , "asyncproxy_run(%p): pfds[%d] = {.events = %d, .revents = %d}\n" , ap , i , pfds [i ].events , pfds [i ].revents );
263
+ fprintf (stderr , "asyncproxy_run(%p): pfds[%d] = {.events = %d, .revents = %d}\n" ,
264
+ (void * )ap , i , pfds [i ].events , pfds [i ].revents );
264
265
fflush (stderr );
265
266
}
266
267
assert ((pfds [i ].revents & POLLNVAL ) == 0 );
267
268
}
268
269
if (pfds [i ].revents & POLLHUP ) {
269
270
if (ap -> debug > 1 ) {
270
- fprintf (stderr , "asyncproxy_run(%p): fd %d is gone, out\n" , ap , pfds [i ].fd );
271
+ fprintf (stderr , "asyncproxy_run(%p): fd %d is gone, out\n" , ( void * ) ap , pfds [i ].fd );
271
272
fflush (stderr );
272
273
}
273
274
eidx = i ;
@@ -279,13 +280,13 @@ asyncproxy_run(void *args)
279
280
r = asp_sock_recv (asps [i ], BUF_P (& bufs [i ]), BUF_FREE (& bufs [i ]));
280
281
if (ap -> debug > 2 ) {
281
282
assert (pfds [i ].fd == asps [i ]-> fd );
282
- fprintf (stderr , "asyncproxy_run(%p): received %ld bytes from %d\n" , ap , r .len , pfds [i ].fd );
283
+ fprintf (stderr , "asyncproxy_run(%p): received %ld bytes from %d\n" , ( void * ) ap , r .len , pfds [i ].fd );
283
284
fflush (stderr );
284
285
}
285
286
if (r .len <= 0 ) {
286
287
if (ap -> debug > 1 ) {
287
288
fprintf (stderr , "asyncproxy_run(%p): fd %d recv "
288
- "failed with error %d, out\n" , ap , pfds [i ].fd ,
289
+ "failed with error %d, out\n" , ( void * ) ap , pfds [i ].fd ,
289
290
r .errnom );
290
291
fflush (stderr );
291
292
}
@@ -335,7 +336,7 @@ asyncproxy_run(void *args)
335
336
rlen = asp_sock_send (asps [j ], bufs [i ].data , bufs [i ].len );
336
337
if (ap -> debug > 2 ) {
337
338
assert (pfds [j ].fd == asps [j ]-> fd );
338
- fprintf (stderr , "asyncproxy_run(%p): sent %ld bytes to %d\n" , ap , rlen , pfds [j ].fd );
339
+ fprintf (stderr , "asyncproxy_run(%p): sent %ld bytes to %d\n" , ( void * ) ap , rlen , pfds [j ].fd );
339
340
fflush (stderr );
340
341
}
341
342
if (rlen < (ssize_t )bufs [i ].len ) {
@@ -373,7 +374,7 @@ asyncproxy_run(void *args)
373
374
pthread_mutex_unlock (& ap -> mutex );
374
375
375
376
if (ap -> debug > 0 ) {
376
- fprintf (stderr , "cease asyncproxy_run(%p)\n" , ap );
377
+ fprintf (stderr , "cease asyncproxy_run(%p)\n" , ( void * ) ap );
377
378
fflush (stderr );
378
379
}
379
380
@@ -407,7 +408,7 @@ asyncproxy_ctor(const struct asyncproxy_ctor_args *acap)
407
408
return (NULL );
408
409
}
409
410
if (dbg_level > 0 ) {
410
- fprintf (stderr , "%p\n" , ap );
411
+ fprintf (stderr , "%p\n" , ( void * ) ap );
411
412
fflush (stderr );
412
413
}
413
414
memset (ap , '\0' , sizeof (struct asyncproxy ));
@@ -492,7 +493,7 @@ asyncproxy_ctor(const struct asyncproxy_ctor_args *acap)
492
493
goto e3 ;
493
494
}
494
495
495
- #if defined(PYTHON_AWARE )
496
+ #if defined(PYTHON_AWARE ) && PY_VERSION_HEX < 0x03070000
496
497
PyEval_InitThreads ();
497
498
#endif
498
499
@@ -517,7 +518,7 @@ asyncproxy_start(void *_ap)
517
518
518
519
ap = (struct asyncproxy * )_ap ;
519
520
if (ap -> debug > 0 ) {
520
- fprintf (stderr , "asyncproxy_start(%p)\n" , ap );
521
+ fprintf (stderr , "asyncproxy_start(%p)\n" , ( void * ) ap );
521
522
fflush (stderr );
522
523
}
523
524
pthread_mutex_lock (& ap -> mutex );
@@ -545,7 +546,7 @@ asyncproxy_dtor(void *_ap)
545
546
546
547
ap = (struct asyncproxy * )_ap ;
547
548
if (ap -> debug > 0 ) {
548
- fprintf (stderr , "asyncproxy_dtor(%p)\n" , ap );
549
+ fprintf (stderr , "asyncproxy_dtor(%p)\n" , ( void * ) ap );
549
550
fflush (stderr );
550
551
}
551
552
@@ -573,7 +574,7 @@ asyncproxy_isalive(void *_ap)
573
574
pthread_mutex_unlock (& ap -> mutex );
574
575
575
576
if (ap -> debug > 1 && ap -> last_seen_alive != rval ) {
576
- fprintf (stderr , "asyncproxy_isalive(%p) = %d->%d\n" , ap , ap -> last_seen_alive , rval );
577
+ fprintf (stderr , "asyncproxy_isalive(%p) = %d->%d\n" , ( void * ) ap , ap -> last_seen_alive , rval );
577
578
fflush (stderr );
578
579
ap -> last_seen_alive = rval ;
579
580
}
0 commit comments