Bug 82188 - bad source code
bad source code
Status: CLOSED CURRENTRELEASE
Product: Red Hat Linux
Classification: Retired
Component: mx (Show other bugs)
8.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Mihai Ibanescu
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-01-19 05:25 EST by d.binderman
Modified: 2007-04-18 12:50 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-08-31 10:01:17 EDT
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-01-19 05:25:13 EST
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 package mx-2.0.3-6 from Redhat 8.0

The compiler said

mx/Stack/mxStack/mxStack.c:297: warning: operation on `top' may be undefined

Here is an untested patch to shut up the compiler.

*** ./mx/Stack/mxStack/mxStack.c.old	2003-01-16 21:04:07.000000000 +0000
--- ./mx/Stack/mxStack/mxStack.c	2003-01-16 21:04:31.000000000 +0000
***************
*** 294,300 ****
  	    if (!v) {
  		/* Rollback */
  		while (i > 0) {
! 		    Py_DECREF(stack->array[top--]);
  		    i--;
  		}
  		stack->top = top;
--- 294,301 ----
  	    if (!v) {
  		/* Rollback */
  		while (i > 0) {
! 		    Py_DECREF(stack->array[top]);
! 		    top--;
  		    i--;
  		}
  		stack->top = top;

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


How reproducible:
Always

Steps to Reproduce:
1. compile the program
2.
3.
    

Additional info
Comment 1 Mihai Ibanescu 2004-08-31 10:01:17 EDT
mx-2.0.5 does not exhibit this problem.

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