# HG changeset patch # User Maxim Dounin # Date 1722992191 -10800 # Node ID 0ad3dde839478e1cf715117b7544d5cef752d122 # Parent ebebc1d680464f36a8a305443f1207965338bca3 Events: fixed warnings with -Wpedantic in epoll notify. Added casts through uintptr_t to suppress "ISO C forbids assignment between function pointer and 'void *'" warnings as seen with -Wpedantic in ngx_epoll_notify() and ngx_epoll_notify_handler(). Additionally, it resolves "assignment type mismatch" warnings as seen with Sun Studio on Linux, "pointer to function... "=" pointer to void" and "pointer to void "=" pointer to function...". diff -r ebebc1d68046 -r 0ad3dde83947 src/event/modules/ngx_epoll_module.c --- a/src/event/modules/ngx_epoll_module.c Wed Aug 07 03:56:26 2024 +0300 +++ b/src/event/modules/ngx_epoll_module.c Wed Aug 07 03:56:31 2024 +0300 @@ -452,7 +452,7 @@ } } - handler = ev->data; + handler = (ngx_event_handler_pt) (uintptr_t) ev->data; handler(ev); } @@ -766,7 +766,7 @@ { static uint64_t inc = 1; - notify_event.data = handler; + notify_event.data = (void *) (uintptr_t) handler; if ((size_t) write(notify_fd, &inc, sizeof(uint64_t)) != sizeof(uint64_t)) { ngx_log_error(NGX_LOG_ALERT, notify_event.log, ngx_errno,