Bug 677623

Summary: hw/dmx/dmxgc.c:dmxChangeClip(): size of clientClipType
Product: [Fedora] Fedora Reporter: Sami Farin <hvtaifwkbgefbaei>
Component: xorg-x11-serverAssignee: Kevin E. Martin <kem>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: xgl-maint
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-02-15 15:27:35 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Sami Farin 2011-02-15 11:45:33 UTC
Description of problem:
you are overconfident about the size of those two bits ;)

    unsigned int        clientClipType : 2; /* CT_<kind> */
    switch (pGC->clientClipType) {
    case CT_UNSORTED:
#define CT_UNSORTED             6

Version-Release number of selected component (if applicable):
1.9.99.1-4

How reproducible:
100%

Steps to Reproduce:
1. .
2.
3.
  
Actual results:
6 is bigger than 3

Expected results:
who knows?  I didn't code it

Additional info:
.

Comment 1 Kevin E. Martin 2011-02-15 15:27:35 UTC
Read the comment further down in the dmxgc.c code...

    case CT_PIXMAP:
    case CT_UNSORTED:
    case CT_YSORTED:
    case CT_YXSORTED:
    case CT_YXBANDED:
        /* These clip types are condensed down to either NONE or REGION
           in the mi code */

The other types are converted to CT_NONE or CT_REGION in the miregion.c code (via the call to pGC->funcs->ChangeClip), so the only types that are actually ever assigned to pGC->clientClipType are CT_NONE and CT_REGION and the other cases in this switch are just there to acknowledge that fact, but can never actually occur.