# HG changeset patch # User Anton Shestakov # Date 1654509512 -14400 # Node ID 34020d1f1635a4f3cc8a77fd1022a306c37a3903 # Parent 87a3f43b9dc2c0419bacc8090ef600eac1450b89 parsers: drop one extra argument to PyErr_Format GCC gave the following warning during `make local`: mercurial/cext/parsers.c: In function 'dirstate_item_from_v1_data': mercurial/cext/parsers.c:413:30: warning: too many arguments for format [-Wformat-extra-args] 413 | "unknown state: `%c` (%d, %d, %d)", state, mode, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ To reproduce, you might need to add the -Wformat-extra-args flag, because it isn't present for me when building for the default python3. But I can see this warning while simply building 6.1 with `make PYTHON=python2 clean local`. I don't think this NULL was useful, because other instances of PyErr_Format() don't have any NULLs as the final argument, but keep in mind that I don't know python's C API. diff -r 87a3f43b9dc2 -r 34020d1f1635 mercurial/cext/parsers.c --- a/mercurial/cext/parsers.c Fri Jun 03 17:39:58 2022 +0200 +++ b/mercurial/cext/parsers.c Mon Jun 06 13:58:32 2022 +0400 @@ -374,7 +374,7 @@ } else { PyErr_Format(PyExc_RuntimeError, "unknown state: `%c` (%d, %d, %d)", state, mode, - size, mtime, NULL); + size, mtime); Py_DECREF(t); return NULL; }