Bug 110819 - bad source code
bad source code
Product: Fedora
Classification: Fedora
Component: gimp (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Nils Philippsen
David Lawrence
: 101030 (view as bug list)
Depends On:
  Show dependency treegraph
Reported: 2003-11-24 11:59 EST by d.binderman
Modified: 2007-11-30 17:10 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-02-21 12:18:53 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-11-24 11:59:56 EST
Description of problem:

I just tried to compile package gimp-1_2_3-20_2 from Fedora.

The compiler said


paint_funcs.c:992: warning: operation on `tmp' may be undefined
paint_funcs.c:992: 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
                                                         tmp), tmp);
You might be better off with code

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

	dest[b] = INT_MULT(src1[b], src1[b] + tmp2, tmp);


The compiler also said

Lib.c(2893): remark #592: variable "RETVAL" is used before its value 
is set

The source code is

        SV *    RETVAL;
#line 2186 "Lib.xs"
        need_pdl ();
        croak (__("gimp_tile_get_data is not yet implemented\n"));
        gimp_tile_ref (tile);
        gimp_tile_unref (tile, 0);
#line 2893 "Lib.c"
        ST(0) = RETVAL;

I agree with the compiler. RETVAL needs to be initialised before use.


The compiler said

gap_filter_codegen.c(229): warning #192: unrecognized character 
escape sequence

The source code is

       fprintf(l_fp, "      fprintf(stderr, \"ERROR: p_\%s_iter_ALT  
stored Data missmatch in size %%d != %%d\\n\",   \n", 

%%d isn't a valid specifier. Maybe you mean %d or %%%d ?


The compiler said

gap_filter_codegen.c(590): warning #192: unrecognized character 
escape sequence

Same problem as #3.

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:16 EST
*** Bug 101030 has been marked as a duplicate of this bug. ***
Comment 2 Nils Philippsen 2004-02-21 11:25:55 EST
We will have gimp 2.0 (or 2.0pre) in Fedora Core 2. You should take
your issues with the source code to upstream (http://developer.gimp.org).

Also, please use individual bugzilla entries for each problem in the
Comment 3 Nils Philippsen 2004-02-21 12:18:53 EST
Should be CLOSED UPSTREAM actually.

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