Commit 1389a36
committed
sprintf.c: Fix -Wmaybe-uninitialized warnings in rb_str_format
Initialize `c` and `encidx` to 0. They are assigned inside
`if (n >= 0)` and the following `if (n <= 0)` calls rb_raise, but the
compiler cannot see through the noreturn guarantee.1 parent 6a5a261 commit 1389a36
1 file changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
440 | 440 | | |
441 | 441 | | |
442 | 442 | | |
443 | | - | |
444 | | - | |
| 443 | + | |
| 444 | + | |
445 | 445 | | |
446 | 446 | | |
447 | 447 | | |
| |||
0 commit comments