From ec7c09b9bc9a8f333a0295b41ea88986c320448c Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Thu, 13 May 2021 02:27:56 +0200 Subject: bpo-44113: Fix compiler warning in PySys_AddWarnOption() (GH-26084) Ignore Py_DEPRECATED() warning on purpose. --- Python/sysmodule.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Python/sysmodule.c b/Python/sysmodule.c index ac49f78..f1f4492 100644 --- a/Python/sysmodule.c +++ b/Python/sysmodule.c @@ -2293,7 +2293,10 @@ PySys_AddWarnOption(const wchar_t *s) unicode = PyUnicode_FromWideChar(s, -1); if (unicode == NULL) return; +_Py_COMP_DIAG_PUSH +_Py_COMP_DIAG_IGNORE_DEPR_DECLS PySys_AddWarnOptionUnicode(unicode); +_Py_COMP_DIAG_POP Py_DECREF(unicode); } -- cgit v0.12