alpine 3.6
obsolete weakness #70

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:

xf86-video-i128/src/xf86-video-i128-1.3.6/src/i128init.c

Context:

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

 			/* no break */
		default:
			pI128->mem.rbase_w[MW0_SZ]   = 0x0000000A;/* default 4MB */
			break;
	}
	pI128->mem.rbase_w[MW0_PGE]  = 0x00000000;
	pI128->mem.rbase_w[MW0_ORG]  = 0x00000000;
	pI128->mem.rbase_w[MW0_MSRC] = 0x00000000;
	pI128->mem.rbase_w[MW0_WKEY] = 0x00000000;
	pI128->mem.rbase_w[MW0_KDAT] = 0x00000000;
	pI128->mem.rbase_w[MW0_MASK] = 0xFFFFFFFF;
									MB;

	if ((pI128->io.id&0x7) > 0 || pI128->Chipset == PCI_CHIP_I128_T2R
			        || pI128->Chipset == PCI_CHIP_I128_T2R4) {

	   	pI128->io.vga_ctl &= 0x0000FF00;
   		pI128->io.vga_ctl |= 0x00000082;
                if (pI128->FlatPanel && (mode->Flags & V_DBLSCAN))
		   pI128->io.vga_ctl |= 0x00000020;  /* Stretch horizontally */
   		outl(iR->iobase + 0x30, pI128->io.vga_ctl);

                if (pI128->Chipset == PCI_CHIP_I128_T2R4) {
                        outl(iR->iobase + 0x24, 0x211BF030);
			usleep(5000);
			outl(iR->iobase + 0x24, 0xA11BF030);
		} else if (pI128->MemoryType == I128_MEMORY_SGRAM) {
			outl(iR->iobase + 0x24, 0x21089030);
			usleep(5000);
			outl(iR->iobase + 0x24, 0xA1089030);
		}
	}

	ret = pI128->ProgramDAC(pScrn, mode);

	pI128->InitCursorFlag = TRUE;
	pI128->Initialized = 1;

        if (pI128->Debug)
        	xf86DrvMsg(pScrn->scrnIndex, X_PROBED, "I128Init complete\n");

	return(ret);
}


static void
I128SavePalette(I128Ptr pI128)
{
   short 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.