forked from FFmpeg/FFmpeg
lavu: use address-of operator checking clock_gettime
When targeting a recent enough macOS/iOS version that has clock_gettime it won't be a weak symbol, in which case clang warns for this check as it's always true: warning: address of function 'clock_gettime' will always evaluate to 'true' This warning is silenced by using the address-of operator to make the intent explicit.
This commit is contained in:
parent
6080c5e24f
commit
d67c6c7f6f
1 changed files with 2 additions and 2 deletions
|
@ -57,7 +57,7 @@ int64_t av_gettime_relative(void)
|
||||||
{
|
{
|
||||||
#if HAVE_CLOCK_GETTIME && defined(CLOCK_MONOTONIC)
|
#if HAVE_CLOCK_GETTIME && defined(CLOCK_MONOTONIC)
|
||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
if (clock_gettime)
|
if (&clock_gettime)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
struct timespec ts;
|
struct timespec ts;
|
||||||
|
@ -72,7 +72,7 @@ int av_gettime_relative_is_monotonic(void)
|
||||||
{
|
{
|
||||||
#if HAVE_CLOCK_GETTIME && defined(CLOCK_MONOTONIC)
|
#if HAVE_CLOCK_GETTIME && defined(CLOCK_MONOTONIC)
|
||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
if (!clock_gettime)
|
if (!&clock_gettime)
|
||||||
return 0;
|
return 0;
|
||||||
#endif
|
#endif
|
||||||
return 1;
|
return 1;
|
||||||
|
|
Loading…
Add table
Reference in a new issue