Skip to content

Commit 4c8dabf

Browse files
authored
Fix -Werror compile error in zend_dval_to_lval_cap() (#22196)
This makes imagick CI fail on PHP 8.5: ``` /usr/include/php/20250925/Zend/zend_operators.h: In function 'zend_dval_to_lval_cap': /usr/include/php/20250925/Zend/zend_operators.h:149:88: error: unused parameter 's' [-Werror=unused-parameter] 149 | static zend_always_inline zend_long zend_dval_to_lval_cap(double d, const zend_string *s) | ~~~~~~~~~~~~~~~~~~~^ cc1: all warnings being treated as errors ```
1 parent 6007c09 commit 4c8dabf

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

Zend/zend_operators.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ static zend_always_inline zend_long zend_dval_to_lval_silent(double d)
148148
/* Used to convert a string float to integer during an (int) cast */
149149
static zend_always_inline zend_long zend_dval_to_lval_cap(double d, const zend_string *s)
150150
{
151+
ZEND_IGNORE_VALUE(s);
151152
if (UNEXPECTED(!zend_finite(d))) {
152153
return 0;
153154
} else if (!ZEND_DOUBLE_FITS_LONG(d)) {

0 commit comments

Comments
 (0)