From 3b2c97e65d5481d5a038706ffca35e05427b9c5e Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Fri, 10 Jan 2025 10:46:20 -0800 Subject: [PATCH] Remove unused function 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, ^ --- tests/posix/timers/src/clock.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/tests/posix/timers/src/clock.c b/tests/posix/timers/src/clock.c index 5dd30655ffc280..cc30fee8cadc12 100644 --- a/tests/posix/timers/src/clock.c +++ b/tests/posix/timers/src/clock.c @@ -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;