mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
bigdecimal: initialize conditionally assigned variable
This commit is contained in:
parent
b2acae3274
commit
c01ad11f90
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue