Skip to content

emlib: warnings when using GCC 7 #8266

@jnohlgard

Description

@jnohlgard

Description

This error occurs when building the default example for the ikea-tradfri board when using GCC 7.2.0:

Steps to reproduce the issue

Use GCC 7.2.0
make BOARD=ikea-tradfri -C examples/default

Expected results

No compilation errors

Actual results

/home/jgn/work/src/riot/examples/default/bin/pkg/ikea-tradfri/emlib/emlib/src/em_cmu.c: In function ‘CMU_ClockSelectSet’:
/home/jgn/work/src/riot/examples/default/bin/pkg/ikea-tradfri/emlib/emlib/src/em_cmu.c:3463:14: error: this statement may fall through [-Werror=implicit-fallthrough=]
       selReg = (selReg == NULL) ? &CMU->LFACLKSEL : selReg;
       ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/jgn/work/src/riot/examples/default/bin/pkg/ikea-tradfri/emlib/emlib/src/em_cmu.c:3480:5: note: here
     case CMU_LFECLKSEL_REG:
     ^~~~
/home/jgn/work/src/riot/examples/default/bin/pkg/ikea-tradfri/emlib/emlib/src/em_cmu.c:3481:14: error: this statement may fall through [-Werror=implicit-fallthrough=]
       selReg = (selReg == NULL) ? &CMU->LFECLKSEL : selReg;
       ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/jgn/work/src/riot/examples/default/bin/pkg/ikea-tradfri/emlib/emlib/src/em_cmu.c:3488:5: note: here
     case CMU_LFBCLKSEL_REG:
     ^~~~
cc1: all warnings being treated as errors

Versions

arm-none-eabi-gcc (Gentoo 7.2.0 p1.1) 7.2.0

Issue references

#8265

Metadata

Metadata

Assignees

No one assigned

    Labels

    Community: good first issueThis issue is good for newcomers to RIOT to be addressed / implementedCommunity: help wantedThe contributors require help from other members of the communityPlatform: ARMPlatform: This PR/issue effects ARM-based platformsType: bugThe issue reports a bug / The PR fixes a bug (including spelling errors)

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions