diff options
| author | Stanislaw Halik <sthalik@misaki.pl> | 2019-04-29 15:57:53 +0200 | 
|---|---|---|
| committer | Stanislaw Halik <sthalik@misaki.pl> | 2019-04-29 15:57:53 +0200 | 
| commit | 50aac35fd1ea04861d108ddc98e9ef5637878ddd (patch) | |
| tree | e0862ebf2ec971420c9e023469f3e257722d2562 | |
| parent | d9a3668586780594eb5260535ce45c9a0b6f1c1c (diff) | |
compat/timer: check status code on OSX
| -rw-r--r-- | compat/timer.cpp | 5 | 
1 files changed, 3 insertions, 2 deletions
| diff --git a/compat/timer.cpp b/compat/timer.cpp index 55eb200d..4bfc37d9 100644 --- a/compat/timer.cpp +++ b/compat/timer.cpp @@ -92,7 +92,8 @@ void Timer::gettime(timespec* ts)  static mach_timebase_info_data_t otr_get_mach_frequency()  {      mach_timebase_info_data_t timebase_info; -    (void)mach_timebase_info(&timebase_info); +    kern_return_t status = mach_timebase_info(&timebase_info); +    assert(status == KERN_SUCCESS && "mach_timebase_info failed");      return timebase_info;  } @@ -110,7 +111,7 @@ void Timer::gettime(timespec* ts)  void Timer::gettime(timespec* ts)  { -    [[maybe_unused]] int error = clock_gettime(CLOCK_MONOTONIC, ts); +    int error = clock_gettime(CLOCK_MONOTONIC, ts);      assert(error == 0 && "clock_gettime failed");  }; | 
