From 4a88c0dc1b300b31b4ca59f18db848d078dc2d04 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Thu, 13 May 2021 00:47:18 +0200 Subject: [PATCH] bpo-44113: Fix compiler warning in PySys_AddWarnOption() --- Python/sysmodule.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Python/sysmodule.c b/Python/sysmodule.c index ac49f7867a5cb3..f1f4492f83c7b1 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); }