-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
gh-135513: Fix unused variable warning in crossinterp.c
#135514
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's undeclared now at line 2664 I think
@picnixz I want to be sure that |
I also thought about it but ISTM that the following wouldn't make sense otherwise: PyThreadState *tstate = _PyThreadState_GET();
...
if (_fill_sharedns(sharedns, nsupdates, fallback, &_err) < 0) {
assert(_PyErr_Occurred(tstate));
...
} But it's a good idea to use ifdefs just for that. We can also ask @ericsnowcurrently if our analysis is correct |
I went with the safest bet: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. I wrote the same fix before finding this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
…onGH-135514) (cherry picked from commit 4c15505) Co-authored-by: sobolevn <mail@sobolevn.me>
GH-135577 is a backport of this pull request to the 3.14 branch. |
I merged the PR since the warning is annoying me on multiple PRs and the change was approved 3 times :-) |
My apologies for missing this in the original PR. Thanks for the fix, @sobolevn! |
Thanks all! |
crossinterp.c
#135513