Skip Menu |
 

This queue is for tickets about the Compress-Raw-Zlib CPAN distribution.

Report information
The Basics
Id: 119580
Status: resolved
Priority: 0/
Queue: Compress-Raw-Zlib

People
Owner: Nobody in particular
Requestors: jkeenan [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 2.070
Fixed in: 2.071



Subject: inflate.c: One (last?) compilation warning
Download (untitled) / with headers
text/plain 1.1k
Paul, Here's a compilation warning that I *wish* I had spotted before you finished up work on https://rt.cpan.org/Ticket/Display.html?id=107642. :-( Building Perl 5 blead on FreeBSD-11 with clang -- now the default compiler on FreeBSD -- gives this warning: ##### inflate.c:1507:61: warning: shifting a negative signed value is undefined [-Wshift-negative-value] ##### See, e.g., http://perl5.test-smoke.org/report/52756 Here is the relevant code from cpan/Compress-Raw-Zlib/zlib-src/inflate.c: ##### 1502 long ZEXPORT inflateMark( 1503 z_streamp strm) 1504 { 1505 struct inflate_state FAR *state; 1506 1507 if (strm == Z_NULL || strm->state == Z_NULL) return -1L << 16; # <-- warning at '<<' 1508 state = (struct inflate_state FAR *)strm->state; 1509 return ((long)(state->back) << 16) + 1510 (state->mode == COPY ? state->length : 1511 (state->mode == MATCH ? state->was - state->length : 0)); 1512 } ##### While eliminating this warning is probably not worth an entire new CPAN release, it would be nice to nail it before the 5.26 code freeze. It's the *very last* compilation warning being emitted by clang on FreeBSD11! Thank you very much. Jim Keenan
Download (untitled) / with headers
text/plain 468b
Hey Jim, thanks for the report. I'm always tentative about messing with the zlib sources, but in this case the upstream zlib dev codeline has already had this one reported (multiple times) and fixed. Issue reported in https://github.com/madler/zlib/issues/111 And this is the checkin for the fix https://github.com/madler/zlib/commit/2edb94a3025d288dc251bc6cbb2c02e60fbd7438 Should be able to get that updated and posted to CPAN today (or this weekend). Paul


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.