Skip to content

Commit

Permalink
Remove unused function
Browse files Browse the repository at this point in the history
Building with clang warns:

tests/posix/timers/src/clock.c:49:20: error: unused function
'tp_diff_in_range_ns' [-Werror,-Wunused-function]
static inline bool tp_diff_in_range_ns(const struct timespec *a, const struct timespec *b,
                   ^
  • Loading branch information
thughes committed Jan 10, 2025
1 parent 678b8a0 commit 3b2c97e
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions tests/posix/timers/src/clock.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,6 @@ static inline int64_t ts_to_ns(const struct timespec *ts)
_decl_op(bool, tp_ge, >=); /* a >= b */
_decl_op(int64_t, tp_diff, -); /* a - b */

/* lo <= (a - b) < hi */
static inline bool tp_diff_in_range_ns(const struct timespec *a, const struct timespec *b,
int64_t lo, int64_t hi)
{
int64_t diff = tp_diff(a, b);

return diff >= lo && diff < hi;
}

ZTEST(posix_timers, test_clock_gettime)
{
struct timespec ts;
Expand Down

0 comments on commit 3b2c97e

Please sign in to comment.