You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Avoid multiline warning strings in libcpychecker.formatstrings
When building with gcc 6, warnings emitted by
libcpychecker.formatstrings.WrongNumberOfVars
showed some whitespace differences in the final " [-Werror]":
ERROR: test_too_many_varargs (__main__.PyArg_ParseTupleAndKeywordsTests)
- [-Werror]
+ [-Werror]
I'm not sure exactly why this has started, but it seems error-prone to
be sending multiline strings through warning_at, so this patch standardizes
these warnings to emit just one line for the warning_at, and then print
the additional information to stderr via extra_info (), generalizing the
approach already used by MismatchingType.
Copy file name to clipboardExpand all lines: tests/cpychecker/PyArg_ParseTuple/incorrect_converters/stderr.txt
+2-4Lines changed: 2 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -1,17 +1,15 @@
1
1
In function 'incorrect_usages_of_converter':
2
-
tests/cpychecker/PyArg_ParseTuple/incorrect_converters/input.c:36:nn: warning: Not enough arguments in call to PyArg_ParseTuple with format string "O&"
2
+
tests/cpychecker/PyArg_ParseTuple/incorrect_converters/input.c:36:nn: warning: Not enough arguments in call to PyArg_ParseTuple with format string "O&" [enabled by default]
3
3
expected 2 extra arguments:
4
4
"int (converter)(PyObject *, T*)" for some type T
5
5
"T*" for some type T
6
6
but got none
7
-
[enabled by default]
8
-
tests/cpychecker/PyArg_ParseTuple/incorrect_converters/input.c:39:nn: warning: Not enough arguments in call to PyArg_ParseTuple with format string "O&"
7
+
tests/cpychecker/PyArg_ParseTuple/incorrect_converters/input.c:39:nn: warning: Not enough arguments in call to PyArg_ParseTuple with format string "O&" [enabled by default]
9
8
expected 2 extra arguments:
10
9
"int (converter)(PyObject *, T*)" for some type T
11
10
"T*" for some type T
12
11
but got 1:
13
12
"int"
14
-
[enabled by default]
15
13
tests/cpychecker/PyArg_ParseTuple/incorrect_converters/input.c:44:nn: warning: Mismatching type in call to PyArg_ParseTuple with format code "O&" [enabled by default]
0 commit comments