8000 util/rand: Fix unused variable warning when building without threads by tomasskare · Pull Request #6358 · libgit2/libgit2 · GitHub
[go: up one dir, main page]

Skip to content
8000

util/rand: Fix unused variable warning when building without threads #6358

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

Closed
wants to merge 1 commit into from

Conversation

tomasskare
Copy link

When building with USE_THREADS=OFF (GIT_THREADS not defined), the
state_lock variable was still defined, but never used, causing a
warning.

When building with USE_THREADS=OFF (GIT_THREADS not defined), the
state_lock variable was still defined, but never used, causing a
warning.
@ethomson
Copy link
Member

Yikes - we definitely aim to be warning free. I'm disappointed that our threads=off nightly build missed this -- possibly just because it's an older compiler. This one is a little subtle, it's the #define to git__noop that drops the argument.

I'd like to avoid that #ifdef if possible -- I opened #6432 with an alternate approach.

@ethomson
Copy link
Member
ethomson commented Feb 9, 2023

(Fixed via #6432)

@ethomson ethomson closed this Feb 9, 2023
@tomasskare tomasskare deleted the no-threads-fix-warning branch February 9, 2023 12:44
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.

3 participants
0