Skip to content

Conversation

@LTLA
Copy link
Contributor

@LTLA LTLA commented Dec 14, 2025

This PR aims to eliminate a bunch of GCC/clang compiler warnings.

Most of these relate to unused variables. I've used the (void)variable pattern to trick the compiler into silencing the warning. I could have used [[maybe_unused]] but decided against it as that would force everyone to use C++17. Alternatively, I could have just removed the variable name from the function signature, but the names seemed to be informative (e.g., for the Base methods) so I left them in.

Other warnings were related to signed/unsigned comparisons when the template type S is an unsigned integer. While I was working on this, I ended up also fixing a small bug in the for loop for unsigned S. I also extended the test suite to compile and test for unsigned indices. In hindsight this might be better off as a separate PR.

There are still some remaining warnings in annoymodule.cc, but those are related to interactions with the Python C API and I'm uncertain on how to fix them. At least the warnings in annoylib.h have all been resolved.

Also FYI, ci.yml actually doesn't test anywhere other than Linux, {{ matrix.os }} isn't actually used anywhere. So we just end up running triplicate CI on Linux while pretending that it's running on Windows and Mac.

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

Successfully merging this pull request may close these issues.

1 participant