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

gh-131296: Fix Windows build warnings #131487

Merged
merged 1 commit into from
Mar 20, 2025
Merged

Conversation

vstinner
Copy link
Member

Fix the following warnings:

  • Modules_io\fileio.c(1296,13): unused variable 'self'
  • Modules_io\winconsoleio.c(334,9): unused variable 'fd_is_own'
  • Modules\faulthandler.c(409,11): unused variable 'flags'
  • Modules\posixmodule.c(5699,9): unused variable 'pathError'
  • PC\winreg.c(2077,5): suggest braces around initialization of subobject
  • PC\winreg.c(34,13): unused variable 'errNotAHandle'
  • Python\fileutils.c(132,12): result of comparison of constant 1114111 with expression of type 'wchar_t' (aka 'unsigned short') is always false
  • Python\fileutils.c(58,21): unused variable 'INCOMPLETE_CHARACTER'
  • Python\sysmodule.c(2534,21): unused variable 'perf_map_state'

Fix the following warnings:

* Modules\_io\fileio.c(1296,13): unused variable 'self'
* Modules\_io\winconsoleio.c(334,9): unused variable 'fd_is_own'
* Modules\faulthandler.c(409,11): unused variable 'flags'
* Modules\posixmodule.c(5699,9): unused variable 'pathError'
* PC\winreg.c(2077,5): suggest braces around initialization of
  subobject
* PC\winreg.c(34,13): unused variable 'errNotAHandle'
* Python\fileutils.c(132,12): result of comparison of constant
  1114111 with expression of type 'wchar_t' (aka 'unsigned short') is
  always false
* Python\fileutils.c(58,21): unused variable 'INCOMPLETE_CHARACTER'
* Python\sysmodule.c(2534,21): unused variable 'perf_map_state'
@vstinner vstinner requested review from a team and ericsnowcurrently as code owners March 20, 2025 01:00
@vstinner vstinner merged commit 486d537 into python:main Mar 20, 2025
47 checks passed
@vstinner vstinner deleted the fix_win_warns branch March 20, 2025 11:03
@vstinner
Copy link
Member Author

Ah, these compiler warnings are from clang if I understood correctly: https://github.com/python/cpython/actions/runs/13967620949/job/39101561262?pr=131495

@zooba
Copy link
Member

zooba commented Mar 20, 2025

these compiler warnings are from clang

Yeah, they will be. MSVC warnings have an error code, while clang is going to show the -W<name> option.

@chris-eibl has been working on clang-cl warnings. They aren't blocking, but probably do show things that are worth fixing. (I'm guessing we've just globally suppressed them on MSVC, as all of those do exist in MSVC.)

@chris-eibl
Copy link
Contributor

Yeah, see #131296
I think you've made some of my PRs I've created some days ago obsolete.
Maybe you've even fixed some more :)

In total, there have been still 40ish warnings before my PRs were merged.

How to proceed?

I'll look through yours and mine and will close the obsolete ones?

@chris-eibl
Copy link
Contributor

@vstinner: I think I've closed all the duplicates and rebased #131304. There is one more open and I plan to do some more - there are still some warnings, but feel free to take over :)

Can you update the issue title so it gets linked with #131296?

@vstinner vstinner changed the title Fix Windows build warnings gh-131296: Fix Windows build warnings Mar 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants