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) --- libs/ardour/delivery.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'libs/ardour/delivery.cc') diff --git a/libs/ardour/delivery.cc b/libs/ardour/delivery.cc index 30f7ef63fa..f7d679d3ba 100644 --- a/libs/ardour/delivery.cc +++ b/libs/ardour/delivery.cc @@ -148,7 +148,7 @@ Delivery::can_support_io_configuration (const ChanCount& in, ChanCount& out) } } else { fatal << "programming error: this should never be reached" << endmsg; - /*NOTREACHED*/ + abort(); /*NOTREACHED*/ } @@ -169,7 +169,7 @@ Delivery::can_support_io_configuration (const ChanCount& in, ChanCount& out) } } else { fatal << "programming error: this should never be reached" << endmsg; - /*NOTREACHED*/ + abort(); /*NOTREACHED*/ } } else { @@ -210,7 +210,7 @@ Delivery::configure_io (ChanCount in, ChanCount out) if (_input->n_ports() != in) { if (_input->n_ports() != ChanCount::ZERO) { fatal << _name << " programming error: configure_io called with " << in << " and " << out << " with " << _input->n_ports() << " input ports" << endmsg; - /*NOTREACHED*/ + abort(); /*NOTREACHED*/ } else { /* I/O not yet configured */ } -- cgit v1.2.3