Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 101030 - bad source code
bad source code
Status: CLOSED DUPLICATE of bug 110819
Product: Red Hat Linux
Classification: Retired
Component: gimp (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Matt Wilson
David Lawrence
Depends On:
  Show dependency treegraph
Reported: 2003-07-28 14:44 EDT by d.binderman
Modified: 2007-04-18 12:56 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-02-21 13:57:48 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description d.binderman 2003-07-28 14:44:51 EDT
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:
Actual results:

Expected results:

Additional info:
Comment 1 Miloslav Trmac 2004-02-20 10:08:14 EST

*** This bug has been marked as a duplicate of 110819 ***
Comment 2 Red Hat Bugzilla 2006-02-21 13:57:48 EST
Changed to 'CLOSED' state since 'RESOLVED' has been deprecated.

Note You need to log in before you can comment on or make changes to this bug.