Skip to content

Fix clang -Werror errors in nav2_system_tests and nav2_rviz_plugins (backport #6803) - #6806

Merged
jwallace42 merged 1 commit into
lyricalfrom
mergify/bp/lyrical/pr-6803
Nov 17, 2026
Merged

jwallace42 merged 1 commit into
lyricalfrom
mergify/bp/lyrical/pr-6803

Conversation

@mergify

@mergify mergify Bot commented Nov 17, 2026

Copy link
Copy Markdown
Contributor

Basic Info

Info Please fill out this column
Ticket(s) this addresses None
Primary OS tested on MacOS (27, arm64, Apple clang 21)
Robotic platform tested on N/A (build only)
Does this PR contain AI generated software? Yes, written with Claude Code and manually validated: the same changes build on Jazzy with Apple clang under -Werror, and the compiled object code is byte-identical before and after
Was this PR description generated by AI software? Yes (Claude Code), reviewed by me

Description of contribution in a few bullet points

  • nav2_system_tests: in controller_error_plugins.hpp, UnknownErrorController::configure() is marked override but cleanup, activate, deactivate, newPathReceived, computeVelocityCommands and setSpeedLimit are not. Clang reports -Winconsistent-missing-override, which nav2_package()'s -Werror turns into a build error. Marked them override.
  • nav2_rviz_plugins: stoi(loop_value); in nav2_panel.cpp only validates the input (the catch blocks handle invalid values). libc++ marks std::stoi [[nodiscard]], so clang reports -Wunused-result (an error under -Werror). The result is now discarded explicitly with static_cast<void>(...).
  • No behaviour change: override is a compile-time check, and the stoi call and its exceptions are unchanged.

Description of documentation updates required from your changes

  • None

Description of how this change was tested

  • The same two changes, applied to Jazzy (identical code apart from newPathReceived being setPlan there), build with Apple clang 21 on macOS 27 with -Werror, and the generated object code (otool -tV) is identical before and after.
  • pre-commit run --files on both files: all hooks pass except ament_uncrustify on nav2_panel.cpp. My local version flags the unmodified upstream file the same way, and not on the changed line.
  • Not built against Rolling locally; relying on CI for main.

Future work that may be required in bullet points

  • Backport to Jazzy (the same two errors occur there with clang).

For Maintainers:

  • Check that any new parameters added are updated in docs.nav2.org
  • Check that any significant change is added to the migration guide
  • Check that any new features OR changes to existing behaviors are reflected in the tuning guide
  • Check that any new functions have Doxygen added
  • Check that any new features have test coverage
  • Check that any new plugins is added to the plugins page
  • If BT Node, Additionally: add to BT's XML index of nodes for groot, BT package's readme table, and BT library lists
  • Should this be backported to current distributions? If so, tag with backport-*.
    This is an automatic backport of pull request Fix clang -Werror errors in nav2_system_tests and nav2_rviz_plugins #6803 done by Mergify.

…6803)

* nav2_system_tests: mark controller error plugin overrides

Clang reports -Winconsistent-missing-override (an error under -Werror) because
configure() is marked override and the other overrides are not.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Dhruv Patel <[email protected]>

* nav2_rviz_plugins: discard the stoi() result explicitly

stoi(loop_value) only validates the input; libc++ marks std::stoi [[nodiscard]],
so clang reports -Wunused-result (an error under -Werror).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Dhruv Patel <[email protected]>

---------

Signed-off-by: Dhruv Patel <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
(cherry picked from commit 6272fad)
@mergify

mergify Bot commented Nov 17, 2026

Copy link
Copy Markdown
Contributor Author

@mergify[bot], all pull requests must be targeted towards the main development branch.
Once merged into main, it is possible to backport to @lyrical, but it must be in main
to have these changes reflected into new distributions.

@codecov

codecov Bot commented Nov 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
see 3 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jwallace42
jwallace42 self-requested a review November 17, 2026 18:50
@jwallace42

Copy link
Copy Markdown
Contributor

@Mergifyio queue

@mergify

mergify Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor Author

🚫 Left the queue · pull request dequeued

Less than a minute in the queue, with no time running CI.

So far

  • ✅ Entered the queue Tue 17 Nov, 18:57 · rule default · triggered by @jwallace42 with the @mergifyio queue command
  • ✅ Checks skipped · PR is already up-to-date
  • 🚫 Left the queue 18:57 · 43e6b71

Reason

Pull request #6806 has been dequeued

GitHub refused to merge the pull request. You're not authorized to push to this branch. Visit https://docs.github.com/repositories/configuring-branches-and-merges-in-your-repository/managing-protected-branches/about-protected-branches for more information. This is usually enforced by a branch protection or ruleset rule.

To get back in the queue

  • Push a change if one is needed: the pull request is queued again once its queue conditions match.
  • If no change is needed, comment @mergifyio queue to queue it again as it is.
1 merge condition met

Times in UTC · dashboard · how the merge queue works

@jwallace42
jwallace42 merged commit 6225831 into lyrical Nov 17, 2026
17 checks passed
@jwallace42
jwallace42 deleted the mergify/bp/lyrical/pr-6803 branch November 17, 2026 19:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants