diff options
author | Robin Gareus <robin@gareus.org> | 2014-11-14 10:47:43 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2014-11-14 11:30:08 +0100 |
commit | 6b3a8915f3c50f7220121fcb9202ec20144389c4 (patch) | |
tree | 08e7ae373859e5ca15b8fa0ca075b18b65915a22 /libs/ardour/sndfilesource.cc | |
parent | 5d5d9cb9e262498dc0831dc362fbcb3f92bcdb9f (diff) |
add abort() to non-reached code
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)
Diffstat (limited to 'libs/ardour/sndfilesource.cc')
-rw-r--r-- | libs/ardour/sndfilesource.cc | 4 |
1 files changed, 2 insertions, 2 deletions
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; } |