Failed to compile rohc_decomp.c using gcc-7

Bug #1736764 reported by Bi-Ruei, Chiu
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Status tracked in Rohc-main
Didier Barvaux
Fix Committed
Didier Barvaux
Fix Released
Didier Barvaux

Bug Description

Here's the compile error:

  CC librohc_decomp_la-rohc_decomp.lo
rohc_decomp.c: In function ‘rohc_decomp_get_last_packet_info’:
rohc_decomp.c:2493:35: error: this statement may fall through [-Werror=implicit-fallthrough=]
     info->header_last_uncomp_size =
rohc_decomp.c:2496:4: note: here
    case 1:
cc1: all warnings being treated as errors
Makefile:576: recipe for target 'librohc_decomp_la-rohc_decomp.lo' failed
make[4]: *** [librohc_decomp_la-rohc_decomp.lo] Error 1

We can re-factor the 'switch-case' code segment using 'if-else' statement to solve it.

I already have a fix and submit a pull request to master repository on github :

Tags: library gcc qa
Revision history for this message
Didier Barvaux (didier-barvaux) wrote :

Thanks for reporting the problem and providing a fix.

Fixed in branches master and 2.1.x. Not required in branch 2.0.x.

tags: added: library qa
tags: added: gcc
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.