Skip Menu |

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

Report information
The Basics
Id: 100817
Status: resolved
Priority: 0/
Queue: Compress-Raw-Bzip2

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

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 2.070



Subject: gcc 4.9.2 warnings
Some warnings for bzip2-src/compress.c, don't off-hand know what to do with them. The easy thing would be to zero them, but would that be what the code expects, don't know. Maybe the bzip2 upstream wants to know? compress.c: In function 'BZ2_compressBlock': compress.c:391:54: warning: 'cost[5]' may be used uninitialized in this functio\ n [-Wmaybe-uninitialized] for (t = 0; t < nGroups; t++) cost[t] += s->len[t][icv]; ^ compress.c:256:11: note: 'cost[5]' was declared here UInt16 cost[BZ_N_GROUPS]; ^ compress.c:401:25: warning: 'cost[4]' may be used uninitialized in this functio\ n [-Wmaybe-uninitialized] if (cost[t] < bc) { bc = cost[t]; bt = t; }; ^ compress.c:256:11: note: 'cost[4]' was declared here UInt16 cost[BZ_N_GROUPS]; ^ compress.c:401:25: warning: 'cost[3]' may be used uninitialized in this functio\ n [-Wmaybe-uninitialized] if (cost[t] < bc) { bc = cost[t]; bt = t; }; ^ compress.c:256:11: note: 'cost[3]' was declared here UInt16 cost[BZ_N_GROUPS]; ^
On Tue Dec 09 21:03:22 2014, JHI wrote: Show quoted text
> Some warnings for bzip2-src/compress.c, don't off-hand know what to do > with them. The easy thing would be to zero them, but would that be > what the code expects, don't know. Maybe the bzip2 upstream wants to > know? > > compress.c: In function 'BZ2_compressBlock': > compress.c:391:54: warning: 'cost[5]' may be used uninitialized in > this function [-Wmaybe-uninitialized] > for (t = 0; t < nGroups; t++) cost[t] += s-
> >len[t][icv];
> ^ > compress.c:256:11: note: 'cost[5]' was declared here > UInt16 cost[BZ_N_GROUPS]; > ^ > compress.c:401:25: warning: 'cost[4]' may be used uninitialized in > this function [-Wmaybe-uninitialized] > if (cost[t] < bc) { bc = cost[t]; bt = t; }; > ^ > compress.c:256:11: note: 'cost[4]' was declared here > UInt16 cost[BZ_N_GROUPS]; > ^ > compress.c:401:25: warning: 'cost[3]' may be used uninitialized in > this function [-Wmaybe-uninitialized] > if (cost[t] < bc) { bc = cost[t]; bt = t; }; > ^ > compress.c:256:11: note: 'cost[3]' was declared here > UInt16 cost[BZ_N_GROUPS]; > ^
gcc 6 still thinks the same.
Could never reproduce this one (I have gcc 5.4), so in the end I've copied fix #105647 for the identical issue from Compress::Bzip2 Paul
Subject: Re: [rt.cpan.org #100817] gcc 4.9.2 warnings
Date: Wed, 28 Dec 2016 10:54:52 -0500
To: bug-Compress-Raw-Bzip2 [...] rt.cpan.org, JHI [...] cpan.org
From: Jarkko Hietaniemi <jhi [...] iki.fi>
On Wednesday-201612-28 10:26, Paul Marquess via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=100817 > > > Could never reproduce this one (I have gcc 5.4), so in the end I've copied fix #105647 for the identical issue from Compress::Bzip2
The issue in reproducing the issue (I saw the same with gcc 4.9 and 6) is that the core versions of any CPAN modules are compiled with more -W flags (-Wall -Wextra, most likely) than when non-core. Show quoted text
> Paul >