From 3bca1b6aadff1faf1c2308cd4eb7dd58948a47d8 Mon Sep 17 00:00:00 2001 From: Yusuke Endoh Date: Wed, 13 May 2020 13:45:31 +0900 Subject: [PATCH] ext/openssl/ossl.h: Remove a variable that is used only in assert It produces "unused variable" warnings in NDEBUG mode --- ext/openssl/ossl.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ext/openssl/ossl.h b/ext/openssl/ossl.h index 8074afcd79..c20f506bda 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) /*