Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix compiler warnings #161

Open
pombredanne opened this issue Feb 20, 2022 · 0 comments
Open

Fix compiler warnings #161

pombredanne opened this issue Feb 20, 2022 · 0 comments

Comments

@pombredanne
Copy link
Collaborator

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
pombredanne added a commit that referenced this issue Mar 5, 2022
- This silences compiler warnings.
- Also ensure we have proper printf type codes

Reference: #161
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant