Bug 110809

Summary: bad source code
Product: [Fedora] Fedora Reporter: d.binderman
Component: gthumbAssignee: Christopher Aillon <caillon>
Status: CLOSED DUPLICATE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 1CC: d.binderman
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-02-21 19:00:09 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description d.binderman 2003-11-24 16:36:45 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows 98)

Description of problem:

I just tried to compile package gthumb-2_0_2-1 from Fedora 

The compiler said

1.

preferences.c:351: warning: operation on `i' may be undefined
preferences.c:352: warning: operation on `i' may be undefined
preferences.c:353: warning: operation on `i' may be undefined

The source code is

        *r = dec (hex[i++]) * 16 + dec (hex[i++]);
        *g = dec (hex[i++]) * 16 + dec (hex[i++]);
        *b = dec (hex[i++]) * 16 + dec (hex[i++]);

Clearly wrong. Better source code is

        *r = dec (hex[ i]) * 16 + dec (hex[ i + 1]);
        *g = dec (hex[ i + 2]) * 16 + dec (hex[ i + 3]);
        *b = dec (hex[ i + 4]) * 16 + dec (hex[ i + 5]);

2.

preferences.c:397: warning: operation on `i' may be undefined
preferences.c:398: warning: operation on `i' may be undefined
preferences.c:399: warning: operation on `i' may be undefined

Same problem as above. 


Version-Release number of selected component (if applicable):
gthumb-2_0_2-1 

How reproducible:
Always

Steps to Reproduce:
1. compile the program with compiler flag -Wall.
2.
3.
    

Additional info:

Comment 1 Havoc Pennington 2003-11-24 22:16:53 UTC
Compiler warnings like this should really be filed with the upstream
developers (in this case bugzilla.gnome.org) since they need to be
fixed in the master copy of the source code, not in Red Hat patches.

Comment 2 d.binderman 2003-11-25 12:15:41 UTC
>Compiler warnings like this should really be filed with the upstream
>developers (in this case bugzilla.gnome.org)

I tried the website you suggsted, and couldn't get access it.

Could I ask you to submit this bug for me, please ?

Comment 3 d.binderman 2003-11-25 12:16:24 UTC
>Compiler warnings like this should really be filed with the upstream
>developers (in this case bugzilla.gnome.org)

I tried the website you suggsted, and couldn't get access it.

Could I ask you to submit this bug for me, please ?

Comment 4 Christopher Aillon 2004-08-26 05:50:40 UTC

*** This bug has been marked as a duplicate of 101037 ***

Comment 5 Red Hat Bugzilla 2006-02-21 19:00:09 UTC
Changed to 'CLOSED' state since 'RESOLVED' has been deprecated.