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
parent d7fade2c44
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
/* ---------------------------------------------- */

View file

@ -461,6 +461,7 @@ bool obs_scripting_python_runtime_linked(void)
void obs_scripting_python_version(char *version, size_t version_length)
{
UNUSED_PARAMETER(version_length);
version[0] = 0;
}
#endif