Bug 101030 - bad source code
Summary: bad source code
Status: CLOSED DUPLICATE of bug 110819
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: gimp   
(Show other bugs)
Version: 9
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Matt Wilson
QA Contact: David Lawrence
Depends On:
TreeView+ depends on / blocked
Reported: 2003-07-28 18:44 UTC by d.binderman
Modified: 2007-04-18 16:56 UTC (History)
0 users

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

Attachments (Terms of Use)

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:
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.

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