sis_dac.c:1528: bad switch statement ?
Submitted by dcb..@..il.com
Assigned to Xorg Project Team
Description
I just ran the static analysis checker "cppcheck" over the source code of the Redhat Fedora package xorg-x11-drv-sis
It said
xorg-x11-drv-sis.spec.out:[sis_dac.c:1528] -> [sis_dac.c: 1532]: (warning) Variable 'max' is reassigned a value before the old one has bee n used. 'break;' missing?
Source code is
case PCI_CHIP_SIS660:
if((pSiS->ChipType >= SIS_660) &&
(pSiS->ChipFlags & SiSCF_760LFB)) {
magic = magicDED[bus/64];
} else {
magic = magicINT[bus/64];
}
max = 680000;
case PCI_CHIP_SIS340:
case PCI_CHIP_XGIXG40:
magic = magicDED[bus/64];
max = 800000;
break;
Suggest add case statement to first case.