Home
Reading
Searching
Subscribe
Sponsors
Statistics
Posting
Contact
Spam
Lists
Links
About
Hosting
Filtering
Features Download
Marketing
Archives
FAQ
Blog
 
Gmane
From: <robert.rex-GD4dBWQXeU/QT0dZR+AlfA <at> public.gmane.org>
Subject: [Cython] 'local variable referenced before assignment' warnings
Newsgroups: gmane.comp.python.cython.devel
Date: Wednesday 21st September 2011 07:32:53 UTC (over 5 years ago)
Hi,

I got a (misleading) Cython warning from the following code example:

--------------------------------
cdef extern from "":
     void foo(int &a, int &b)

cdef cyfoo():
     cdef int cya, cyb
     foo(cya, cyb)
--------------------------------

Executing "cython --cplus" produced these messages:
--------------------------------
warning: example.pyx:6:11: local variable 'cya' referenced before
assignment
warning: example.pyx:6:16: local variable 'cyb' referenced before
assignment
--------------------------------

This started with Cython 0.15 (and 0.15.1 also issues these warnings).
I assume this warning shouldn't be produced (as in a similar issue
here: http://trac.cython.org/cython_trac/ticket/714),
right?!

Thanks,
Robert
 
CD: 20ms