Bug 105845 - openmotif bad source code
openmotif bad source code
Status: CLOSED DUPLICATE of bug 111020
Product: Red Hat Linux
Classification: Retired
Component: openmotif (Show other bugs)
9
All Linux
medium Severity medium
: ---
: ---
Assigned To: Thomas Woerner
David Lawrence
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-09-28 07:29 EDT by d.binderman
Modified: 2007-04-18 12:57 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-02-21 13:58:49 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description d.binderman 2003-09-28 07:29:27 EDT
From Bugzilla Helper:
User-Agent: Mozilla/4.6 [en-gb]C-CCK-MCD NetscapeOnline.co.uk  (Win98; I)

Description of problem:

Hello there, 

I just tried to compile openmotif-2.2.2-14 from Redhat 9.0 with 
compiler flag -Wall.

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 is

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

You would be much better off with

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

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


How reproducible:
Always

Steps to Reproduce:
1. compile with -Wall.
2.
3.
    

Additional info
Comment 1 Thomas Woerner 2004-04-19 11:26:39 EDT

*** This bug has been marked as a duplicate of 111020 ***
Comment 2 Red Hat Bugzilla 2006-02-21 13:58:49 EST
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.