Bug 67095 - sis_dac.c:1528: bad switch statement ?
Summary: sis_dac.c:1528: bad switch statement ?
Status: RESOLVED MOVED
Alias: None
Product: xorg
Classification: Unclassified
Component: Driver/SiS (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Xorg Project Team
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-07-19 17:48 UTC by dcb314
Modified: 2018-08-10 20:47 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

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.