Skip to content

Conversation

@hyongtao-code
Copy link
Contributor

Remove an unreachable return NULL after PyErr_SetFromWindowsErr() in the Windows mmap resize error path. This is a pure cleanup with no behavior change.

Remove an unreachable `return NULL` after `PyErr_SetFromWindowsErr()` in
the Windows mmap resize error path. This is a pure cleanup with no
behavior change.

Signed-off-by: Yongtao Huang <yongtaoh2022@gmail.com>
@yihong0618
Copy link
Contributor

interesting why static check can not find this?

@hyongtao-code
Copy link
Contributor Author

interesting why static check can not find this?

I guess this went unnoticed because the code lives entirely inside the #ifdef MS_WINDOWS ... #endif block.

@aisk aisk changed the title mmapmodule: remove unreachable code in Windows error path Remove unreachable code in mmapmodule error path on Windows Dec 22, 2025
@StanFromIreland StanFromIreland added type-refactor Code refactoring (with no changes in behavior) OS-windows labels Dec 22, 2025
Copy link
Member

@StanFromIreland StanFromIreland left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@encukou encukou merged commit 3960878 into python:main Dec 22, 2025
58 checks passed
@hyongtao-code hyongtao-code deleted the rm-return-null branch December 22, 2025 21:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

OS-windows skip issue skip news type-refactor Code refactoring (with no changes in behavior)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants