Bug 111020 - bad source code
Summary: bad source code
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: openmotif
Version: 1
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Thomas Woerner
QA Contact:
URL:
Whiteboard:
: 79234 105845 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-11-26 15:25 UTC by d.binderman
Modified: 2007-11-30 22:10 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-04-19 15:10:44 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description d.binderman 2003-11-26 15:25:42 UTC
Description of problem:
I just tried to compile package openmotif-2_2_2-16_1 from Fedora.

The compiler said

TabBox.c:8033: warning: operation on `cnt' may be undefined
TabBox.c:8054: warning: operation on `cnt' may be undefined
TabBox.c:8316: warning: operation on `cnt' may be undefined
TabBox.c:8337: warning: operation on `cnt' may be undefined

The source code for the first one is

	rect[cnt++].height = (int)XtHeight(tab) - rect[cnt].y;

Better code would be

	rect[ cnt].height = (int)XtHeight(tab) - rect[cnt].y;
	++cnt;

I assume the other three cases are the same.


Version-Release number of selected component (if applicable):
openmotif-2_2_2-16_1 

How reproducible:


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


Expected results:


Additional info:

Comment 1 Thomas Woerner 2004-04-19 15:10:44 UTC
Fixed in rawhide in openmotif-2.2.3-2 or newer.

Comment 2 Thomas Woerner 2004-04-19 15:26:43 UTC
*** Bug 105845 has been marked as a duplicate of this bug. ***

Comment 3 Thomas Woerner 2004-04-19 15:28:20 UTC
*** Bug 79234 has been marked as a duplicate of this bug. ***


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