fedora 24
obsolete weakness #285

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/tools/luadevel/luasession.cc

Context:

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

 
static int set_debug_options (const char *opts)
{
	return PBD::parse_debug_options (opts);
}

static void close_session ()
{
	delete session;
	assert (!session);
}

static int close_session_lua (lua_State *L)
{
	if (!session) {
		cerr << "No open session" << "\n";
		return 0;
	}
	close_session ();
	return 0;
}

static void delay (float d) {
	if (d > 0) {
		Glib::usleep (d * 1000000);
	}
}

static int do_quit (lua_State *L)
{
	keep_running = false;
	return 0;
}

/* ****************************************************************************/

static void my_lua_print (std::string s) {
	std::cout << s << "\n";
}

static void setup_lua ()
{
	assert (!lua);

	lua = new LuaState ();
	lua->Print.connect (&my_lua_print);
	lua_State* L = lua->getState ();

	LuaBindings::stddef (L);
	LuaBindings::common (L); 

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.