Skip to content

Commit 5216ca8

Browse files
authored
Fix build warning on LibreSSL (php#21050)
When trying to build on LibreSSL, I encounter the following build warning (this was observed on master, but applies to 8.4 too): ``` /work/php-src/ext/openssl/openssl.c: In function 'zif_openssl_x509_parse': /work/php-src/ext/openssl/openssl.c:1101:22: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers] 1101 | purp = X509_PURPOSE_get0(i); | ^ /work/php-src/ext/openssl/openssl.c:1110:23: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers] 1110 | pname = useshortnames ? X509_PURPOSE_get0_sname(purp) : X509_PURPOSE_get0_name(purp); ```
1 parent 7782b88 commit 5216ca8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/openssl/openssl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2206,7 +2206,7 @@ PHP_FUNCTION(openssl_x509_parse)
22062206
for (i = 0; i < X509_PURPOSE_get_count(); i++) {
22072207
int id, purpset;
22082208
char * pname;
2209-
X509_PURPOSE * purp;
2209+
const X509_PURPOSE * purp;
22102210
zval subsub;
22112211

22122212
array_init(&subsub);

0 commit comments

Comments
 (0)