Fix formatting warnings for PyBytesWriter_Format#152
Merged
vstinner merged 2 commits intopython:mainfrom Oct 3, 2025
Merged
Conversation
vstinner
reviewed
Oct 3, 2025
Member
vstinner
left a comment
There was a problem hiding this comment.
I cannot reproduce the issue with GCC 15.2.1. What's your GCC version?
My test: run python3 runtests.py --current -v with setup.py changes.
bc492c3 to
781185c
Compare
781185c to
ab343af
Compare
Contributor
Author
|
I was testing on macOS (15) with Python 3.13.7. I suppose Clang is a bit more picky (?). I did a (test) CI run with only the extra warnings added to |
Member
Ah you're using clang, ok. Using clang, I can reproduce the compiler warning. |
Member
|
Merged, thanks for the fix. |
Member
|
I'm surprised that |
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 C formatting warnings and fix declaration.
With extra formatting warnings, as we have in PyGObject, we get warnings like:
This PR adds formatting warnings (errors) to the test build and addresses the
format-nonliteralwarning by providing an appropriate prototype for this function.