diff options
author | Yusuke Endoh <mame@ruby-lang.org> | 2020-05-13 13:45:31 +0900 |
---|---|---|
committer | Kazuki Yamaguchi <k@rhe.jp> | 2020-05-13 14:55:26 +0900 |
commit | 306b26ae68824e89c33f69fe2bf6bb170bed8343 (patch) | |
tree | e699764635efcff90ecee99f6b5320a135fc4de9 /ext | |
parent | de0294240e7f8a6ede64b0ca3b3b00c9bfd88c2a (diff) | |
download | ruby-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. ]
Diffstat (limited to 'ext')
-rw-r--r-- | ext/openssl/ossl.h | 3 |
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) /* |