WojciechMula / pyahocorasick

Python module (C extension and plain python) implementing Aho-Corasick algorithm
BSD 3-Clause "New" or "Revised" License
914 stars 122 forks source link

Fix compiler warnings #161

Open pombredanne opened 2 years ago

pombredanne commented 2 years ago
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DAHOCORASICK_UNICODE= -I/home/pombreda/pyahocorasick/venv/include -I/home/pombreda/.pyenv/versions/3.6.10/include/python3.6m -c pyahocorasick.c -o build/temp.linux-x86_64-3.6/pyahocorasick.o
In file included from Automaton.c:1201:0,
                 from pyahocorasick.c:29:
Automaton_pickle.c: In function ‘automaton_unpickle’:
Automaton_pickle.c:363:17: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for (k=0; k < PyList_GET_SIZE(bytes_list); k++) {
                 ^
Automaton_pickle.c:422:17: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for (i=1; i < id; i++) {
                 ^
Automaton_pickle.c:473:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for (i=1; i < id; i++) {
                     ^
Automaton_pickle.c:483:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for (i=0; i < object_idx; i++) {
                     ^
creating build/lib.linux-x86_64-3.6