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

reordering warning with g++ in HierarchicalNSW #438

Closed
jlmelville opened this issue Feb 9, 2023 · 1 comment
Closed

reordering warning with g++ in HierarchicalNSW #438

jlmelville opened this issue Feb 9, 2023 · 1 comment

Comments

@jlmelville
Copy link
Contributor

The initializer in the third constructor for HierarchicalNSW has label_op_locks_ and link_list_locks_(max_elements) initialized in a different order to their declaration (on line 42 and 39, respectively):

: link_list_locks_(max_elements),
label_op_locks_(MAX_LABEL_OPERATION_LOCKS),

This causes a -Wreorder warning to be emitted by g++. Not a big deal admittedly, but I was hoping to finally get the R bindings up to date, and a compiler warning will be grounds for rejection by CRAN (not anyone's problem but mine).

Happy to provide a PR, although the fix is as trivial as swapping the position of the two initializers.

@yurymalkov
Copy link
Member

Hi @jlmelville, sorry for the long response.
Yeah, a PR would be welcomed! Thanks!

jlmelville added a commit to jlmelville/hnsw that referenced this issue Mar 5, 2023
yurymalkov added a commit that referenced this issue Mar 5, 2023
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

2 participants