Skip to content

Commit 4e105e0

Browse files
committed
Fix openssl compile warnings on Solaris
BIO_reset() needs a (void) cast, analogous to the other locations in this file. /usr/openssl/3/include/openssl/bio.h:555:34: error: value computed is not used [-Werror=unused-value] 555 | # define BIO_reset(b) (int)BIO_ctrl(b,BIO_CTRL_RESET,0,NULL) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /home/runner/work/php-src/php-src/ext/openssl/openssl.c:1565:33: note: in expansion of macro ‘BIO_reset’ 1565 | BIO_reset(bio_out); | ^~~~~~~~~
1 parent 1b7449f commit 4e105e0

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

ext/openssl/openssl.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1562,7 +1562,7 @@ PHP_FUNCTION(openssl_pkcs12_read)
15621562
add_index_zval(&zextracerts, i, &zextracert);
15631563
}
15641564

1565-
BIO_reset(bio_out);
1565+
(void)BIO_reset(bio_out);
15661566
X509_free(aCA);
15671567
}
15681568
BIO_free(bio_out);
@@ -2844,7 +2844,7 @@ PHP_FUNCTION(openssl_pkcs7_read)
28442844
ZVAL_STRINGL(&zcert, bio_buf->data, bio_buf->length);
28452845
add_index_zval(zout, i, &zcert);
28462846
}
2847-
BIO_reset(bio_out);
2847+
(void)BIO_reset(bio_out);
28482848
}
28492849
BIO_free(bio_out);
28502850
}
@@ -2863,7 +2863,7 @@ PHP_FUNCTION(openssl_pkcs7_read)
28632863
ZVAL_STRINGL(&zcert, bio_buf->data, bio_buf->length);
28642864
add_index_zval(zout, i, &zcert);
28652865
}
2866-
BIO_reset(bio_out);
2866+
(void)BIO_reset(bio_out);
28672867
}
28682868
BIO_free(bio_out);
28692869
}
@@ -3520,7 +3520,7 @@ PHP_FUNCTION(openssl_cms_read)
35203520
ZVAL_STRINGL(&zcert, bio_buf->data, bio_buf->length);
35213521
add_index_zval(zout, i, &zcert);
35223522
}
3523-
BIO_reset(bio_out);
3523+
(void)BIO_reset(bio_out);
35243524
}
35253525
BIO_free(bio_out);
35263526
}
@@ -3540,7 +3540,7 @@ PHP_FUNCTION(openssl_cms_read)
35403540
ZVAL_STRINGL(&zcert, bio_buf->data, bio_buf->length);
35413541
add_index_zval(zout, i, &zcert);
35423542
}
3543-
BIO_reset(bio_out);
3543+
(void)BIO_reset(bio_out);
35443544
}
35453545
BIO_free(bio_out);
35463546
}

0 commit comments

Comments
 (0)