Bug 144798

Summary: libgdiplus-1.1.13-2: undefined code
Product: [openSUSE] SUSE LINUX 10.0 Reporter: David Binderman <dcb314>
Component: MonoAssignee: Peter Bartok <pbartok>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Minor    
Priority: P5 - None    
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: SUSE Other   
Whiteboard:
Found By: Other Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description David Binderman 2006-01-23 14:57:33 UTC
I just tried to compile package libgdiplus-1.1.13-2 with a prerelease of
the GNU C compiler version 4.2.

It said

testbits.c:101: warning: operation on "cptr" may be undefined

The source code is

        for (i = 0; i < 5; i++) {
            printf ("%02x%02x%02x ", *cptr++, *cptr++, *cptr++);
        }

I agree with the compiler.  Suggest new code

        for (i = 0; i < 5; i++) {
            printf ("%02x%02x%02x ", cptr[ 0], cptr[ 1], cptr[ 2]);
            cptr += 3;
        }
Comment 1 Wade Berrier 2006-02-16 18:10:46 UTC
Assigning to libgdiplus developer...  seems like a difference in style?
Comment 2 Peter Bartok 2006-02-28 21:45:11 UTC
Thanks for the report.
Fixed in svn head. Wade will copy to 1.1.13 branch and tag as 1.1.13.4.