Skip to content

Commit 275c219

Browse files
committed
Fix -Werror=discarded-qualifiers warning in openssl
* Upstream fix: ruby/openssl@6fb3499a7b * On gcc only: compiling ossl_pkey_ec.c ossl_pkey_ec.c: In function ‘ossl_ec_key_check_key’: ossl_pkey_ec.c:24:11: error: assignment discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers] 24 | (key) = EVP_PKEY_get0_EC_KEY(_pkey); \ | ^ ossl_pkey_ec.c:489:5: note: in expansion of macro ‘GetEC’ 489 | GetEC(self, ec); | ^~~~~
1 parent bd659a9 commit 275c219

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

lib/truffle/rbconfig.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,6 @@ module RbConfig
108108
'-Wno-format-extra-args', # Our PRIsVALUE generates this because compilers ignore printf extensions
109109
]
110110
warnflags << '-Wno-format-invalid-specifier' if clang # Our PRIsVALUE generates this because compilers ignore printf extensions
111-
# TODO fix it, happens in openssl
112-
warnflags << '-Wno-discarded-qualifiers' if gcc
113111

114112
defs = ''
115113
cppflags = ''

src/main/c/openssl/ossl_pkey_ec.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -483,7 +483,7 @@ static VALUE ossl_ec_key_check_key(VALUE self)
483483
#ifdef HAVE_EVP_PKEY_CHECK
484484
EVP_PKEY *pkey;
485485
EVP_PKEY_CTX *pctx;
486-
EC_KEY *ec;
486+
const EC_KEY *ec;
487487

488488
GetPKey(self, pkey);
489489
GetEC(self, ec);

0 commit comments

Comments
 (0)