modules/local_time: Silence compiler warning.
Change-Id: If1fe4fcdf38171c696498d7a3d74d4a1fbb7b706
diff --git a/modules/local_time/local_time_hw.c b/modules/local_time/local_time_hw.c
index ac597f4..899c38a 100644
--- a/modules/local_time/local_time_hw.c
+++ b/modules/local_time/local_time_hw.c
@@ -28,6 +28,9 @@
#include <hardware/hardware.h>
#include <hardware/local_time_hal.h>
+// We only support gcc and clang, both of which support this attribute.
+#define UNUSED_ARGUMENT __attribute((unused))
+
struct stub_local_time_device {
struct local_time_hw_device device;
};
@@ -51,7 +54,8 @@
return (int64_t)now;
}
-static uint64_t ltdev_get_local_freq(struct local_time_hw_device* dev)
+static uint64_t ltdev_get_local_freq(
+ struct local_time_hw_device* dev UNUSED_ARGUMENT)
{
// For better or worse, linux clock_gettime routines normalize all clock
// frequencies to 1GHz