Skip to content

Commit

Permalink
Merge pull request #517 from eleanorLYJ/fix-compile-warning
Browse files Browse the repository at this point in the history
Fix unused function warning in 'mult_frac'
  • Loading branch information
jserv authored Dec 1, 2024
2 parents 6647215 + fee0794 commit 576f30a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,15 @@
* Reference:
* https://elixir.bootlin.com/linux/v6.10.7/source/include/linux/math.h#L121
*/
#if !defined(HAVE_POSIX_TIMER)
static inline uint64_t mult_frac(uint64_t x, uint64_t n, uint64_t d)
{
const uint64_t q = x / d;
const uint64_t r = x % d;

return q * n + r * n / d;
}
#endif

static void get_time_info(int32_t *tv_sec, int32_t *tv_nsec)
{
Expand Down

0 comments on commit 576f30a

Please sign in to comment.