Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 101030

Summary: bad source code
Product: [Retired] Red Hat Linux Reporter: d.binderman
Component: gimpAssignee: Matt Wilson <msw>
Status: CLOSED DUPLICATE QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: 9   
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 18:57:48 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-07-28 18:44:51 UTC
Description of problem:
Hello there,

I have just tried to compile package gimp-1.2.3-16 from Redhat 9.0
with compiler flag -Wall

The compiler says

paint_funcs.c:994: warning: operation on `tmp' may be undefined
paint_funcs.c:994: warning: operation on `tmp' may be undefined

The source code is

          dest[b] = INT_MULT(src1[b], src1[b] + INT_MULT(2 * src2[b],
                                                         255 - src1[b],
                                                         tmp), tmp);

You might be better off with something like this

    const int tmp2 = INT_MULT(2 * src2[b], 255 - src1[b], tmp);
    dest[b] = INT_MULT(src1[b], src1[b] + tmp2, tmp);



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


How reproducible:


Steps to Reproduce:
1.
2.
3.
    
Actual results:


Expected results:


Additional info:

Comment 1 Miloslav Trmac 2004-02-20 15:08:14 UTC

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

Comment 2 Red Hat Bugzilla 2006-02-21 18:57:48 UTC
Changed to 'CLOSED' state since 'RESOLVED' has been deprecated.