Skip to content

Commit

Permalink
Merge pull request #85 from nobu/gcc-14
Browse files Browse the repository at this point in the history
Tell gcc-14 that `Qnil` is not passed to `gzfile_calc_crc`
  • Loading branch information
nobu authored Oct 24, 2024
2 parents 3b45a5b + eb1cf42 commit 34320bd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ext/zlib/zlib.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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");
Expand Down

0 comments on commit 34320bd

Please sign in to comment.