Skip to content

Commit eb1cf42

Browse files
committed
Tell gcc-14 that Qnil is not passed to gzfile_calc_crc
Suppress false positive warnings due to a bug in gcc-14 optimizer.
1 parent 3b45a5b commit eb1cf42

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

ext/zlib/zlib.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4229,6 +4229,7 @@ gzreader_skip_linebreaks(struct gzfile *gz)
42294229
while (n++, *(p++) == '\n') {
42304230
if (n >= ZSTREAM_BUF_FILLED(&gz->z)) {
42314231
str = zstream_detach_buffer(&gz->z);
4232+
ASSUME(!NIL_P(str));
42324233
gzfile_calc_crc(gz, str);
42334234
while (ZSTREAM_BUF_FILLED(&gz->z) == 0) {
42344235
if (GZFILE_IS_FINISHED(gz)) return;
@@ -4637,6 +4638,7 @@ zlib_gunzip_run(VALUE arg)
46374638

46384639
gzfile_read_header(gz, Qnil);
46394640
dst = zstream_detach_buffer(&gz->z);
4641+
ASSUME(!NIL_P(dst));
46404642
gzfile_calc_crc(gz, dst);
46414643
if (!ZSTREAM_IS_FINISHED(&gz->z)) {
46424644
rb_raise(cGzError, "unexpected end of file");

0 commit comments

Comments
 (0)