fix(traffic_simulator): ignore unused-local-typedefs warning#1839
Merged
Conversation
Signed-off-by: Ryohsuke Mitsudome <ryohsuke.mitsudome@tier4.jp>
Checklist for reviewers ☑️All references to "You" in the following text refer to the code reviewer.
|
Contributor
|
I can confirm in my local jazzy env, traffic_simulator fails to compile without this PR. ❌ Not sure why the following check fails to catch this: |
16 tasks
HansRobo
approved these changes
May 7, 2026
Member
HansRobo
left a comment
There was a problem hiding this comment.
LGTM, waiting for CIs to pass.
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.
Description
Abstract
Suppress
-Werror=unused-local-typedefsfortraffic_simulatorso the packagebuilds cleanly on ROS 2 Jazzy.
Background
GCC 13 (shipped with Jazzy) tightened
-Wunused-local-typedefsso it now fires inside function templates when a particular instantiation does not use the typedef. This trips onlanelet2_core'ssignedDistanceImplin/opt/ros/jazzy/include/lanelet2_core/geometry/impl/LineString.h:130, which declaresusing BasicPoint = PointT;without referencing it in some instantiations. Combined with this package's-Werror, buildingtest_lanelet_wrapper_traffic_lightsfails:The same code compiled fine on Humble (GCC 11), which did not flag the typedef.
Details
Append
-Wno-error=unused-local-typedefsto the existingadd_compile_optionsline insimulation/traffic_simulator/CMakeLists.txt, mirroring the pattern already used for-Wno-error=class-memaccess(Eigen NEON memcpy on ARM). The warning still surfaces in build logs, but is no longer fatal.The root cause is in an upstream system header, so demoting the warning to a non-fatal one on our side is the appropriate scope for this package.
References
autowarefoundation/autoware#7092 (comment)
Destructive Changes
none
Known Limitations
We might unintentionally ignore other unused-local-typedefs warnings for this package in the future.