ruby-changes:64871
From: Kenta <ko1@a...>
Date: Thu, 14 Jan 2021 11:01:53 +0900 (JST)
Subject: [ruby-changes:64871] 4d13f3e9da (master): [ruby/bigdecimal] Explicitly cast size_t to int
https://git.ruby-lang.org/ruby.git/commit/?id=4d13f3e9da From 4d13f3e9da6298a1f8154def2e341ecb7c5fe116 Mon Sep 17 00:00:00 2001 From: Kenta Murata <mrkn@m...> Date: Thu, 14 Jan 2021 09:26:15 +0900 Subject: [ruby/bigdecimal] Explicitly cast size_t to int https://github.com/ruby/bigdecimal/commit/b1f1ed26c9 diff --git a/ext/bigdecimal/bigdecimal.c b/ext/bigdecimal/bigdecimal.c index e560c19..66be424 100644 --- a/ext/bigdecimal/bigdecimal.c +++ b/ext/bigdecimal/bigdecimal.c @@ -2830,7 +2830,7 @@ rb_float_convert_to_BigDecimal(VALUE val, size_t digs, int raise_exception) https://github.com/ruby/ruby/blob/trunk/ext/bigdecimal/bigdecimal.c#L2830 int decpt, negative_p; char *e; const int mode = digs == 0 ? 0 : 2; - char *p = BigDecimal_dtoa(d, mode, digs, &decpt, &negative_p, &e); + char *p = BigDecimal_dtoa(d, mode, (int)digs, &decpt, &negative_p, &e); int len10 = (int)(e - p); if (len10 >= (int)sizeof(buf)) len10 = (int)sizeof(buf) - 1; -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/