Skip to content

pkg: disable implicit fallthroughs errors in tinydtls#8367

Merged
smlng merged 1 commit intoRIOT-OS:masterfrom
smlng:pkg/tinydtls/fix_implicit_fallthrough
Jan 16, 2018
Merged

pkg: disable implicit fallthroughs errors in tinydtls#8367
smlng merged 1 commit intoRIOT-OS:masterfrom
smlng:pkg/tinydtls/fix_implicit_fallthrough

Conversation

@smlng
Copy link
Copy Markdown
Member

@smlng smlng commented Jan 16, 2018

Contribution description

Disable implicit-fallthrough checks for external package tinydtls, this error is raised with gcc 7.x versions on any platform. Sample error:

dtls.c:244:1601: error: this statement may fall through [-Werror=implicit-fallthrough=]
   FIND_PEER(ctx->peers, session, p);

Issues/PRs references

#8265

@smlng smlng added the Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation label Jan 16, 2018
@smlng smlng requested a review from kaspar030 January 16, 2018 09:36
Copy link
Copy Markdown
Contributor

@kaspar030 kaspar030 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK.

@kaspar030 kaspar030 added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Jan 16, 2018
@smlng smlng mentioned this pull request Jan 16, 2018
13 tasks

INCLUDES += -I$(PKG_BUILDDIR)

CFLAGS += -Wno-implicit-fallthrough
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't this disable the warnings for all files when USEPKG contains tinydtls?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it work if the CFLAGS are modified in Makefile instead of Makefile.include?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ups, I overlooked the .include.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you're right - for both. It also works when putting this into Makefile. But then we should likely move the llvm CFLAGs additions there, too? But in a separate PR, I guess.

Copy link
Copy Markdown
Contributor

@kaspar030 kaspar030 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please move from Makefile.include to Makefile...

@smlng smlng force-pushed the pkg/tinydtls/fix_implicit_fallthrough branch from acbfd04 to 2608bc5 Compare January 16, 2018 09:56
@smlng
Copy link
Copy Markdown
Member Author

smlng commented Jan 16, 2018

done, amended directly

Copy link
Copy Markdown
Contributor

@kaspar030 kaspar030 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

re-ACK

@smlng smlng added this to the Release 2018.01 milestone Jan 16, 2018
@smlng smlng merged commit 3d0f766 into RIOT-OS:master Jan 16, 2018
@smlng smlng deleted the pkg/tinydtls/fix_implicit_fallthrough branch January 16, 2018 12:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants