fedora 24
obsolete weakness #280

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/osc/osc.cc

Context:

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

 }

void
OSC::gui_selection_changed ()
{
	boost::shared_ptr<Stripable> strip = ControlProtocol::first_selected_stripable();

	if (strip) {
		_select = strip;
		for (uint32_t it = 0; it < _surface.size(); ++it) {
			OSCSurface* sur = &_surface[it];
			if(!sur->expand_enable) {
				lo_address addr = lo_address_new_from_url (sur->remote_url.c_str());
				_strip_select (strip, addr);
			}
		}
	}
}

// timer callbacks
bool
OSC::periodic (void)
{
	if (!tick) {
		Glib::usleep(100); // let flurry of signals subside
		if (global_init) {
			for (uint32_t it = 0; it < _surface.size(); it++) {
				OSCSurface* sur = &_surface[it];
				lo_address addr = lo_address_new_from_url (sur->remote_url.c_str());
				global_feedback (sur->feedback, addr, sur->gainmode);
			}
			global_init = false;
			tick = true;
		}
		if (bank_dirty) {
			_recalcbanks ();
			bank_dirty = false;
			tick = true;
		}
	}

	if (scrub_speed != 0) {
		// for those jog wheels that don't have 0 on release (touch), time out.
		int64_t now = ARDOUR::get_microseconds ();
		int64_t diff = now - scrub_time;
		if (diff > 120000) {
			scrub_speed = 0;
			session->request_transport_speed (0);
			// locate to the place PH was at last tick
			session->request_locate (scrub_place, false); 

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.