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

Fightwarn groundwork #844

Merged
merged 26 commits into from
Nov 9, 2020

Conversation

jimklimov
Copy link
Member

@jimklimov jimklimov commented Nov 8, 2020

This PR follows up from #823 and is part of a larger effort to detect and fix warnings issued by newer compilers and exposing issues in NUT codebase; it just lays the groundwork for subsequent PRs that would propose fixes for different groups of problems (logic, maintainability, overflow, ...) detected.

It also enables optional Travis CI builds for the larger test matrix for branches whose names contain "fightwarn" (or PRs targeted at branches so named) so that usual builds of NUT and its pull requests would not waste CI resources predictably-in-vain.

Over time as some test cases do become "green" and are moved to not being optional successes, this optional buildability would impact less and less cases, hopefully.

One practical point worth mentioning to the team is the addition of developers.txt section below on using goto as an explicit way to implement switch case fall-through; after several attempts, seems this is the only portable way to achieve that (and also quite self-documenting). Subsequent PRs would post the fixes for existing fall-through statements; for most of then the intention was quite apparent, but a few I'm not sure about - these would be posted separately to not block merging the main bunch.

This PR I intend to merge with little need for discussion, maybe within a week. Still, review and approval would be warmly appreciated :)

…htwarn" to build more test cases in Travis CI
…htwarn" to build more test cases in Travis CI (actually enable those build matrices)
…s (did not test for "${CLANG}" so drop it for now)
…ngs already passed to the compiler (that older releases may not understand if we just force them)
…hrough=3 to let special comments quiesce the warning where a FALLTHRU is intentional
… extend it to "configure_nut()" and "build_to_only_catch_errors()" more variants
jimklimov and others added 2 commits November 8, 2020 05:58
Avoid "quiesce" to satisfy the spellchecker
@jimklimov
Copy link
Member Author

jimklimov commented Nov 8, 2020

To fetch the entirety of "classified" PRs mentioned above along with this one, grab https://github.com/networkupstools/nut/tree/fightwarn (current state is in commit a31977e).

Note that at this time there is one known issue that precludes "green" Travis CI builds without a solution proposed, raised in PR #850, and a few others in issues #860, #861 and #862 for some but not all of the buildbot workers.

@jimklimov jimklimov merged commit 26c8994 into networkupstools:master Nov 9, 2020
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.

1 participant