From 6b3a8915f3c50f7220121fcb9202ec20144389c4 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Fri, 14 Nov 2014 10:47:43 +0100 Subject: add abort() to non-reached code MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This cleans up a lot of false-positives in static analysis and also helps compilers to optimize code paths in general. (tagging the fatal stingstream operator as ‘noreturn’ is far less trivial) --- gtk2_ardour/route_time_axis.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'gtk2_ardour/route_time_axis.cc') diff --git a/gtk2_ardour/route_time_axis.cc b/gtk2_ardour/route_time_axis.cc index 31c2eb1712..c4d49e40b9 100644 --- a/gtk2_ardour/route_time_axis.cc +++ b/gtk2_ardour/route_time_axis.cc @@ -2015,7 +2015,7 @@ RouteTimeAxisView::add_processor_automation_curve (boost::shared_ptr << string_compose (X_("processor automation curve for %1:%2/%3/%4 not registered with track!"), processor->name(), what.type(), (int) what.channel(), what.id() ) << endmsg; - /*NOTREACHED*/ + abort(); /*NOTREACHED*/ return; } @@ -2481,7 +2481,7 @@ RouteTimeAxisView::add_underlay (StreamView* v, bool /*update_xml*/) if (find(_underlay_streams.begin(), _underlay_streams.end(), v) == _underlay_streams.end()) { if (find(other._underlay_mirrors.begin(), other._underlay_mirrors.end(), this) != other._underlay_mirrors.end()) { fatal << _("programming error: underlay reference pointer pairs are inconsistent!") << endmsg; - /*NOTREACHED*/ + abort(); /*NOTREACHED*/ } _underlay_streams.push_back(v); @@ -2518,7 +2518,7 @@ RouteTimeAxisView::remove_underlay (StreamView* v) if (gm == other._underlay_mirrors.end()) { fatal << _("programming error: underlay reference pointer pairs are inconsistent!") << endmsg; - /*NOTREACHED*/ + abort(); /*NOTREACHED*/ } v->foreach_regionview(sigc::mem_fun(*this, &RouteTimeAxisView::remove_ghost)); -- cgit v1.2.3