diff options
author | Nobuyoshi Nakada <[email protected]> | 2024-10-24 19:10:14 +0900 |
---|---|---|
committer | git <[email protected]> | 2024-10-24 10:18:49 +0000 |
commit | ae67325dd00143fd87b10e258bf073d1df3b709e (patch) | |
tree | bdeb5255a054a9dee199f3d53db43a74f7bf542f /ext/zlib/zlib.c | |
parent | 4df0038d5ebf6a4edc129016147394adefbf6e27 (diff) |
[ruby/zlib] Tell gcc-14 that `Qnil` is not passed to `gzfile_calc_crc`
Suppress false positive warnings due to a bug in gcc-14 optimizer.
https://github.com/ruby/zlib/commit/eb1cf426c2
Diffstat (limited to 'ext/zlib/zlib.c')
-rw-r--r-- | ext/zlib/zlib.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ext/zlib/zlib.c b/ext/zlib/zlib.c index 0899861c02..e9535aaf4a 100644 --- a/ext/zlib/zlib.c +++ b/ext/zlib/zlib.c @@ -4229,6 +4229,7 @@ gzreader_skip_linebreaks(struct gzfile *gz) while (n++, *(p++) == '\n') { if (n >= ZSTREAM_BUF_FILLED(&gz->z)) { str = zstream_detach_buffer(&gz->z); + ASSUME(!NIL_P(str)); gzfile_calc_crc(gz, str); while (ZSTREAM_BUF_FILLED(&gz->z) == 0) { if (GZFILE_IS_FINISHED(gz)) return; @@ -4637,6 +4638,7 @@ zlib_gunzip_run(VALUE arg) gzfile_read_header(gz, Qnil); dst = zstream_detach_buffer(&gz->z); + ASSUME(!NIL_P(dst)); gzfile_calc_crc(gz, dst); if (!ZSTREAM_IS_FINISHED(&gz->z)) { rb_raise(cGzError, "unexpected end of file"); |