Skip to content

Commit fb718cc

Browse files
committed
Suppress SIG_ERR cast warnings
By casting to void*. I don't want to deal with this right now.
1 parent 2d517f6 commit fb718cc

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

ext/pcntl/pcntl.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -979,7 +979,7 @@ PHP_FUNCTION(pcntl_signal)
979979
php_error_docref(NULL, E_WARNING, "Invalid value for handle argument specified");
980980
RETURN_FALSE;
981981
}
982-
if (php_signal(signo, (Sigfunc *) Z_LVAL_P(handle), (int) restart_syscalls) == (Sigfunc *)SIG_ERR) {
982+
if (php_signal(signo, (Sigfunc *) Z_LVAL_P(handle), (int) restart_syscalls) == (void *)SIG_ERR) {
983983
PCNTL_G(last_error) = errno;
984984
php_error_docref(NULL, E_WARNING, "Error assigning signal");
985985
RETURN_FALSE;
@@ -1002,7 +1002,7 @@ PHP_FUNCTION(pcntl_signal)
10021002
handle = zend_hash_index_update(&PCNTL_G(php_signal_table), signo, handle);
10031003
Z_TRY_ADDREF_P(handle);
10041004

1005-
if (php_signal4(signo, pcntl_signal_handler, (int) restart_syscalls, 1) == (Sigfunc *)SIG_ERR) {
1005+
if (php_signal4(signo, pcntl_signal_handler, (int) restart_syscalls, 1) == (void *)SIG_ERR) {
10061006
PCNTL_G(last_error) = errno;
10071007
php_error_docref(NULL, E_WARNING, "Error assigning signal");
10081008
RETURN_FALSE;

ext/pcntl/php_signal.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ Sigfunc *php_signal4(int signo, Sigfunc *func, int restart, int mask_all)
4949
#endif
5050
}
5151
if (zend_sigaction(signo, &act, &oact) < 0) {
52-
return (Sigfunc*)SIG_ERR;
52+
return (void*)SIG_ERR;
5353
}
5454

5555
#ifdef HAVE_STRUCT_SIGINFO_T

0 commit comments

Comments
 (0)