Skip to content

fix(traffic_simulator): ignore unused-local-typedefs warning#1839

Merged
HansRobo merged 1 commit into
tier4:masterfrom
mitsudome-r:ignore-unused-local-typedefs
May 7, 2026
Merged

fix(traffic_simulator): ignore unused-local-typedefs warning#1839
HansRobo merged 1 commit into
tier4:masterfrom
mitsudome-r:ignore-unused-local-typedefs

Conversation

@mitsudome-r
Copy link
Copy Markdown
Contributor

@mitsudome-r mitsudome-r commented May 4, 2026

Description

Abstract

Suppress -Werror=unused-local-typedefs for traffic_simulator so the package
builds cleanly on ROS 2 Jazzy.

Background

GCC 13 (shipped with Jazzy) tightened -Wunused-local-typedefs so it now fires inside function templates when a particular instantiation does not use the typedef. This trips on lanelet2_core's signedDistanceImpl in /opt/ros/jazzy/include/lanelet2_core/geometry/impl/LineString.h:130, which declares using BasicPoint = PointT; without referencing it in some instantiations. Combined with this package's -Werror, building test_lanelet_wrapper_traffic_lights fails:

/opt/ros/jazzy/include/lanelet2_core/geometry/impl/LineString.h:130:9: error: typedef 'using BasicPoint = PointT' locally defined but not used [-Werror=unused-local-typedefs]

The same code compiled fine on Humble (GCC 11), which did not flag the typedef.

Details

Append -Wno-error=unused-local-typedefs to the existing add_compile_options line in simulation/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.

Signed-off-by: Ryohsuke Mitsudome <ryohsuke.mitsudome@tier4.jp>
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 4, 2026

Checklist for reviewers ☑️

All references to "You" in the following text refer to the code reviewer.

  • Is this pull request written in a way that is easy to read from a third-party perspective?
  • Is there sufficient information (background, purpose, specification, algorithm description, list of disruptive changes, and migration guide) in the description of this pull request?
  • If this pull request contains a destructive change, does this pull request contain the migration guide?
  • Labels of this pull request are valid?
  • All unit tests/integration tests are included in this pull request? If you think adding test cases is unnecessary, please describe why and cross out this line.
  • The documentation for this pull request is enough? If you think adding documents for this pull request is unnecessary, please describe why and cross out this line.

@xmfcx
Copy link
Copy Markdown
Contributor

xmfcx commented May 4, 2026

I can confirm in my local jazzy env, traffic_simulator fails to compile without this PR. ❌
And it successfully compiles with this PR. ✅

Not sure why the following check fails to catch this:
https://github.com/tier4/scenario_simulator_v2/actions/runs/25294961823

@HansRobo HansRobo added the bump patch If this pull request merged, bump patch version of the scenario_simulator_v2 label May 7, 2026
Copy link
Copy Markdown
Member

@HansRobo HansRobo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, waiting for CIs to pass.

@HansRobo HansRobo merged commit bd84f4e into tier4:master May 7, 2026
21 of 28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bump patch If this pull request merged, bump patch version of the scenario_simulator_v2

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants