From: Nikita Popov Date: Wed, 15 Apr 2020 08:37:33 +0000 (+0200) Subject: Suppress SIG_ERR cast warnings X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fb718ccc7ef6b3c0a509469190c4ff2cc0a17c61;p=php Suppress SIG_ERR cast warnings By casting to void*. I don't want to deal with this right now. --- diff --git a/ext/pcntl/pcntl.c b/ext/pcntl/pcntl.c index c7aa6bcbc3..a4554a61cd 100644 --- a/ext/pcntl/pcntl.c +++ b/ext/pcntl/pcntl.c @@ -979,7 +979,7 @@ PHP_FUNCTION(pcntl_signal) php_error_docref(NULL, E_WARNING, "Invalid value for handle argument specified"); RETURN_FALSE; } - if (php_signal(signo, (Sigfunc *) Z_LVAL_P(handle), (int) restart_syscalls) == (Sigfunc *)SIG_ERR) { + if (php_signal(signo, (Sigfunc *) Z_LVAL_P(handle), (int) restart_syscalls) == (void *)SIG_ERR) { PCNTL_G(last_error) = errno; php_error_docref(NULL, E_WARNING, "Error assigning signal"); RETURN_FALSE; @@ -1002,7 +1002,7 @@ PHP_FUNCTION(pcntl_signal) handle = zend_hash_index_update(&PCNTL_G(php_signal_table), signo, handle); Z_TRY_ADDREF_P(handle); - if (php_signal4(signo, pcntl_signal_handler, (int) restart_syscalls, 1) == (Sigfunc *)SIG_ERR) { + if (php_signal4(signo, pcntl_signal_handler, (int) restart_syscalls, 1) == (void *)SIG_ERR) { PCNTL_G(last_error) = errno; php_error_docref(NULL, E_WARNING, "Error assigning signal"); RETURN_FALSE; diff --git a/ext/pcntl/php_signal.c b/ext/pcntl/php_signal.c index 44d92dabd0..95b4a16d6d 100644 --- a/ext/pcntl/php_signal.c +++ b/ext/pcntl/php_signal.c @@ -49,7 +49,7 @@ Sigfunc *php_signal4(int signo, Sigfunc *func, int restart, int mask_all) #endif } if (zend_sigaction(signo, &act, &oact) < 0) { - return (Sigfunc*)SIG_ERR; + return (void*)SIG_ERR; } #ifdef HAVE_STRUCT_SIGINFO_T