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_tempodisplay.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_tempodisplay.cc')
-rw-r--r-- | gtk2_ardour/editor_tempodisplay.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gtk2_ardour/editor_tempodisplay.cc b/gtk2_ardour/editor_tempodisplay.cc index fec380ee35..daf36d2d72 100644 --- a/gtk2_ardour/editor_tempodisplay.cc +++ b/gtk2_ardour/editor_tempodisplay.cc @@ -271,12 +271,12 @@ Editor::remove_tempo_marker (ArdourCanvas::Item* item) if ((marker = reinterpret_cast<Marker *> (item->get_data ("marker"))) == 0) { fatal << _("programming error: tempo marker canvas item has no marker object pointer!") << endmsg; - /*NOTREACHED*/ + abort(); /*NOTREACHED*/ } if ((tempo_marker = dynamic_cast<TempoMarker*> (marker)) == 0) { fatal << _("programming error: marker for tempo is not a tempo marker!") << endmsg; - /*NOTREACHED*/ + abort(); /*NOTREACHED*/ } if (tempo_marker->tempo().movable()) { @@ -375,12 +375,12 @@ Editor::remove_meter_marker (ArdourCanvas::Item* item) if ((marker = reinterpret_cast<Marker *> (item->get_data ("marker"))) == 0) { fatal << _("programming error: meter marker canvas item has no marker object pointer!") << endmsg; - /*NOTREACHED*/ + abort(); /*NOTREACHED*/ } if ((meter_marker = dynamic_cast<MeterMarker*> (marker)) == 0) { fatal << _("programming error: marker for meter is not a meter marker!") << endmsg; - /*NOTREACHED*/ + abort(); /*NOTREACHED*/ } if (meter_marker->meter().movable()) { |