From: Victor Stinner Date: Thu, 13 May 2021 00:27:56 +0000 (+0200) Subject: bpo-44113: Fix compiler warning in PySys_AddWarnOption() (GH-26084) X-Git-Tag: v3.11.0a1~1137 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ec7c09b9bc9a8f333a0295b41ea88986c320448c;p=thirdparty%2FPython%2Fcpython.git bpo-44113: Fix compiler warning in PySys_AddWarnOption() (GH-26084) Ignore Py_DEPRECATED() warning on purpose. --- diff --git a/Python/sysmodule.c b/Python/sysmodule.c index ac49f7867a5c..f1f4492f83c7 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); }