Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fail build on warning #691

Conversation

rettichschnidi
Copy link
Contributor

@rettichschnidi rettichschnidi commented Mar 25, 2023

Fix or work around warnings in existing code base. Enforce warning free build in CI.

Probably best reviewed commit-by-commit, due to the reformatting required by clang-format.

@rettichschnidi rettichschnidi force-pushed the gardena/rs/fix-warnings-2023-03-24 branch 3 times, most recently from b2a22e0 to 850bb27 Compare March 26, 2023 20:02
Turn the -Wdiscarded-qualifiers into an error and fix the existing
issues.
Fix and enforce absence of such issues.
Fix and enforce absence of such issues.
Fix and enforce absence of such issues.
Fix and enforce absence of such issues.
@rettichschnidi rettichschnidi force-pushed the gardena/rs/fix-warnings-2023-03-24 branch from 850bb27 to 0b639cd Compare March 26, 2023 23:12
No longer rely on unportable formatting strings.
Silence the existing, benign looking code, but ensure we get a warning
for new code with such issues.
-Wunused-parameter yields the majority of the warnings. Ignoring it (for now)
makes other, more relevant warnings better visible.
2 out of 2 cases are false positives.
This is code not (directly) under our control.
Using difftime() might be more clean, but uses doubles instead of
integers.
Turn (almost) all warnings into errors to ensure no new warnings enter
the code base.

-Wcast-align is not an error because fixing the findings requires a bit
more work than what I am willing to do right now and the tinydtls yields
some findings.
Adapting changed lines:

```
git clang-format-14 --style=file master
```
@rettichschnidi rettichschnidi force-pushed the gardena/rs/fix-warnings-2023-03-24 branch from 0b639cd to e89761b Compare March 26, 2023 23:38
@rettichschnidi rettichschnidi marked this pull request as ready for review March 27, 2023 00:10
@rettichschnidi rettichschnidi merged commit 1166233 into eclipse-wakaama:master Mar 31, 2023
@rettichschnidi rettichschnidi deleted the gardena/rs/fix-warnings-2023-03-24 branch March 31, 2023 14:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants