Failed to compile rohc_decomp.c using gcc-7

Bug #1736764 reported by Bi-Ruei, Chiu on 2017-12-06
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
rohc
Status tracked in Rohc-main
Rohc-2.0.x
Low
Didier Barvaux
Rohc-2.1.x
Medium
Didier Barvaux
Rohc-main
Medium
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 =
     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
      decomp->last_context->header_last_uncompressed_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 :

https://github.com/didier-barvaux/rohc/pull/3

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  Edit
Everyone can see this information.

Other bug subscribers