diff options
author | Robin Gareus <robin@gareus.org> | 2019-09-18 05:57:26 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2019-09-18 05:57:26 +0200 |
commit | 52021bc3ca1fe176cc32a0fcbc37b375a49d2bfc (patch) | |
tree | 039d099ee0e41afe00e659406a0a619b0f9fd5eb | |
parent | 60bce78c7e06676917c52dc0e62c2d92169d391e (diff) |
Consistent use of abort() /* NOTREACHED */
This fixes some static analysis warnings:
PBD::fatal transmitter needs to be connected to a function
that aborts. This is usually the case with GUI
-rw-r--r-- | libs/ardour/audiosource.cc | 2 | ||||
-rw-r--r-- | libs/ardour/disk_reader.cc | 4 | ||||
-rw-r--r-- | libs/ardour/session.cc | 2 | ||||
-rw-r--r-- | libs/ardour/transport_master_manager.cc | 2 | ||||
-rw-r--r-- | libs/pbd/debug.cc | 3 | ||||
-rw-r--r-- | libs/surfaces/mackie/gui.cc | 2 | ||||
-rw-r--r-- | libs/surfaces/us2400/gui.cc | 2 |
7 files changed, 8 insertions, 9 deletions
diff --git a/libs/ardour/audiosource.cc b/libs/ardour/audiosource.cc index 43cbcb7464..cd061ef0ef 100644 --- a/libs/ardour/audiosource.cc +++ b/libs/ardour/audiosource.cc @@ -396,7 +396,7 @@ AudioSource::read_peaks_with_fpp (PeakData *peaks, samplecnt_t npeaks, samplepos } if (statbuf.st_size < expected_file_size) { fatal << "peak file is still truncated after rebuild" << endmsg; - /*NOTREACHED*/ + abort (); /*NOTREACHED*/ } } } diff --git a/libs/ardour/disk_reader.cc b/libs/ardour/disk_reader.cc index 828019f28a..0128fb7e62 100644 --- a/libs/ardour/disk_reader.cc +++ b/libs/ardour/disk_reader.cc @@ -350,8 +350,8 @@ DiskReader::run (BufferSet& bufs, samplepos_t start_sample, samplepos_t end_samp internal_playback_seek (start_sample - playback_sample); } else { cerr << owner()->name() << " playback at " << speed << " not possible: ss = " << start_sample << " ps = " << playback_sample << endl; - abort (); // XXX -- now what? - /*NOTREACHED*/ + // XXX -- now what? + abort (); /*NOTREACHED*/ } } diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc index 6935150ab6..f96f59e516 100644 --- a/libs/ardour/session.cc +++ b/libs/ardour/session.cc @@ -3345,7 +3345,7 @@ Session::new_route_from_template (uint32_t how_many, PresentationInfo::order_t i if (!find_route_name (name_base.c_str(), ++number, name, (being_added > 1))) { fatal << _("Session: UINT_MAX routes? impossible!") << endmsg; - /*NOTREACHED*/ + abort(); /*NOTREACHED*/ } } else { diff --git a/libs/ardour/transport_master_manager.cc b/libs/ardour/transport_master_manager.cc index 93db2113ee..66c99db8e9 100644 --- a/libs/ardour/transport_master_manager.cc +++ b/libs/ardour/transport_master_manager.cc @@ -133,7 +133,7 @@ TransportMasterManager::instance() { if (!_instance) { fatal << string_compose (_("programming error:%1"), X_("TransportMasterManager::instance() called without an instance!")) << endmsg; - /* NOTREACHED */ + abort (); /* NOTREACHED */ } return *_instance; } diff --git a/libs/pbd/debug.cc b/libs/pbd/debug.cc index 1c28b86b5d..39fa600899 100644 --- a/libs/pbd/debug.cc +++ b/libs/pbd/debug.cc @@ -87,8 +87,7 @@ PBD::new_debug_bit (const char* name) if (_debug_bit >= debug_bits.size()) { cerr << "Too many debug bits defined, offender was " << name << endl; - abort (); - /*NOTREACHED*/ + abort (); /*NOTREACHED*/ } ret.set (_debug_bit++, 1); diff --git a/libs/surfaces/mackie/gui.cc b/libs/surfaces/mackie/gui.cc index 7209ef93f9..74e314b2e7 100644 --- a/libs/surfaces/mackie/gui.cc +++ b/libs/surfaces/mackie/gui.cc @@ -371,7 +371,7 @@ MackieControlProtocolGUI::device_dependent_widget () if (!surface) { PBD::fatal << string_compose (_("programming error: %1\n"), string_compose ("n=%1 surface not found!", n)) << endmsg; - /*NOTREACHED*/ + abort (); /*NOTREACHED*/ } Gtk::ComboBox* input_combo = manage (new Gtk::ComboBox); diff --git a/libs/surfaces/us2400/gui.cc b/libs/surfaces/us2400/gui.cc index 3ef7923286..6fe51c9988 100644 --- a/libs/surfaces/us2400/gui.cc +++ b/libs/surfaces/us2400/gui.cc @@ -275,7 +275,7 @@ US2400ProtocolGUI::device_dependent_widget () if (!surface) { PBD::fatal << string_compose (_("programming error: %1\n"), string_compose ("n=%1 surface not found!", n)) << endmsg; - /*NOTREACHED*/ + abort (); /*NOTREACHED*/ } Gtk::ComboBox* input_combo = manage (new Gtk::ComboBox); |