[Biopython-dev] [Bug 2609] Gcc 4.3.2 'initialization from incompatible pointer type' warning with triemodule.c
bugzilla-daemon at portal.open-bio.org
bugzilla-daemon at portal.open-bio.org
Mon Nov 17 18:29:08 UTC 2008
http://bugzilla.open-bio.org/show_bug.cgi?id=2609
------- Comment #6 from bsouthey at gmail.com 2008-11-17 13:29 EST -------
> Over to Bruce to test with gcc 4.3.2 then...
>
Still the same warning for Python 2.5 and 2.6:
Bio/triemodule.c: In function â_write_value_to_handleâ:
Bio/triemodule.c:498: warning: passing argument 3 of
âPyString_AsStringAndSizeâ from incompatible pointer type
See PEP 353 (http://www.python.org/dev/peps/pep-0353/) which suggests to
include:
#if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN)
typedef int Py_ssize_t;
#define PY_SSIZE_T_MAX INT_MAX
#define PY_SSIZE_T_MIN INT_MIN
#endif
I did not get the warning after I added it to Bio.trie.h (as I thought that
this would be the appropriate location for it) and changed the declaration in
_write_value_to_handle for length to:
Py_ssize_t length;
But while this is fine for Python 2.3 and Python 2.4, I get the error with
Python 2.5 and Python 2.6:
[snip]
test_trie ... ERROR
test_triefind ... ok
======================================================================
ERROR: test_trie
----------------------------------------------------------------------
Traceback (most recent call last):
File "run_tests.py", line 125, in runTest
self.runSafeTest()
File "run_tests.py", line 138, in runSafeTest
cur_test = __import__(self.test_name)
File "test_trie.py", line 87, in <module>
trieobj3 = trie.load(h)
ValueError: bad marshal data
--
Configure bugmail: http://bugzilla.open-bio.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the Biopython-dev
mailing list