Fix Clang compilation: make static functions inline#92
Merged
jermp merged 1 commit intojermp:masterfrom Oct 5, 2025
Merged
Conversation
Add inline keyword to static functions in headers to comply with Clang's stricter ODR checks. This fixes compilation errors on macOS arm64 builds with Apple Clang.
Owner
|
Ok, thanks! Actually, I'm already using this version of PTHash in SSHash and, in turn, in Fulgor as well. I did not get any problems (of course, otherwise I would have fixed them) when compiling on Mac os under clang, M1 processor. |
Contributor
Author
|
Thanks! The difference in compilation messages might be due to difference in compilation flags 🤔 On our end it was triggered by [-Werror,-Wunneeded-internal-declaration] at https://github.com/ratschlab/metagraph/actions/runs/18247150520/job/51956656024 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add inline keyword to static functions in headers to comply with Clang's stricter ODR checks. This fixes compilation errors on macOS arm64 builds with Apple Clang. I'm only adding
inlineto functions that triggered compilation errors in Metagraph when bumping the version of sshash, but in principle it might be prudent to add this to more static functions.