Bug 80670 - bad source code
Summary: bad source code
Status: CLOSED UPSTREAM
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: gimp   
(Show other bugs)
Version: 8.0
Hardware: All Linux
medium
medium
Target Milestone: ---
Assignee: Nils Philippsen
QA Contact: David Lawrence
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-12-29 17:21 UTC by d.binderman
Modified: 2007-04-18 16:49 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-02-21 17:21:20 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

Description d.binderman 2002-12-29 17:21:33 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.6 [en-gb]C-CCK-MCD NetscapeOnline.co.uk  (Win98; I)

Description of problem:

Hello there,

I have just tried to compile package gimp-1.2.3-9 from Redhat 8.0

I got the following message from the compiler.

cc: Warning: imap_preview.c, line 167: In the initializer for avg, the expression "(299**colour+++587**colour+++114**colour++)/1000" modifies the 
variable "colour" more than once without an intervening sequence point.  This behavior is undefined. (undefvarmod)

Here is an untested patch to shut up the compiler.

./plug-ins/imagemap/imap_preview.c.old ./plug-ins/imagemap/imap_preview.c
*** ./plug-ins/imagemap/imap_preview.c.old	Sun Dec 15 09:25:53 2002
--- ./plug-ins/imagemap/imap_preview.c	Sun Dec 15 09:26:34 2002
***************
*** 164,171 ****
  	 colour = cmap + 3 * (int)(*src);
  
  	 if (gray) {
! 	    guchar avg = (299 * *colour++ + 587 * *colour++ +
! 			  114 * *colour++) / 1000;
  	    *dest++ = avg;
  	    *dest++ = avg;
  	    *dest++ = avg;
--- 164,172 ----
  	 colour = cmap + 3 * (int)(*src);
  
  	 if (gray) {
! 	    guchar avg = (299 * colour[ 0] + 587 * colour[ 1] +
! 			  114 * colour[ 2]) / 1000;
! 	    colour += 3;
  	    *dest++ = avg;
  	    *dest++ = avg;
  	    *dest++ = avg;


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


How reproducible:
Always

Steps to Reproduce:
1. compile with Compaq compiler
2.
3.
    

Additional info:


compaq compiler is not significant. GNU Compiler could 
probably also produce this error message with -Wall.

Comment 1 Nils Philippsen 2004-02-21 17:15:44 UTC
This is stuff for upstream really. 8.0 is end-of-life also.

Comment 2 Nils Philippsen 2004-02-21 17:20:27 UTC
Re-assign so replies reach me.

Comment 3 Nils Philippsen 2004-02-21 17:20:49 UTC
Re-assign so replies reach me.


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