Skip to content

Commit 3d14eb5

Browse files
committed
fix(planning_data_analyzer): avoid GCC 13 false-positive stringop-overread in test
Use a named variable instead of an initializer list temporary when calling set_evaluation_horizons() to prevent GCC 13 from emitting a spurious -Wstringop-overread warning during deep inlining of vector operations. Signed-off-by: Mete Fatih Cırıt <mfc@autoware.org>
1 parent ddc17c6 commit 3d14eb5

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

planning/autoware_planning_data_analyzer/test/test_open_loop_gt_source_mode.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,8 @@ TEST_F(OpenLoopGTSourceModeTest, HeadingMetricsUseWrappedYawErrorPerHorizon)
325325
OpenLoopEvaluator evaluator(
326326
rclcpp::get_logger("open_loop_gt_source_test"), nullptr,
327327
OpenLoopEvaluator::GTSourceMode::GT_TRAJECTORY, 200.0);
328-
evaluator.set_evaluation_horizons({0.2});
328+
const std::vector<double> horizons = {0.2};
329+
evaluator.set_evaluation_horizons(horizons);
329330

330331
evaluator.evaluate(sync_data_list, nullptr);
331332
const auto metrics = evaluator.get_metrics();

0 commit comments

Comments
 (0)