[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 10:33:37 UTC 2008


http://bugzilla.open-bio.org/show_bug.cgi?id=2609





------- Comment #3 from biopython-bugzilla at maubp.freeserve.co.uk  2008-11-17 05:33 EST -------
I haven't tried this on Linux yet.

===================================

I've just updated to CVS and rebuilt on Windows with mingw32 (gcc 3.4.4 cygming
special), using Python 2.3, 2.4, 2.5 and 2.6 - no warnings from the Bio.Trie
code.  I should have checked for any warnings BEFORE updating to CVS, but
didn't.

===================================

However, on Mac OS X 10.5 "Leopard" with I now get a lot of pointer warnings:

building 'Bio.trie' extension
creating build/temp.macosx-10.3-i386-2.5
creating build/temp.macosx-10.3-i386-2.5/Bio
gcc -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk
-fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd
-fno-common -dynamic -DNDEBUG -g -O3 -IBio
-I/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5 -c
Bio/triemodule.c -o build/temp.macosx-10.3-i386-2.5/Bio/triemodule.o
Bio/triemodule.c: In function ‘_write_value_to_handle’:
Bio/triemodule.c:498: warning: passing argument 3 of
‘PyString_AsStringAndSize’ from incompatible pointer type
Bio/triemodule.c: In function ‘_write_value_to_handle’:
Bio/triemodule.c:498: warning: passing argument 3 of
‘PyString_AsStringAndSize’ from incompatible pointer type
gcc -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk
-fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd
-fno-common -dynamic -DNDEBUG -g -O3 -IBio
-I/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5 -c
Bio/trie.c -o build/temp.macosx-10.3-i386-2.5/Bio/trie.o
Bio/trie.c: In function ‘Trie_set’:
Bio/trie.c:103: warning: pointer targets in passing argument 1 of ‘strdup’
differ in signedness
Bio/trie.c:156: warning: pointer targets in passing argument 1 of ‘strlen’
differ in signedness
Bio/trie.c:162: warning: pointer targets in passing argument 1 of ‘strncpy’
differ in signedness
Bio/trie.c:162: warning: pointer targets in passing argument 2 of ‘strncpy’
differ in signedness
Bio/trie.c:164: warning: pointer targets in passing argument 1 of ‘strdup’
differ in signedness
Bio/trie.c: In function ‘Trie_set’:
Bio/trie.c:103: warning: pointer targets in passing argument 1 of ‘strdup’
differ in signedness
Bio/trie.c:156: warning: pointer targets in passing argument 1 of ‘strlen’
differ in signedness
Bio/trie.c:162: warning: pointer targets in passing argument 1 of ‘strncpy’
differ in signedness
Bio/trie.c:162: warning: pointer targets in passing argument 2 of ‘strncpy’
differ in signedness
Bio/trie.c:164: warning: pointer targets in passing argument 1 of ‘strdup’
differ in signedness
Bio/trie.c: In function ‘Trie_get’:
Bio/trie.c:229: warning: pointer targets in passing argument 1 of ‘strlen’
differ in signedness
Bio/trie.c:229: warning: pointer targets in passing argument 1 of ‘strncmp’
differ in signedness
Bio/trie.c:229: warning: pointer targets in passing argument 2 of ‘strncmp’
differ in signedness
Bio/trie.c:235: warning: pointer targets in passing argument 1 of ‘strlen’
differ in signedness
Bio/trie.c: In function ‘_get_approximate_transition’:
Bio/trie.c:268: warning: pointer targets in passing argument 1 of ‘strlen’
differ in signedness
Bio/trie.c:272: warning: pointer targets in passing argument 1 of ‘strlen’
differ in signedness
Bio/trie.c:272: warning: pointer targets in passing argument 1 of ‘strlen’
differ in signedness
Bio/trie.c:284: warning: pointer targets in passing argument 1 of ‘strncat’
differ in signedness
Bio/trie.c:284: warning: pointer targets in passing argument 2 of ‘strncat’
differ in signedness
Bio/trie.c: In function ‘Trie_get’:
Bio/trie.c:229: warning: pointer targets in passing argument 1 of ‘strlen’
differ in signedness
Bio/trie.c:229: warning: pointer targets in passing argument 1 of ‘strncmp’
differ in signedness
Bio/trie.c:229: warning: pointer targets in passing argument 2 of ‘strncmp’
differ in signedness
Bio/trie.c:235: warning: pointer targets in passing argument 1 of ‘strlen’
differ in signedness
Bio/trie.c: In function ‘_get_approximate_transition’:
Bio/trie.c:268: warning: pointer targets in passing argument 1 of ‘strlen’
differ in signedness
Bio/trie.c:272: warning: pointer targets in passing argument 1 of ‘strlen’
differ in signedness
Bio/trie.c:272: warning: pointer targets in passing argument 1 of ‘strlen’
differ in signedness
Bio/trie.c: In function ‘_get_approximate_trie’:
Bio/trie.c:353: warning: pointer targets in passing argument 1 of ‘strlen’
differ in signedness
Bio/trie.c:355: warning: pointer targets in passing argument 1 of ‘strlen’
differ in signedness
Bio/trie.c:284: warning: pointer targets in passing argument 1 of ‘strncat’
differ in signedness
Bio/trie.c:356: warning: pointer targets in passing argument 1 of ‘strcat’
differ in signedness
Bio/trie.c:284: warning: pointer targets in passing argument 2 of ‘strncat’
differ in signedness
Bio/trie.c:356: warning: pointer targets in passing argument 2 of ‘strcat’
differ in signedness
Bio/trie.c:367: warning: pointer targets in passing argument 1 of ‘strlen’
differ in signedness
Bio/trie.c:369: warning: pointer targets in passing argument 1 of ‘strlen’
differ in signedness
Bio/trie.c: In function ‘_get_approximate_trie’:
Bio/trie.c:353: warning: pointer targets in passing argument 1 of ‘strlen’
differ in signedness
Bio/trie.c:355: warning: pointer targets in passing argument 1 of ‘strlen’
differ in signedness
Bio/trie.c: In function ‘Trie_has_prefix’:
Bio/trie.c:356: warning: pointer targets in passing argument 1 of ‘strcat’
differ in signednessBio/trie.c:440: warning: pointer targets in passing
argument 1 of ‘strlen’ differ in signedness

