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/pbd | |
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/pbd')
-rw-r--r-- | libs/pbd/pool.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libs/pbd/pool.cc b/libs/pbd/pool.cc index cdcd9abdd7..234dfaeb18 100644 --- a/libs/pbd/pool.cc +++ b/libs/pbd/pool.cc @@ -70,7 +70,7 @@ Pool::alloc () if (free_list.read (&ptr, 1) < 1) { fatal << "CRITICAL: " << _name << " POOL OUT OF MEMORY - RECOMPILE WITH LARGER SIZE!!" << endmsg; - /*NOTREACHED*/ + abort(); /*NOTREACHED*/ return 0; } else { return ptr; @@ -184,7 +184,7 @@ PerThreadPool::per_thread_pool () CrossThreadPool* p = _key.get(); if (!p) { fatal << "programming error: no per-thread pool \"" << _name << "\" for thread " << pthread_name() << endmsg; - /*NOTREACHED*/ + abort(); /*NOTREACHED*/ } return p; } |