aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYusuke Endoh <mame@ruby-lang.org>2020-05-13 13:45:31 +0900
committerKazuki Yamaguchi <k@rhe.jp>2020-05-13 14:55:26 +0900
commit306b26ae68824e89c33f69fe2bf6bb170bed8343 (patch)
treee699764635efcff90ecee99f6b5320a135fc4de9
parentde0294240e7f8a6ede64b0ca3b3b00c9bfd88c2a (diff)
downloadruby-openssl-306b26ae68824e89c33f69fe2bf6bb170bed8343.tar.gz
ext/openssl/ossl.h: Remove a variable that is used only in assert
It produces "unused variable" warnings in NDEBUG mode [ Cherry-picked from ruby.git commit 3bca1b6aadff. ]
-rw-r--r--ext/openssl/ossl.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/ext/openssl/ossl.h b/ext/openssl/ossl.h
index 8074afcd..c20f506b 100644
--- a/ext/openssl/ossl.h
+++ b/ext/openssl/ossl.h
@@ -88,9 +88,8 @@ VALUE ossl_buf2str(char *buf, int len);
VALUE ossl_str_new(const char *, long, int *);
#define ossl_str_adjust(str, p) \
do{\
- long len = RSTRING_LEN(str);\
long newlen = (long)((p) - (unsigned char*)RSTRING_PTR(str));\
- assert(newlen <= len);\
+ assert(newlen <= RSTRING_LEN(str));\
rb_str_set_len((str), newlen);\
}while(0)
/*