summaryrefslogtreecommitdiff
path: root/ext/bigdecimal
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2020-12-20 03:13:33 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2020-12-20 03:13:33 +0900
commitc01ad11f908c2a57c2348e83d109b08fdd89dc4e (patch)
tree9c58bed9cbfcd0dc423077c69345c6a231e33518 /ext/bigdecimal
parentb2acae32742adf86a64ba5c0af55830bb3bddc0d (diff)
bigdecimal: initialize conditionally assigned variable
Diffstat (limited to 'ext/bigdecimal')
-rw-r--r--ext/bigdecimal/bigdecimal.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/bigdecimal/bigdecimal.c b/ext/bigdecimal/bigdecimal.c
index 4e49de8..7fdf401 100644
--- a/ext/bigdecimal/bigdecimal.c
+++ b/ext/bigdecimal/bigdecimal.c
@@ -418,7 +418,7 @@ BigDecimal_precision(VALUE self)
*/
ssize_t ex = p->exponent;
- ssize_t precision;
+ ssize_t precision = 0;
if (ex < 0) {
precision = (-ex + 1) * BASE_FIG; /* 1 is for p->frac[0] */
ex = 0;