-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
gh-133256: Add _Py_NONSTRING macro #133257
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
Fix GCC 15 compiler warnings such as: Modules/fcntlmodule.c:27:36: warning: initializer-string for array of 'char' truncates NUL terminator but destination lacks 'nonstring' attribute (9 chars into 8 available) [-Wunterminated-string-initialization] static const char guard[GUARDSZ] = "\x00\xfa\x69\xc4\x67\xa3\x6c\x58";
Add |
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, but in fcntlmodule.c
we could simply use array initializer.
|
Fix GCC 15 compiler warnings such as: In file included from Python/pylifecycle.c:26: Include/internal/pycore_runtime.h:47:26: warning: initializer-string for array of 'char' truncates NUL terminator but destination lacks 'nonstring' attribute (9 chars into 8 available) [-Wunterminated-string-initialization] 47 | #define _Py_Debug_Cookie "xdebugpy" | ^~~~~~~~~~ (cherry picked from commit e26bafd)
GH-135135 is a backport of this pull request to the 3.13 branch. |
gh-133256: Add _Py_NONSTRING macro (#133257) Fix GCC 15 compiler warnings such as: In file included from Python/pylifecycle.c:26: Include/internal/pycore_runtime.h:47:26: warning: initializer-string for array of 'char' truncates NUL terminator but destination lacks 'nonstring' attribute (9 chars into 8 available) [-Wunterminated-string-initialization] 47 | #define _Py_Debug_Cookie "xdebugpy" | ^~~~~~~~~~ (cherry picked from commit e26bafd)
Fix GCC 15 compiler warnings such as: