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/sndfilesource.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libs/ardour/sndfilesource.cc') diff --git a/libs/ardour/sndfilesource.cc b/libs/ardour/sndfilesource.cc index 58fbab233b..5f1b31c640 100644 --- a/libs/ardour/sndfilesource.cc +++ b/libs/ardour/sndfilesource.cc @@ -152,7 +152,7 @@ SndFileSource::SndFileSource (Session& s, const string& path, const string& orig default: fatal << string_compose (_("programming error: %1"), X_("unsupported audio header format requested")) << endmsg; - /*NOTREACHED*/ + abort(); /*NOTREACHED*/ break; } @@ -459,7 +459,7 @@ SndFileSource::nondestructive_write_unlocked (Sample *data, framecnt_t cnt) if (_info.channels != 1) { fatal << string_compose (_("programming error: %1 %2"), X_("SndFileSource::write called on non-mono file"), _path) << endmsg; - /*NOTREACHED*/ + abort(); /*NOTREACHED*/ return 0; } -- cgit v1.2.3