alpine 3.7
obsolete weakness #16

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:

umix/src/umix-1.0.2/src/umix.c

Context:

The highlighted line of code below is the trigger point of this particular Alpine 3.7 obsolete weakness.

 	"\nThis is free software; see the source for copying conditions. " 
	"There is NO\nwarranty; not even for MERCHANTABILITY or FITNESS FOR A" 
	" PARTICULAR PURPOSE.\n"), UMIX_VERSION_STR);
}

#ifdef UMIX_DEBUG
/* tests most of the functions available, and shows how to do things */
static int test(int mode)
{
	int i;
	int j;
	volume orig_vol;

	if (init_mixers() == -1)
	{
		err_msg(_("Failed initializing mixer devices"));
		return -1;
	}
	
	/* update check test */
	if (mode == 1)
	{
		while (1)
		{
			usleep(250000);
			if (mixer_get_status() == 1)
			{
				err_msg("mixer has been updated!");
				printlevels();
				chan_set_curr(0);
			}
		}

		mixer_close();
		return 0;
	}

	printf("Total number of mixers = %d\n", mixer_get_num_mix());
	for (j=0; j<mixer_get_num_mix(); j++)
	{
		printf("Mixer #%d information\n", mixer_get_curr());
		printf("numchan = %d\n", mixer_get_num_chan());
		printf("name    = %s\n", mixer_get_name());
		printf("path    = %s\n", mixer_get_path());
		printf("driver  = %s\n", mixer_get_driver());

		printf("num name       label      lt  rt   s r a m\n");
		for (i=0; i<mixer_get_num_chan(); i++)
		{
			chan_set_curr(i); 

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.