obs-scripting: Fix compilation warnings on Clang and GCC

* Fix unused-parameter when Python is disabled
* Calm PySys_SetArgv deprecation since Python 3.11
This commit is contained in:
tytan652 2023-01-23 08:34:41 +01:00 • committed by Jim
commit e13e0937a2
2 changed files with 4 additions and 0 deletions

View file

@ -1702,7 +1702,10 @@ bool obs_scripting_load_python(const char *python_path)
wchar_t *argv[] = {L"", NULL};
int argc = sizeof(argv) / sizeof(wchar_t *) - 1;
PRAGMA_WARN_PUSH
PRAGMA_WARN_DEPRECATION
PySys_SetArgv(argc, argv);
PRAGMA_WARN_POP
#ifdef DEBUG_PYTHON_STARTUP
/* ---------------------------------------------- */