Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

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

Report information
The Basics
Id:
123783
Status:
open
Priority:
Low/Low

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

BugTracker
Severity:
(no value)
Broken in:
(no value)
Fixed in:
(no value)



Subject: Coverity #169263: Missing break in switch
inflate.c: 724 state->mode = TIME; CID 169263 (#1 of 1): Missing break in switch (MISSING_BREAK) unterminated_case: The case for value TIME is not terminated by a 'break' statement. 725 case TIME: 726 NEEDBITS(32); 727 if (state->head != Z_NULL) 728 state->head->time = hold; 729 if ((state->flags & 0x0200) && (state->wrap & 4)) 730 CRC4(state->check, hold); 731 INITBITS(); 732 state->mode = OS; fallthrough: The above case falls through to this one. 733 case OS:
On Wed Nov 29 01:13:52 2017, JHI wrote:
Show quoted text
> inflate.c: > > 724 state->mode = TIME; > > CID 169263 (#1 of 1): Missing break in switch (MISSING_BREAK) > unterminated_case: The case for value TIME is not terminated by a > 'break' statement. > 725 case TIME: > 726 NEEDBITS(32); > 727 if (state->head != Z_NULL) > 728 state->head->time = hold; > 729 if ((state->flags & 0x0200) && (state->wrap & 4)) > 730 CRC4(state->check, hold); > 731 INITBITS(); > 732 state->mode = OS; > fallthrough: The above case falls through to this one. > 733 case OS:
This looks like another instance of the fallthrough warning highlighted in #123358. No idea why gcc 7 thought this code was fine while Coverity thought there was a problem. I assume that a comment of the form /* FALLTHROUGH */ is enough to silence coverity?
Subject: Re: [rt.cpan.org #123783] Coverity #169263: Missing break in switch
Date: Wed, 29 Nov 2017 22:44:24 +0200
To: bug-Compress-Raw-Zlib@rt.cpan.org, JHI@cpan.org
From: Jarkko Hietaniemi <jhi@iki.fi>
On 11/29/17 18:36, Paul Marquess via RT wrote:
Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=123783 > > > On Wed Nov 29 01:13:52 2017, JHI wrote:
>> inflate.c: >> >> 724 state->mode = TIME; >> >> CID 169263 (#1 of 1): Missing break in switch (MISSING_BREAK) >> unterminated_case: The case for value TIME is not terminated by a >> 'break' statement. >> 725 case TIME: >> 726 NEEDBITS(32); >> 727 if (state->head != Z_NULL) >> 728 state->head->time = hold; >> 729 if ((state->flags & 0x0200) && (state->wrap & 4)) >> 730 CRC4(state->check, hold); >> 731 INITBITS(); >> 732 state->mode = OS; >> fallthrough: The above case falls through to this one. >> 733 case OS:
> > This looks like another instance of the fallthrough warning highlighted in #123358. > > No idea why gcc 7 thought this code was fine while Coverity thought there was a problem. > I assume that a comment of the form /* FALLTHROUGH */ is enough to silence coverity?
I think that's the de facto trick, yes. I think it wants explicit acknowledgement in the case of intentional fall-through.
Show quoted text
>


This service runs on Request Tracker, is sponsored by The Perl Foundation, and maintained by Best Practical Solutions.

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