Bug 67095

Summary: sis_dac.c:1528: bad switch statement ?
Product: xorg Reporter: dcb314
Component: Driver/SiSAssignee: Xorg Project Team <xorg-team>
Status: RESOLVED MOVED QA Contact: Xorg Project Team <xorg-team>
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:

Description dcb314 2013-07-19 17:48:38 UTC
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.
Comment 1 GitLab Migration User 2018-08-10 20:47:47 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/xorg/driver/xf86-video-sis/issues/13.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.