From fb3e41313ff876b6839de9329dd728738707c74e Mon Sep 17 00:00:00 2001 From: sobolevn Date: Fri, 22 Oct 2021 23:06:55 +0300 Subject: [PATCH] bpo-45574: fix warning about `print_escape` being unused --- .../next/Library/2021-10-22-23-06-33.bpo-45574.svqA84.rst | 1 + Parser/tokenizer.c | 2 ++ 2 files changed, 3 insertions(+) create mode 100644 Misc/NEWS.d/next/Library/2021-10-22-23-06-33.bpo-45574.svqA84.rst diff --git a/Misc/NEWS.d/next/Library/2021-10-22-23-06-33.bpo-45574.svqA84.rst b/Misc/NEWS.d/next/Library/2021-10-22-23-06-33.bpo-45574.svqA84.rst new file mode 100644 index 00000000000000..b404d24473960c --- /dev/null +++ b/Misc/NEWS.d/next/Library/2021-10-22-23-06-33.bpo-45574.svqA84.rst @@ -0,0 +1 @@ +Fix warning about ``print_escape`` being unused. diff --git a/Parser/tokenizer.c b/Parser/tokenizer.c index 789a10b28fd1b5..705da00463d1a7 100644 --- a/Parser/tokenizer.c +++ b/Parser/tokenizer.c @@ -995,6 +995,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) { @@ -1021,6 +1022,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 */