Bio/trie.c:356: warning: pointer targets in passing argument 2 of ‘strcat’
differ in signedness
Bio/trie.c:441: warning: pointer targets in passing argument 1 of ‘strlen’
differ in signedness
Bio/trie.c:443: warning: pointer targets in passing argument 1 of ‘strncmp’
differ in signedness
Bio/trie.c:443: warning: pointer targets in passing argument 2 of ‘strncmp’
differ in signedness
Bio/trie.c:367: warning: pointer targets in passing argument 1 of ‘strlen’
differ in signedness
Bio/trie.c:369: warning: pointer targets in passing argument 1 of ‘strlen’
differ in signedness
Bio/trie.c: In function ‘_iterate_helper’:
Bio/trie.c:468: warning: pointer targets in passing argument 1 of ‘strlen’
differ in signedness
Bio/trie.c:470: warning: pointer targets in passing argument 1 of ‘strlen’
differ in signedness
Bio/trie.c:475: warning: pointer targets in passing argument 1 of ‘strcat’
differ in signedness
Bio/trie.c:475: warning: pointer targets in passing argument 2 of ‘strcat’
differ in signedness
Bio/trie.c: In function ‘Trie_has_prefix’:
Bio/trie.c:440: warning: pointer targets in passing argument 1 of ‘strlen’
differ in signedness
Bio/trie.c:441: warning: pointer targets in passing argument 1 of ‘strlen’
differ in signedness
Bio/trie.c: In function ‘_with_prefix_helper’:
Bio/trie.c:521: warning: pointer targets in passing argument 1 of ‘strlen’
differ in signedness
Bio/trie.c:443: warning: pointer targets in passing argument 1 of ‘strncmp’
differ in signedness
Bio/trie.c:522: warning: pointer targets in passing argument 1 of ‘strlen’
differ in signedness
Bio/trie.c:443: warning: pointer targets in passing argument 2 of ‘strncmp’
differ in signedness
Bio/trie.c:524: warning: pointer targets in passing argument 1 of ‘strncmp’
differ in signedness
Bio/trie.c:524: warning: pointer targets in passing argument 2 of ‘strncmp’
differ in signedness
Bio/trie.c:530: warning: pointer targets in passing argument 1 of ‘strlen’
differ in signedness
Bio/trie.c:536: warning: pointer targets in passing argument 1 of ‘strncat’
differ in signedness
Bio/trie.c:536: warning: pointer targets in passing argument 2 of ‘strncat’
differ in signedness
Bio/trie.c: In function ‘_iterate_helper’:
Bio/trie.c:468: warning: pointer targets in passing argument 1 of ‘strlen’
differ in signedness
Bio/trie.c:470: warning: pointer targets in passing argument 1 of ‘strlen’
differ in signedness
Bio/trie.c:475: warning: pointer targets in passing argument 1 of ‘strcat’
differ in signedness
Bio/trie.c:475: warning: pointer targets in passing argument 2 of ‘strcat’
differ in signedness
Bio/trie.c: In function ‘_with_prefix_helper’:
Bio/trie.c:521: warning: pointer targets in passing argument 1 of ‘strlen’
differ in signedness
Bio/trie.c:522: warning: pointer targets in passing argument 1 of ‘strlen’
differ in signedness
Bio/trie.c: In function ‘_serialize_transition’:Bio/trie.c:524: warning:
pointer targets in passing argument 1 of ‘strncmp’ differ in signedness

