fedora 24
obsolete weakness #276

1

Weakness Breakdown


Definition:

An obsolete weakness occurs when someone uses deprecated or obsolete functions when building a system. As a programming language evolves, some functions occasionally become obsolete.

Warning code(s):

This C routine is considered obsolete.

File Name:

Ardour-5.10.0/libs/surfaces/frontier/tranzport/tranzport_control_protocol.cc

Context:

The highlighted line of code below is the trigger point of this particular Fedora 24 obsolete weakness.

 

int
TranzportControlProtocol::set_active (bool yn)
{
	if (yn != _active) {

		if (yn) {

			if (open ()) {
				return -1;
			}

			if (pthread_create_and_store (X_("tranzport monitor"), &thread, 0, _monitor_work, this) == 0) {
				_active = true;
			} else {
				return -1;
			}

		} else {
			cerr << "Begin tranzport shutdown\n";
			screen_clear ();
			lcd_damage();
			lights_off ();
			for(int x = 0; x < 10 && flush(); x++) { usleep(1000); }
			pthread_cancel_one (thread);
			cerr << "Tranzport Thread dead\n";
			close ();
			_active = false;
			cerr << "End tranzport shutdown\n";
		}
	}

	return 0;
}

void
TranzportControlProtocol::show_track_gain ()
{
	if (route_table[0]) {
		gain_t g = route_get_gain (0);
		if ((g != last_track_gain) || lcd_isdamaged(0,9,8)) {
			char buf[16];
			snprintf (buf, sizeof (buf), "%6.1fdB", coefficient_to_dB (route_get_effective_gain (0)));
			print (0, 9, buf);
			last_track_gain = g;
		}
	} else {
		print (0, 9, "        ");
	} 

The registered trademark Linux® is used pursuant to a sublicense from the Linux Foundation, the exclusive licensee of Linus Torvalds, owner of the mark on a world­wide basis.