Message404786
Recently, GitHub started to show a new warning:
> Check warning on line 999 in Parser/tokenizer.c
> GitHub Actions / Address sanitizer
> Parser/tokenizer.c#L999
> ‘print_escape’ defined but not used [-Wunused-function]
Link: https://github.com/python/cpython/pull/29158/files#file-parser-tokenizer-c-L999
I guess this happens because `print_escape` is only used when `Py_DEBUG` is set:
```
#if defined(Py_DEBUG)
if (Py_DebugFlag) {
printf("line[%d] = ", tok->lineno);
print_escape(stdout, tok->cur, tok->inp - tok->cur);
printf(" tok->done = %d\n", tok->done);
}
#endif
```
Will this be a proper fix? Or do we need it for some other reason?
```
#if defined(Py_DEBUG)
static void
print_escape(FILE *f, const char *s, Py_ssize_t size)
// ...
# endif
```
If it's fine, I will send a PR :) |
|
Date |
User |
Action |
Args |
2021-10-22 15:42:43 | sobolevn | set | recipients:
+ sobolevn |
2021-10-22 15:42:43 | sobolevn | set | messageid: <1634917363.52.0.444019325273.issue45574@roundup.psfhosted.org> |
2021-10-22 15:42:43 | sobolevn | link | issue45574 messages |
2021-10-22 15:42:43 | sobolevn | create | |
|