Skip to content

Add attribute to avoid a warning by GCC #15

@0x3333

Description

@0x3333

On dfu.c, in the STATE_DFU_IDLE we fall through, intentionally. This issues a warning on GCC:

dfu.c: In function 'dfu_control_class_request':
dfu.c:232:40: warning: this statement may fall through [-Wimplicit-fallthrough=]
                     current_dfu_offset = 0;
                     ~~~~~~~~~~~~~~~~~~~^~~
dfu.c:235:17: note: here
                 case STATE_DFU_UPLOAD_IDLE: {
                 ^~~~

GCC has an attribute to inform that this fall through is intentional, __attribute__ ((fallthrough)).

Will push a PR for this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions