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
This commit is contained in:
Robin Gareus 2019-09-18 05:57:26 +02:00
parent 60bce78c7e
commit 52021bc3ca
No known key found for this signature in database
GPG key ID: A090BCE02CF57F04
7 changed files with 8 additions and 9 deletions

View file

@ -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*/
}
}
}

View file

@ -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*/
}
}

View file

@ -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 {

View file

@ -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;
}

View file

@ -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);

View file

@ -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);

View file

@ -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);