From ecb05a48d946dfcfc30b3003a28c56e52f9f5b35 Mon Sep 17 00:00:00 2001 From: joeycastillo Date: Sat, 31 Aug 2024 11:16:01 -0400 Subject: [PATCH] fix build warnings --- .../watch_faces/sensor/accel_interrupt_count_face.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/movement/watch_faces/sensor/accel_interrupt_count_face.c b/movement/watch_faces/sensor/accel_interrupt_count_face.c index 36902381..6473988a 100644 --- a/movement/watch_faces/sensor/accel_interrupt_count_face.c +++ b/movement/watch_faces/sensor/accel_interrupt_count_face.c @@ -31,11 +31,12 @@ // hacky hacky! uint32_t *ptr_to_count = 0; -void *accel_interrupt_handler(void) { +void accel_interrupt_handler(void); +void accel_interrupt_handler(void) { (*ptr_to_count)++; } -static void _accel_interrupt_count_face_update_display(movement_settings_t *settings, accel_interrupt_count_state_t *state) { +static void _accel_interrupt_count_face_update_display(accel_interrupt_count_state_t *state) { char buf[11]; if (state->running) { @@ -45,7 +46,7 @@ static void _accel_interrupt_count_face_update_display(movement_settings_t *sett } // "AC"celerometer "IN"terrupts - snprintf(buf, 11, "AC1N%6d", state->count); + snprintf(buf, 11, "AC1N%6ld", state->count); watch_display_string(buf, 0); printf("%s\n", buf); } @@ -118,7 +119,7 @@ bool accel_interrupt_count_face_loop(movement_event_t event, movement_settings_t if (!state->running) { state->count = 0; } - _accel_interrupt_count_face_update_display(settings, state); + _accel_interrupt_count_face_update_display(state); break; case EVENT_ALARM_BUTTON_UP: if (state->running) { @@ -128,11 +129,11 @@ bool accel_interrupt_count_face_loop(movement_event_t event, movement_settings_t state->running = true; watch_register_interrupt_callback(A4, accel_interrupt_handler, INTERRUPT_TRIGGER_RISING); } - _accel_interrupt_count_face_update_display(settings, state); + _accel_interrupt_count_face_update_display(state); break; case EVENT_ACTIVATE: case EVENT_TICK: - _accel_interrupt_count_face_update_display(settings, state); + _accel_interrupt_count_face_update_display(state); break; case EVENT_ALARM_LONG_PRESS: if (!state->running) {