Bio/trie.c:621: warning: pointer targets in passing argument 1 of ‘strlen’
differ in signedness
Bio/trie.c:524: warning: pointer targets in passing argument 2 of ‘strncmp’
differ in signedness
Bio/trie.c:530: warning: pointer targets in passing argument 1 of ‘strlen’
differ in signedness
Bio/trie.c:536: warning: pointer targets in passing argument 1 of ‘strncat’
differ in signedness
Bio/trie.c:536: warning: pointer targets in passing argument 2 of ‘strncat’
differ in signedness
Bio/trie.c: In function ‘_serialize_transition’:
Bio/trie.c:621: warning: pointer targets in passing argument 1 of ‘strlen’
differ in signedness
Bio/trie.c: In function ‘_deserialize_transition’:
Bio/trie.c:708: warning: pointer targets in passing argument 1 of ‘strdup’
differ in signedness
Bio/trie.c: In function ‘test’:
Bio/trie.c:752: warning: pointer targets in passing argument 2 of
‘Trie_set’ differ in signedness
Bio/trie.c:753: warning: pointer targets in passing argument 2 of
‘Trie_set’ differ in signedness
Bio/trie.c:754: warning: pointer targets in passing argument 2 of
‘Trie_set’ differ in signedness
Bio/trie.c:755: warning: pointer targets in passing argument 2 of
‘Trie_set’ differ in signedness
Bio/trie.c:757: warning: pointer targets in passing argument 2 of
‘Trie_get’ differ in signedness
Bio/trie.c:758: warning: pointer targets in passing argument 2 of
‘Trie_get’ differ in signedness
Bio/trie.c:759: warning: pointer targets in passing argument 2 of
‘Trie_get’ differ in signedness
Bio/trie.c: In function ‘_deserialize_transition’:
Bio/trie.c:708: warning: pointer targets in passing argument 1 of ‘strdup’
differ in signednessBio/trie.c:760: warning: pointer targets in passing
argument 2 of ‘Trie_get’ differ in signedness

Bio/trie.c:762: warning: pointer targets in passing argument 2 of
‘Trie_set’ differ in signedness
Bio/trie.c:763: warning: pointer targets in passing argument 2 of
‘Trie_get’ differ in signedness
Bio/trie.c:765: warning: pointer targets in passing argument 2 of
‘Trie_get’ differ in signedness
Bio/trie.c:768: warning: pointer targets in passing argument 2 of
‘Trie_set’ differ in signedness
Bio/trie.c:769: warning: pointer targets in passing argument 2 of
‘Trie_get’ differ in signedness
Bio/trie.c: In function ‘test’:
Bio/trie.c:752: warning: pointer targets in passing argument 2 of
‘Trie_set’ differ in signedness
Bio/trie.c:753: warning: pointer targets in passing argument 2 of
‘Trie_set’ differ in signedness
Bio/trie.c:754: warning: pointer targets in passing argument 2 of
‘Trie_set’ differ in signedness
Bio/trie.c:755: warning: pointer targets in passing argument 2 of
‘Trie_set’ differ in signedness
Bio/trie.c:757: warning: pointer targets in passing argument 2 of
‘Trie_get’ differ in signedness
Bio/trie.c:758: warning: pointer targets in passing argument 2 of
‘Trie_get’ differ in signedness
Bio/trie.c:759: warning: pointer targets in passing argument 2 of
‘Trie_get’ differ in signedness
Bio/trie.c:760: warning: pointer targets in passing argument 2 of
‘Trie_get’ differ in signedness
Bio/trie.c:762: warning: pointer targets in passing argument 2 of
‘Trie_set’ differ in signedness
Bio/trie.c:763: warning: pointer targets in passing argument 2 of
‘Trie_get’ differ in signedness
Bio/trie.c:765: warning: pointer targets in passing argument 2 of
‘Trie_get’ differ in signedness
Bio/trie.c:768: warning: pointer targets in passing argument 2 of
‘Trie_set’ differ in signedness
Bio/trie.c:769: warning: pointer targets in passing argument 2 of
‘Trie_get’ differ in signedness
gcc -arch i386 -arch ppc -isysroot /Developer/SDKs/MacOSX10.4u.sdk -g -bundle
-undefined dynamic_lookup build/temp.macosx-10.3-i386-2.5/Bio/triemodule.o
build/temp.macosx-10.3-i386-2.5/Bio/trie.o -o
build/lib.macosx-10.3-i386-2.5/Bio/trie.so

$ python
Python 2.5.2 (r252:60911, Feb 22 2008, 07:57:53) 
[GCC 4.0.1 (Apple Computer, Inc. build 5363)] on darwin
Type "help", "copyright", "credits" or "license" for more information.

$ gcc -v
Using built-in specs.
Target: i686-apple-darwin9
Configured with: /var/tmp/gcc/gcc-5465~16/src/configure --disable-checking
-enable-werror --prefix=/usr --mandir=/share/man
--enable-languages=c,objc,c++,obj-c++
--program-transform-name=/^[cg][^.-]*$/s/$/-4.0/
--with-gxx-include-dir=/include/c++/4.0.0 --with-slibdir=/usr/lib
--build=i686-apple-darwin9 --with-arch=apple --with-tune=generic
--host=i686-apple-darwin9 --target=i686-apple-darwin9
Thread model: posix
gcc version 4.0.1 (Apple Inc. build 5465)

Note that this gcc is only 4.0.1, while Bruce reported this bug on 4.3.2.

The good news is test_trie.py and test_triefind.py still pass.


-- 
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