fix(clang-tidy): re-enable clang-diagnostic-unused-but-set-variable#12564
Open
vish0012 wants to merge 1 commit intoautowarefoundation:mainfrom
Open
fix(clang-tidy): re-enable clang-diagnostic-unused-but-set-variable#12564vish0012 wants to merge 1 commit intoautowarefoundation:mainfrom
vish0012 wants to merge 1 commit intoautowarefoundation:mainfrom
Conversation
Signed-off-by: Vishal Chauhan <40782713+vish0012@users.noreply.github.com>
|
Thank you for contributing to the Autoware project! 🚧 If your pull request is in progress, switch it to draft mode. Please ensure:
|
maxime-clem
approved these changes
May 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Re-enables
clang-diagnostic-unused-but-set-variablein.clang-tidy-ci.The check was suppressed in #12431 with 1 reported error. This PR fixes the affected package.
Refs #12450
Fixes
autoware_motion_velocity_obstacle_slow_down_modulefind_reach_time()used an infiniteforloop with a loop variablei, butiwas never used. The actual warning counter is already handled by the existingitervariable.This PR removes the unused loop variable by changing:
to:
for (;;) {This keeps the behavior unchanged.
How to reproduce
Check the target errors:
Result
Before: 1 target error
After: 0 target errors
Note
Local
run-clang-tidystill reports unrelated Boost system-header diagnostics from/usr/include/boost/...underclang-diagnostic-enum-constexpr-conversion. Those diagnostics are unrelated to this PR and were not modified.