[Python-bugs-list] [ python-Bugs-835110 ] possible uninitialized variable in listobject.c:listsort

SourceForge.net noreply at sourceforge.net
Sat Nov 8 06:36:59 EST 2003


Bugs item #835110, was opened at 2003-11-03 11:07
Message generated for change (Comment added) made by rhettinger
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=835110&group_id=5470

Category: Python Interpreter Core
Group: None
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Skip Montanaro (montanaro)
Assigned to: Raymond Hettinger (rhettinger)
Summary: possible uninitialized variable in listobject.c:listsort

Initial Comment:
GCC warns that the local variable n in listobject.c:listsort 
might be uninitialized.  I'm not convinced that's the case, but 
it seems that n should only be declared once and should be 
initialized at that point to avoid confusion.  It's both a 
variable local to listsort and a variable local to an embedded 
do/while loop.  It's also not clear that the goto fail statement 
inside the do/while is correct.  Do you intend for n to have 
the value set within the loop?  I think when you get to the 
fail: label you'll see the outer n.



----------------------------------------------------------------------

>Comment By: Raymond Hettinger (rhettinger)
Date: 2003-11-08 06:36

Message:
Logged In: YES 
user_id=80475

Fixed.  See Objects/listobject.c 2.163


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=835110&group_id=5470



More information about the Python-bugs-list mailing list