summaryrefslogtreecommitdiff
path: root/ext/openssl/ossl_pkey_ec.c
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2021-09-12 00:44:18 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2021-09-12 22:49:01 +0900
commitc7dce12eb9e07f6ae35fc767760b862c10317e11 (patch)
tree43782fae1e69c38f3ff50c5c1818c9e513cb9cae /ext/openssl/ossl_pkey_ec.c
parent11fd3fec534bb626e717a0628a0cf6d6252a0ff4 (diff)
[ruby/openssl] Suppress printf format warnings
* Add `printf` format attribute to `ossl_raise`. * Fix a format specifier in `config_load_bio`. * Use `ASSUME` for the unreachable condition. https://github.com/ruby/openssl/commit/41da2955db
Diffstat (limited to 'ext/openssl/ossl_pkey_ec.c')
-rw-r--r--ext/openssl/ossl_pkey_ec.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/ext/openssl/ossl_pkey_ec.c b/ext/openssl/ossl_pkey_ec.c
index 9b461cb6a2..26c627f232 100644
--- a/ext/openssl/ossl_pkey_ec.c
+++ b/ext/openssl/ossl_pkey_ec.c
@@ -596,8 +596,10 @@ static VALUE ossl_ec_group_initialize(int argc, VALUE *argv, VALUE self)
ossl_raise(rb_eArgError, "wrong number of arguments");
}
- if (group == NULL)
- ossl_raise(eEC_GROUP, "");
+#if !defined(LIKELY) && !defined(RB_LIKELY)
+#define LIKELY(x) (x)
+#endif
+ ASSUME(group);
RTYPEDDATA_DATA(self) = group;
return self;