fedora 24
obsolete weakness #281

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_select_observer.cc

Context:

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

 	text_with_id ("/select/send_name" , id, string_compose ("%1%2%3", std::fixed, std::setprecision(2), db));
	if (send_timeout.size() > id) {
		send_timeout[id] = 8;
	}
	} else {
		path = "/select/send_gain";
		value = db;
	}

	if (feedback[2]) {
		path = set_path (path, id);
	} else {
		lo_message_add_int32 (msg, id);
	}

	lo_message_add_float (msg, value);
	lo_send_message (addr, path.c_str(), msg);
	lo_message_free (msg);
}

void
OSCSelectObserver::send_enable (string path, uint32_t id, boost::shared_ptr<Processor> proc)
{
	// with no delay value is wrong
	Glib::usleep(10);

	send_float_with_id ("/select/send_enable", id, proc->enabled());
}

void
OSCSelectObserver::text_with_id (string path, uint32_t id, string name)
{
	lo_message msg = lo_message_new ();
	if (feedback[2]) {
		path = set_path (path, id);
	} else {
		lo_message_add_int32 (msg, id);
	}

	lo_message_add_string (msg, name.c_str());

	lo_send_message (addr, path.c_str(), msg);
	lo_message_free (msg);
}

void
OSCSelectObserver::comp_mode ()
{
	change_message ("/select/comp_mode", _strip->comp_mode_controllable());
	text_message ("/select/comp_mode_name", _strip->comp_mode_name(_strip->comp_mode_controllable()->get_value())); 

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.