Hi.

Currently, GCC emits a warning regarding a statment without effect
in the python bindings that comes from the definition of returnerror.

returnerror is currently defined as a cdef.  cdef does not really support
docstrings in pyrex (why should it).  On second glance however, returnerror is
only called in python context.  I propose to change the definition
to a normal def, and make it simpler.  The warning is gone afterwards,
only one remining from the __init__ docstring in the cdef class Connection
(why would a cdef have a python docstring?).

Can the API maintainers review please?

Index: Bindings/Python/brlapi.pyx
===================================================================
--- Bindings/Python/brlapi.pyx  (revision 3058)
+++ Bindings/Python/brlapi.pyx  (working copy)
@@ -52,11 +52,9 @@
 cimport c_brlapi
 include "constants.auto.pyx"
 
-cdef returnerrno():
+def returnerrno():
        """This function returns str message error from errno"""
-       cdef c_brlapi.brlapi_error_t *error
-       error = c_brlapi.brlapi_error_location()
-       return c_brlapi.brlapi_strerror(error)
+       return c_brlapi.brlapi_strerror(c_brlapi.brlapi_error_location())
 
 class ConnectionError:
        """Error while connecting to BrlTTY"""

-- 
CYa,
  Mario | Debian Developer <URL:http://debian.org/>
  .''`. | Get my public key via finger [EMAIL PROTECTED]
 : :' : | 1024D/7FC1A0854909BCCDBE6C102DDFFC022A6B113E44
 `. `'
   `-      <URL:http://delysid.org/>  <URL:http://www.staff.tugraz.at/mlang/>
_______________________________________________
This message was sent via the BRLTTY mailing list.
To post a message, send an e-mail to: BRLTTY@mielke.cc
For general information, go to: http://mielke.cc/mailman/listinfo/brltty

Reply via email to