ruby-changes:61235
From: Yusuke <ko1@a...>
Date: Wed, 13 May 2020 13:47:11 +0900 (JST)
Subject: [ruby-changes:61235] 3bca1b6aad (master): ext/openssl/ossl.h: Remove a variable that is used only in assert
https://git.ruby-lang.org/ruby.git/commit/?id=3bca1b6aad From 3bca1b6aadff1faf1c2308cd4eb7dd58948a47d8 Mon Sep 17 00:00:00 2001 From: Yusuke Endoh <mame@r...> Date: Wed, 13 May 2020 13:45:31 +0900 Subject: ext/openssl/ossl.h: Remove a variable that is used only in assert It produces "unused variable" warnings in NDEBUG mode diff --git a/ext/openssl/ossl.h b/ext/openssl/ossl.h index 8074afc..c20f506 100644 --- a/ext/openssl/ossl.h +++ b/ext/openssl/ossl.h @@ -88,9 +88,8 @@ VALUE ossl_buf2str(char *buf, int len); https://github.com/ruby/ruby/blob/trunk/ext/openssl/ossl.h#L88 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) /* -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/