gh-84461: Silence some compiler warnings on WASM (GH-93978)

This commit is contained in:
Christian Heimes 2022-06-20 13:34:40 +02:00 committed by GitHub
parent affa9f22cf
commit 774ef28814
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 12 additions and 8 deletions

View file

@ -189,8 +189,8 @@ compare_handler(PyObject *func, PyObject *dfl_ign_handler)
return PyObject_RichCompareBool(func, dfl_ign_handler, Py_EQ) == 1;
}
#ifdef HAVE_GETITIMER
/* auxiliary functions for setitimer */
#ifdef HAVE_SETITIMER
/* auxiliary function for setitimer */
static int
timeval_from_double(PyObject *obj, struct timeval *tv)
{
@ -206,7 +206,10 @@ timeval_from_double(PyObject *obj, struct timeval *tv)
}
return _PyTime_AsTimeval(t, tv, _PyTime_ROUND_CEILING);
}
#endif
#if defined(HAVE_SETITIMER) || defined(HAVE_GETITIMER)
/* auxiliary functions for get/setitimer */
Py_LOCAL_INLINE(double)
double_from_timeval(struct timeval *tv)
{