summaryrefslogtreecommitdiff
path: root/libs/gtkmm2ext
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2014-11-14 10:47:43 +0100
committerRobin Gareus <robin@gareus.org>2014-11-14 11:30:08 +0100
commit6b3a8915f3c50f7220121fcb9202ec20144389c4 (patch)
tree08e7ae373859e5ca15b8fa0ca075b18b65915a22 /libs/gtkmm2ext
parent5d5d9cb9e262498dc0831dc362fbcb3f92bcdb9f (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/gtkmm2ext')
-rw-r--r--libs/gtkmm2ext/actions.cc2
-rw-r--r--libs/gtkmm2ext/gtk_ui.cc2
2 files changed, 2 insertions, 2 deletions
diff --git a/libs/gtkmm2ext/actions.cc b/libs/gtkmm2ext/actions.cc
index 5f853b0170..666ac29c5c 100644
--- a/libs/gtkmm2ext/actions.cc
+++ b/libs/gtkmm2ext/actions.cc
@@ -490,7 +490,7 @@ ActionManager::set_toggleaction_state (string n, bool s)
if (last_slash == 0) {
fatal << string_compose ("programmer error: %1 %2", "illegal toggle action name", name) << endmsg;
- /*NOTREACHED*/
+ abort(); /*NOTREACHED*/
return;
}
diff --git a/libs/gtkmm2ext/gtk_ui.cc b/libs/gtkmm2ext/gtk_ui.cc
index 6a490e1bb0..df7ec96324 100644
--- a/libs/gtkmm2ext/gtk_ui.cc
+++ b/libs/gtkmm2ext/gtk_ui.cc
@@ -81,7 +81,7 @@ UI::UI (string namestr, int *argc, char ***argv)
theGtkUI = this;
} else {
fatal << "duplicate UI requested" << endmsg;
- /* NOTREACHED */
+ abort(); /* NOTREACHED */
}
/* the GUI event loop runs in the main thread of the app,