Skip to content

Commit 07a2a49

Browse files
CarpeNoctemmatheusmoreira
authored andcommitted
french_revolutionary face: fix compiler warning and uninitialized date_time variable
1 parent 82ed355 commit 07a2a49

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

movement/watch_faces/clock/french_revolutionary_face.c

+4-2
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828

2929
void french_revolutionary_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr) {
3030
(void) settings;
31+
(void) watch_face_index;
3132
if (*context_ptr == NULL) {
3233
*context_ptr = malloc(sizeof(french_revolutionary_state_t));
3334
memset(*context_ptr, 0, sizeof(french_revolutionary_state_t));
@@ -64,7 +65,7 @@ bool french_revolutionary_face_loop(movement_event_t event, movement_settings_t
6465
break;
6566
case EVENT_TICK:
6667
case EVENT_LOW_ENERGY_UPDATE:
67-
68+
6869
date_time = watch_rtc_get_date_time();
6970

7071
decimal_time = get_decimal_time(&date_time);
@@ -107,6 +108,7 @@ bool french_revolutionary_face_loop(movement_event_t event, movement_settings_t
107108
state->use_am_pm = !state->use_am_pm;
108109
if (state->use_am_pm) {
109110
watch_clear_indicator(WATCH_INDICATOR_24H);
111+
date_time = watch_rtc_get_date_time();
110112
if (date_time.unit.hour < 12) { watch_clear_indicator(WATCH_INDICATOR_PM); }
111113
else { watch_set_indicator(WATCH_INDICATOR_PM); }
112114
} else {
@@ -240,4 +242,4 @@ char fix_character_one(char digit) {
240242
break;
241243
}
242244
return return_char;
243-
}
245+
}

0 commit comments

Comments
 (0)