Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 79234 - bad source code
Summary: bad source code
Keywords:
Status: CLOSED DUPLICATE of bug 111020
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: openmotif
Version: 8.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Ngo Than
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-12-08 10:41 UTC by d.binderman
Modified: 2007-04-18 16:48 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-02-21 18:50:17 UTC


Attachments (Terms of Use)

Description d.binderman 2002-12-08 10:41:13 UTC
Description of Problem:

Hello there,

I just tried to compile package openmotif-2.2.2-12 from Redhat 8.0.

Here are some of the compiler messages.

TabBox.c:8032: warning: operation on `cnt' may be undefined
TabBox.c:8053: warning: operation on `cnt' may be undefined
TabBox.c:8315: warning: operation on `cnt' may be undefined
TabBox.c:8336: warning: operation on `cnt' may be undefined

Here is a patch which fixes the messages.
 
*** ./lib/Xm/TabBox.c.old	2002-11-18 14:28:42.000000000 +0000
--- ./lib/Xm/TabBox.c	2002-11-18 14:29:44.000000000 +0000
***************
*** 8029,8035 ****
  	rect[cnt].x = 0;
  	rect[cnt].y = geom[last].y + geom[last].height;
  	rect[cnt].width = XtWidth(tab);
! 	rect[cnt++].height = (int)XtHeight(tab) - rect[cnt].y;
  
  	if( cnt >= _NUM_RECTS )
  	{
--- 8029,8036 ----
  	rect[cnt].x = 0;
  	rect[cnt].y = geom[last].y + geom[last].height;
  	rect[cnt].width = XtWidth(tab);
! 	rect[cnt].height = (int)XtHeight(tab) - rect[cnt].y;
!         cnt++;
  
  	if( cnt >= _NUM_RECTS )
  	{
***************
*** 8050,8056 ****
  	    rect[cnt].x = 0;
  	    rect[cnt].y = geom[last].y + geom[last].height;
  	    rect[cnt].width = geom[last].width;
! 	    rect[cnt++].height = (int)XtHeight(tab) - rect[cnt].y;
  
  	    if( cnt >= _NUM_RECTS )
  	    {
--- 8051,8058 ----
  	    rect[cnt].x = 0;
  	    rect[cnt].y = geom[last].y + geom[last].height;
  	    rect[cnt].width = geom[last].width;
! 	    rect[cnt].height = (int)XtHeight(tab) - rect[cnt].y;
!             cnt++;
  
  	    if( cnt >= _NUM_RECTS )
  	    {
***************
*** 8312,8318 ****
  	rect[cnt].x = 0;
  	rect[cnt].y = geom[last].y + geom[last].height;
  	rect[cnt].width = XtWidth(tab);
! 	rect[cnt++].height = (int)XtHeight(tab) - rect[cnt].y;
  
  	if( cnt >= _NUM_RECTS )
  	{
--- 8314,8321 ----
  	rect[cnt].x = 0;
  	rect[cnt].y = geom[last].y + geom[last].height;
  	rect[cnt].width = XtWidth(tab);
! 	rect[cnt].height = (int)XtHeight(tab) - rect[cnt].y;
!         cnt++;
  
  	if( cnt >= _NUM_RECTS )
  	{
***************
*** 8333,8339 ****
  	    rect[cnt].x = (int)XtWidth(tab) - geom[last].width;
  	    rect[cnt].y = geom[last].y + geom[last].height;
  	    rect[cnt].width = geom[last].width;
! 	    rect[cnt++].height = (int)XtHeight(tab) - rect[cnt].y;
  
  	    if( cnt >= _NUM_RECTS )
  	    {
--- 8336,8343 ----
  	    rect[cnt].x = (int)XtWidth(tab) - geom[last].width;
  	    rect[cnt].y = geom[last].y + geom[last].height;
  	    rect[cnt].width = geom[last].width;
! 	    rect[cnt].height = (int)XtHeight(tab) - rect[cnt].y;
!             cnt++;
  
  	    if( cnt >= _NUM_RECTS )
  	    {

Also, the compiler found

Xpmcreate.c:502: warning: `colorsymbols' might be used uninitialized in this function
Xpmcreate.c:510: warning: `symbol' might be used uninitialized in this function
Xpmscan.c:191: warning: `ErrorStatus' might be used uninitialized in this function
Xpmscan.c:402: warning: `colorTable' might be used uninitialized in this function
Xpmscan.c:404: warning: `apixels' might be used uninitialized in this function
Xpmscan.c:405: warning: `mask_pixel' might be used uninitialized in this function
Notebook.c:2242: warning: `side_to_join' might be used uninitialized in this function
Notebook.c:2509: warning: `top_tab_count' might be used uninitialized in this function
Notebook.c:6386: warning: `to_type' might be used uninitialized in this function
Notebook.c:6386: warning: `from_type' might be used uninitialized in this function
TabBox.c:812: warning: `pixel' might be used uninitialized in this function
TabBox.c:813: warning: `pixmap' might be used uninitialized in this function
TabBox.c:5112: warning: `tmp' might be used uninitialized in this function
MrmIindex.c:354: warning: `leaf_ndxvec' might be used uninitialized in this function
MrmIindex.c:355: warning: `node_ndxvec' might be used uninitialized in this function
MrmIindex.c:361: warning: `cmpres' might be used uninitialized in this function
Mrmicon.c:941: warning: `bitmask' might be used uninitialized in this function
Mrmicon.c:942: warning: `num_bits' might be used uninitialized in this function
Mrmicon.c:1110: warning: `result' might be used uninitialized in this function
Mrmwcrw.c:2057: warning: `dfontlist' might be used uninitialized in this function
wmlouth.c:780: warning: `bitno' might be used uninitialized in this function
wmlouth.c:873: warning: `itemno' might be used uninitialized in this function
wmlouth.c:999: warning: `itemno' might be used uninitialized in this function
wmlouth.c:1124: warning: `itemno' might be used uninitialized in this function
wmlouth.c:1246: warning: `itemno' might be used uninitialized in this function
wmlutils.c:271: warning: `midndx' might be used uninitialized in this function
wmlutils.c:273: warning: `cmpres' might be used uninitialized in this function
wmlutils.c:354: warning: `midndx' might be used uninitialized in this function
wmlutils.c:356: warning: `cmpres' might be used uninitialized in this function
wmldbcreate.c:270: warning: `ptr' might be used uninitialized in this function
wmldbcreate.c:348: warning: `table' might be used uninitialized in this function
wmldbcreate.c:386: warning: `table' might be used uninitialized in this function
wmldbcreate.c:447: warning: `table' might be used uninitialized in this function
wmldbcreate.c:568: warning: `ptr' might be used uninitialized in this function
wmldbcreate.c:634: warning: `table' might be used uninitialized in this function
wmldbcreate.c:667: warning: `ptr' might be used uninitialized in this function
debug.c:252: warning: `type_str' might be used uninitialized in this function
debug.c:324: warning: `fmt' might be used uninitialized in this function
debug.c:325: warning: `num' might be used uninitialized in this function
pack.c:660: warning: `fmt' might be used uninitialized in this function
WmCDecor.c:583: warning: `xAdj' might be used uninitialized in this function
WmCDecor.c:583: warning: `yAdj' might be used uninitialized in this function
WmCDecor.c:585: warning: `prlTop' might be used uninitialized in this function
WmCDecor.c:585: warning: `prlBot' might be used uninitialized in this function
WmCEvent.c:2586: warning: `newState' might be used uninitialized in this function
WmColormap.c:487: warning: `new_cmap_window_data' might be used uninitialized in this function
WmFunction.c:1336: warning: `x' might be used uninitialized in this function
WmFunction.c:1336: warning: `y' might be used uninitialized in this function
WmIPlace.c:497: warning: `diffX' might be used uninitialized in this function
WmIPlace.c:498: warning: `diffY' might be used uninitialized in this function
WmIPlace.c:499: warning: `altX' might be used uninitialized in this function
WmIPlace.c:500: warning: `altY' might be used uninitialized in this function
WmKeyFocus.c:649: warning: `pCurrentEntry' might be used uninitialized in this function
WmKeyFocus.c:650: warning: `pNextEntry' might be used uninitialized in this function
WmKeyFocus.c:1031: warning: `pCurrentEntry' might be used uninitialized in this function
WmKeyFocus.c:1032: warning: `pNextEntry' might be used uninitialized in this function
WmResParse.c:2841: warning: `ix' might be used uninitialized in this function
WmResParse.c:3234: warning: `exclusion_text' might be used uninitialized in this function
WmResParse.c:3774: warning: `chlen' might be used uninitialized in this function
WmWinInfo.c:1529: warning: `oldWidthInc' might be used uninitialized in this function
WmWinInfo.c:1529: warning: `oldHeightInc' might be used uninitialized in this function
WmWinInfo.c:1530: warning: `oldBaseWidth' might be used uninitialized in this function
WmWinInfo.c:1530: warning: `oldBaseHeight' might be used uninitialized in this function
WmCmd.c:390: warning: `windowIDs' might be used uninitialized in this function
WmCmd.c:517: warning: `windowIDs' might be used uninitialized in this function
WmCmd.c:639: warning: `windowIDs' might be used uninitialized in this function
WmCmd.c:761: warning: `windowIDs' might be used uninitialized in this function
WmCmd.c:885: warning: `windowIDs' might be used uninitialized in this function
WmCmd.c:1259: warning: `hMin' might be used uninitialized in this function
WmCmd.c:1259: warning: `hMax' might be used uninitialized in this function
WmCmd.c:1259: warning: `hSliderAreaWidth' might be used uninitialized in this function
WmCmd.c:1259: warning: `hSliderX' might be used uninitialized in this function
WmCmd.c:1259: warning: `hSliderAreaX' might be used uninitialized in this function
WmCmd.c:1260: warning: `vMin' might be used uninitialized in this function
WmCmd.c:1260: warning: `vMax' might be used uninitialized in this function
WmCmd.c:1260: warning: `vSliderAreaHeight' might be used uninitialized in this function
WmCmd.c:1260: warning: `vSliderY' might be used uninitialized in this function
WmCmd.c:1260: warning: `vSliderAreaY' might be used uninitialized in this function
WmCmd.c:1261: warning: `rightArrowX' might be used uninitialized in this function
WmCmd.c:1261: warning: `rightArrowY' might be used uninitialized in this function
WmCmd.c:1261: warning: `leftArrowX' might be used uninitialized in this function
WmCmd.c:1261: warning: `leftArrowY' might be used uninitialized in this function
WmCmd.c:1262: warning: `topArrowX' might be used uninitialized in this function
WmCmd.c:1262: warning: `topArrowY' might be used uninitialized in this function
WmCmd.c:1262: warning: `bottomArrowX' might be used uninitialized in this function
WmCmd.c:1262: warning: `bottomArrowY' might be used uninitialized in this function
WmCmd.c:1263: warning: `iconBoxX' might be used uninitialized in this function
WmCmd.c:1263: warning: `iconBoxY' might be used uninitialized in this function
WmCmd.c:1263: warning: `iconBoxWidth' might be used uninitialized in this function
WmCmd.c:1263: warning: `iconBoxHeight' might be used uninitialized in this function
WmCmd.c:1264: warning: `frameWin' might be used uninitialized in this function
WmCmd.c:1264: warning: `scrollWin' might be used uninitialized in this function
WmCmd.c:1264: warning: `hScrollWin' might be used uninitialized in this function
WmCmd.c:1264: warning: `vScrollWin' might be used uninitialized in this function
WmCmd.c:1264: warning: `iconShellWin' might be used uninitialized in this function
WmCmd.c:1265: warning: `lastRow' might be used uninitialized in this function
WmCmd.c:1265: warning: `lastCol' might be used uninitialized in this function
WmCmd.c:1266: warning: `iPlaceW' might be used uninitialized in this function
WmCmd.c:1266: warning: `iPlaceH' might be used uninitialized in this function
WmCmd.c:1703: warning: `hMin' might be used uninitialized in this function
WmCmd.c:1703: warning: `hMax' might be used uninitialized in this function
WmCmd.c:1703: warning: `hSliderAreaWidth' might be used uninitialized in this function
WmCmd.c:1703: warning: `hSliderX' might be used uninitialized in this function
WmCmd.c:1703: warning: `hSliderAreaX' might be used uninitialized in this function
WmCmd.c:1704: warning: `vMin' might be used uninitialized in this function
WmCmd.c:1704: warning: `vMax' might be used uninitialized in this function
WmCmd.c:1704: warning: `vSliderAreaHeight' might be used uninitialized in this function
WmCmd.c:1704: warning: `vSliderY' might be used uninitialized in this function
WmCmd.c:1704: warning: `vSliderAreaY' might be used uninitialized in this function
WmCmd.c:1705: warning: `rightArrowX' might be used uninitialized in this function
WmCmd.c:1705: warning: `rightArrowY' might be used uninitialized in this function
WmCmd.c:1705: warning: `leftArrowX' might be used uninitialized in this function
WmCmd.c:1705: warning: `leftArrowY' might be used uninitialized in this function
WmCmd.c:1706: warning: `topArrowX' might be used uninitialized in this function
WmCmd.c:1706: warning: `topArrowY' might be used uninitialized in this function
WmCmd.c:1706: warning: `bottomArrowX' might be used uninitialized in this function
WmCmd.c:1706: warning: `bottomArrowY' might be used uninitialized in this function
WmCmd.c:1707: warning: `iconBoxX' might be used uninitialized in this function
WmCmd.c:1707: warning: `iconBoxY' might be used uninitialized in this function
WmCmd.c:1707: warning: `iconBoxWidth' might be used uninitialized in this function
WmCmd.c:1707: warning: `iconBoxHeight' might be used uninitialized in this function
WmCmd.c:1708: warning: `scrollWin' might be used uninitialized in this function
WmCmd.c:1708: warning: `hScrollWin' might be used uninitialized in this function
WmCmd.c:1708: warning: `vScrollWin' might be used uninitialized in this function
WmCmd.c:1708: warning: `iconShellWin' might be used uninitialized in this function
WmCmd.c:1709: warning: `lastRow' might be used uninitialized in this function
WmCmd.c:1709: warning: `lastCol' might be used uninitialized in this function
WmCmd.c:1710: warning: `iPlaceW' might be used uninitialized in this function
WmCmd.c:1710: warning: `iPlaceH' might be used uninitialized in this function
WmCmd.c:1978: warning: `titleId' might be used uninitialized in this function
WmCmd.c:1978: warning: `systemId' might be used uninitialized in this function
WmCmd.c:1978: warning: `minimizeId' might be used uninitialized in this function
WmCmd.c:1978: warning: `maximizeId' might be used uninitialized in this function
WmCmd.c:1986: warning: `titleFound' might be used uninitialized in this function
WmCmd.c:1986: warning: `systemFound' might be used uninitialized in this function
WmCmd.c:1986: warning: `minimizeFound' might be used uninitialized in this function
WmCmd.c:2108: warning: `menuItemCount' might be used uninitialized in this function
WmMenu.c:500: warning: `returnMenuItem' might be used uninitialized in this function
UilLexAna.c:1035: warning: `l_bslash_value' might be used uninitialized in this function
UilP2Out.c:1344: warning: `value_size' might be used uninitialized in this function
UilP2Out.c:1346: warning: `value_count' might be used uninitialized in this function
UilSarExp.c:144: warning: `operator' might be used uninitialized in this function
UilSarExp.c:274: warning: `operator' might be used uninitialized in this function
UilSarExp.c:275: warning: `res_type' might be used uninitialized in this function
UilSarMod.c:428: warning: `value_entry' might be used uninitialized in this function
UilSarMod.c:603: warning: `value_entry' might be used uninitialized in this function
UilSarObj.c:222: warning: `node_size' might be used uninitialized in this function
UilSarObj.c:1401: warning: `ptr' might be used uninitialized in this function
UilSarProc.c:303: warning: `value_entry' might be used uninitialized in this function
UilSarVal.c:231: warning: `enum_code' might be used uninitializedin this function
UilSarVal.c:260: warning: `source_type' might be used uninitialized in this function
UilSarVal.c:565: warning: `value_entry' might be used uninitialized in this function
UilSarVal.c:2550: warning: `font_table_entry' might be used uninitialized in this function
UilSarVal.c:3224: warning: `prior_item_entry' might be used uninitialized in this function
UilSarVal.c:3341: warning: `color_table_entry' might be used uninitialized in this function
UilSarVal.c:3342: warning: `target_type' might be used uninitialized in this function
UilSarVal.c:3494: warning: `state' might be used uninitialized in this function
UilSarVal.c:3612: warning: `table_entry' might be used uninitialized in this function
UilSarVal.c:3614: warning: `head_row_entry' might be used uninitialized in this function
UilLstMac.c:412: warning: `child_index' might be used uninitialized in this function
UilSemVal.c:738: warning: `actual_type' might be used uninitialized in this function
UilSemVal.c:2982: warning: `op2_entry' might be used uninitialized in this function
UilSemVal.c:2983: warning: `op1_ptr' might be used uninitialized in this function
UilSemVal.c:2984: warning: `op2_ptr' might be used uninitialized in this function
UilSemVal.c:4321: warning: `res_type' might be used uninitialized in this function
UilDB.c:387: warning: `table' might be used uninitialized in this function
UilDB.c:482: warning: `ptr' might be used uninitialized in this function
UilDB.c:583: warning: `table' might be used uninitialized in this function
UilDB.c:733: warning: `table' might be used uninitialized in this function

There seem to be 169 places where the compiler thinks there is a problem.



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


How Reproducible:


Steps to Reproduce:
1. 
2. 
3. 

Actual Results:


Expected Results:


Additional Information:

Comment 1 Thomas Woerner 2004-04-19 15:28:18 UTC

*** This bug has been marked as a duplicate of 111020 ***

Comment 2 Red Hat Bugzilla 2006-02-21 18:50:17 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.