diff options
| author | Yusuke Endoh <mame@ruby-lang.org> | 2022-06-13 12:14:03 +0900 |
|---|---|---|
| committer | Yusuke Endoh <mame@ruby-lang.org> | 2022-06-13 15:22:32 +0900 |
| commit | b2e58b02aec73f9c350bf109c021c180fc699ccc (patch) | |
| tree | 3b62454a8e4bddc88b834e76702dc74f082f09ae /include/ruby/encoding.h | |
| parent | 5060c9d852be4b99d773ec1d94e0ec08ac4299b7 (diff) | |
compile.c (add_adjust_info): Remove `insns_info_index > 0`
... because insns_info_index could not be zero here. Also it adds an
invariant check for that.
This change will prevent the following warning of GCC 12.1
http://rubyci.s3.amazonaws.com/arch/ruby-master/log/20220613T000004Z.log.html.gz
```
compile.c:2230:39: warning: array subscript 2147483647 is outside array bounds of ‘struct iseq_insn_info_entry[2147483647]’ [-Warray-bounds]
2230 | insns_info[insns_info_index-1].line_no != adjust->line_no) {
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
```
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/6008
Diffstat (limited to 'include/ruby/encoding.h')
0 files changed, 0 insertions, 0 deletions
