From 347dc8cec579715d67c6c35b504c1652687fbdee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraj=20Or=C5=A1uli=C4=87?= Date: Tue, 25 Jul 2017 17:39:49 +0200 Subject: [PATCH] Fix debug build (#418) Add a fake return value after LOG(FATAL) in HybridGridPointsProcessor::Flush(). This keeps gcc versions lower than 7 happy when building without optimisation (i.e. debug build). Fixes #412. --- cartographer/io/hybrid_grid_points_processor.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cartographer/io/hybrid_grid_points_processor.cc b/cartographer/io/hybrid_grid_points_processor.cc index 59c8415..708f789 100644 --- a/cartographer/io/hybrid_grid_points_processor.cc +++ b/cartographer/io/hybrid_grid_points_processor.cc @@ -61,6 +61,9 @@ PointsProcessor::FlushResult HybridGridPointsProcessor::Flush() { return FlushResult::kFinished; } LOG(FATAL) << "Failed to receive FlushResult::kFinished"; + // The following unreachable return statement is needed to avoid a GCC bug + // described at https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81508 + return FlushResult::kFinished; } } // namespace io