aboutsummaryrefslogtreecommitdiffstats
path: root/ext
diff options
context:
space:
mode:
authorKazuki Yamaguchi <k@rhe.jp>2016-04-09 21:59:27 +0900
committerKazuki Yamaguchi <k@rhe.jp>2016-04-21 00:46:34 +0900
commitb2271290061b0718dbca32aee0537a6f69630c35 (patch)
treed0c6730d33cc00ac048a6181417d5ef26996c20d /ext
parent009472b9cb6d5339e98cf26730df48cef9734ec7 (diff)
downloadruby-b2271290061b0718dbca32aee0537a6f69630c35.tar.gz
ossl_rand: suppress deprecated warning of RAND_pseudo_bytes on GCC
Diffstat (limited to 'ext')
-rw-r--r--ext/openssl/ossl_rand.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/ext/openssl/ossl_rand.c b/ext/openssl/ossl_rand.c
index daf866d772..3c0ba084e0 100644
--- a/ext/openssl/ossl_rand.c
+++ b/ext/openssl/ossl_rand.c
@@ -146,7 +146,10 @@ ossl_rand_pseudo_bytes(VALUE self, VALUE len)
int n = NUM2INT(len);
str = rb_str_new(0, n);
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
if (!RAND_pseudo_bytes((unsigned char *)RSTRING_PTR(str), n)) {
+#pragma GCC diagnostic pop
ossl_raise(eRandomError, NULL);
}