Skip to content

bpo-45574: fix warning about print_escape being unused #29172

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix warning about ``print_escape`` being unused.
2 changes: 2 additions & 0 deletions Parser/tokenizer.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand All @@ -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 */

Expand Down