silence warnings

This commit is contained in:
joeycastillo 2023-07-29 07:03:49 -04:00
parent 6a69e0a691
commit 1377d36622
2 changed files with 5 additions and 4 deletions

View file

@ -28,6 +28,7 @@
void flashlight_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr) { void flashlight_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr) {
(void) settings; (void) settings;
(void) watch_face_index;
if (*context_ptr == NULL) { if (*context_ptr == NULL) {
*context_ptr = malloc(sizeof(flashlight_state_t)); *context_ptr = malloc(sizeof(flashlight_state_t));
memset(*context_ptr, 0, sizeof(flashlight_state_t)); memset(*context_ptr, 0, sizeof(flashlight_state_t));
@ -38,14 +39,14 @@ void flashlight_face_setup(movement_settings_t *settings, uint8_t watch_face_ind
void flashlight_face_activate(movement_settings_t *settings, void *context) { void flashlight_face_activate(movement_settings_t *settings, void *context) {
(void) settings; (void) settings;
flashlight_state_t *state = (flashlight_state_t *)context; (void) context;
watch_enable_digital_output(A2); watch_enable_digital_output(A2);
watch_set_pin_level(A2, false); watch_set_pin_level(A2, false);
} }
bool flashlight_face_loop(movement_event_t event, movement_settings_t *settings, void *context) { bool flashlight_face_loop(movement_event_t event, movement_settings_t *settings, void *context) {
flashlight_state_t *state = (flashlight_state_t *)context; (void) context;
switch (event.event_type) { switch (event.event_type) {
case EVENT_ACTIVATE: case EVENT_ACTIVATE:

View file

@ -278,14 +278,14 @@ static void _randonaut_face_display(randonaut_state_t *state) {
sprintf(buf, "BE # %d", state->point.bearing ); sprintf(buf, "BE # %d", state->point.bearing );
break; break;
case 3: // latitude DD._____ case 3: // latitude DD._____
sprintf(state->scratchpad, "%07d", abs(state->point.latitude)); sprintf(state->scratchpad, "%07d", abs((int32_t)(state->point.latitude)));
sprintf(buf, "LA #%c %c%c ", state->point.latitude < 0 ? '-' : '+', state->scratchpad[0], state->scratchpad[1]); sprintf(buf, "LA #%c %c%c ", state->point.latitude < 0 ? '-' : '+', state->scratchpad[0], state->scratchpad[1]);
break; break;
case 4: // latitude __.DDDDD case 4: // latitude __.DDDDD
sprintf(buf, "LA , %c%c%c%c%c", state->scratchpad[2], state->scratchpad[3],state->scratchpad[4], state->scratchpad[5],state->scratchpad[6]); sprintf(buf, "LA , %c%c%c%c%c", state->scratchpad[2], state->scratchpad[3],state->scratchpad[4], state->scratchpad[5],state->scratchpad[6]);
break; break;
case 5: // longitude DD._____ case 5: // longitude DD._____
sprintf(state->scratchpad, "%08d", abs(state->point.longitude)); sprintf(state->scratchpad, "%08d", abs((int32_t)(state->point.longitude)));
sprintf(buf, "LO #%c%c%c%c ", state->point.longitude < 0 ? '-' : '+',state->scratchpad[0], state->scratchpad[1], state->scratchpad[2]); sprintf(buf, "LO #%c%c%c%c ", state->point.longitude < 0 ? '-' : '+',state->scratchpad[0], state->scratchpad[1], state->scratchpad[2]);
break; break;
case 6: // longitude __.DDDDD case 6: // longitude __.DDDDD