I've been noticing some unused function warnings of the following variety: test.cpp:1189:12: warning: unused function > '__pyx_pw_5numpy_7ndarray_1__getbuffer__' [-Wunused-function] > static int __pyx_pw_5numpy_7ndarray_1__getbuffer__(PyObject *__pyx_v_self, > Py_buffer *__pyx_v_info, int __pyx_v_flags) { > ^ > test.cpp:2008:13: warning: unused function > '__pyx_pw_5numpy_7ndarray_3__releasebuffer__' [-Wunused-function] > static void __pyx_pw_5numpy_7ndarray_3__releasebuffer__(PyObject > *__pyx_v_self, Py_buffer *__pyx_v_info) { > ^ > 2 warnings generated.
---- test.pyx ---- from numpy cimport import_array, import_ufunc import_array(); import_ufunc() These warnings were once silenced by some code introduced in a previous commit: commit 6cc61605a91c8ebf16318a07439a206118d81614 > Author: Lisandro Dalcin <dalc...@gmail.com> > Date: Wed Apr 28 16:18:43 2010 -0300 > introduce CYTHON_UNUSED macro to annotate functions and parametes > - Silent compiler warnings about unused function/parametes > - Defined to __attribute__((__unused__)) for GCC(>3.4) and ICC > - Applied to a __{get|release}buffer__ special methods > - Applied to a couple of (self,unused) parameter pairs But later reappeared: commit 519a19a9006494c6165ea481553a298d9bf9a008 > Author: Vitja Makarov <vitja.maka...@gmail.com> > Date: Sun Jan 8 19:22:38 2012 +0400 > DefNode: split into function and python wrapper I've introduced a pull request to re-silence these warnings: https://github.com/cython/cython/pull/168 -Brad
_______________________________________________ cython-devel mailing list cython-devel@python.org http://mail.python.org/mailman/listinfo/cython-devel