Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit781185c

Browse files
committed
Add extra format warnings
1 parentc3c63ee commit781185c

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

‎pythoncapi_compat.h‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2529,6 +2529,10 @@ PyBytesWriter_WriteBytes(PyBytesWriter *writer,
25292529
return0;
25302530
}
25312531

2532+
staticinlineint
2533+
PyBytesWriter_Format(PyBytesWriter *writer,constchar *format, ...)
2534+
Py_GCC_ATTRIBUTE((format(printf,2,0)));
2535+
25322536
staticinlineint
25332537
PyBytesWriter_Format(PyBytesWriter *writer,constchar *format, ...)
25342538
{

‎tests/setup.py‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,11 @@
3434
'-Wconversion',
3535
# /usr/lib64/pypy3.7/include/pyport.h:68:20: error: redefinition of typedef
3636
# 'Py_hash_t' is a C11 feature
37-
"-Wno-typedef-redefinition",
37+
'-Wno-typedef-redefinition',
38+
# Formatting checks
39+
'-Wformat',
40+
'-Wformat-nonliteral',
41+
'-Wformat-security',
3842
))
3943
CFLAGS=COMMON_FLAGS+ [
4044
# Use C99 for pythoncapi_compat.c which initializes PyModuleDef with a

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp