mirror of
https://github.com/python/cpython.git
synced 2025-07-30 06:34:15 +00:00
bpo-45574: fix warning about print_escape
being unused (GH-29172) (#29176)
It used to be like this: <img width="1232" alt="Снимок экрана 2021-10-22 в 23 07 40" src="https://user-images.githubusercontent.com/4660275/138516608-fef6ec01-a96a-40f4-81ef-52265b0f536b.png"> Quick `grep` tells that it is just used in one place under `Py_DEBUG`:f6e8b80d20/Parser/tokenizer.cGH-L1047-L1051
<img width="752" alt="Снимок экрана 2021-10-22 в 23 08 09" src="https://user-images.githubusercontent.com/4660275/138516684-ea503136-1e92-48a5-95bb-419e190d5866.png"> I am not sure, but it also looks like a private thing, it should not affect other users. Automerge-Triggered-By: GH:pablogsal (cherry picked from commit4bc5473a42
) Co-authored-by: Nikita Sobolev <mail@sobolevn.me> Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
This commit is contained in:
parent
f812fef2f8
commit
cadf06eab7
2 changed files with 3 additions and 0 deletions
|
@ -0,0 +1 @@
|
|||
Fix warning about ``print_escape`` being unused.
|
|
@ -994,6 +994,7 @@ tok_underflow_file(struct tok_state *tok) {
|
|||
return tok->done == E_OK;
|
||||
}
|
||||
|
||||
#if defined(Py_DEBUG)
|
||||
static void
|
||||
print_escape(FILE *f, const char *s, Py_ssize_t size)
|
||||
{
|
||||
|
@ -1020,6 +1021,7 @@ print_escape(FILE *f, const char *s, Py_ssize_t size)
|
|||
}
|
||||
putc('"', f);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Get next char, updating state; error code goes into tok->done */
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue