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 /gtk2_ardour/editor_actions.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 'gtk2_ardour/editor_actions.cc')
-rw-r--r-- | gtk2_ardour/editor_actions.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gtk2_ardour/editor_actions.cc b/gtk2_ardour/editor_actions.cc index d16105987a..e8125ef593 100644 --- a/gtk2_ardour/editor_actions.cc +++ b/gtk2_ardour/editor_actions.cc @@ -1081,7 +1081,7 @@ Editor::snap_type_action (SnapType type) break; default: fatal << string_compose (_("programming error: %1: %2"), "Editor: impossible snap-to type", (int) type) << endmsg; - /*NOTREACHED*/ + abort(); /*NOTREACHED*/ } act = ActionManager::get_action (X_("Snap"), action); @@ -1477,7 +1477,7 @@ Editor::snap_mode_action (SnapMode mode) break; default: fatal << string_compose (_("programming error: %1: %2"), "Editor: impossible snap mode type", (int) mode) << endmsg; - /*NOTREACHED*/ + abort(); /*NOTREACHED*/ } act = ActionManager::get_action (X_("Editor"), action); @@ -1541,7 +1541,7 @@ Editor::edit_point_action (EditPoint ep) break; default: fatal << string_compose (_("programming error: %1: %2"), "Editor: impossible edit point type", (int) ep) << endmsg; - /*NOTREACHED*/ + abort(); /*NOTREACHED*/ } act = ActionManager::get_action (X_("Editor"), action); @@ -1599,7 +1599,7 @@ Editor::zoom_focus_action (ZoomFocus focus) break; default: fatal << string_compose (_("programming error: %1: %2"), "Editor: impossible focus type", (int) focus) << endmsg; - /*NOTREACHED*/ + abort(); /*NOTREACHED*/ } act = ActionManager::get_action (X_("Zoom"), action); |