diff --git a/watch-faces/clock/close_enough_face.c b/watch-faces/clock/close_enough_face.c index a0bdb6f4..cde6d28e 100644 --- a/watch-faces/clock/close_enough_face.c +++ b/watch-faces/clock/close_enough_face.c @@ -189,7 +189,7 @@ bool close_enough_face_loop(movement_event_t event, void *context) { char second_word[3]; char third_word[3]; if (five_minute_period == 0) { // " HH OC", - sprintf(first_word, " ", 3); + sprintf(first_word, " "); sprintf(second_word, "%2d", close_enough_hour); strncpy(third_word, oclock_word, 3); } else { // "MM P HH" or "MM 2 HH+1" diff --git a/watch-faces/complication/kitchen_conversions_face.c b/watch-faces/complication/kitchen_conversions_face.c index 7428de3b..c75239fb 100644 --- a/watch-faces/complication/kitchen_conversions_face.c +++ b/watch-faces/complication/kitchen_conversions_face.c @@ -233,7 +233,7 @@ static void display(kitchen_conversions_state_t *state, uint8_t subsec) case input: { char buf[7]; - sprintf(buf, "%06u", state->selection_value); + sprintf(buf, "%06lu", state->selection_value); watch_display_text(WATCH_POSITION_BOTTOM, buf); // Only allow ints for Gas Mk @@ -278,7 +278,7 @@ static void display(kitchen_conversions_state_t *state, uint8_t subsec) { uint32_t rounded = conversion + .5; char buf[7]; - sprintf(buf, "%6u", rounded); + sprintf(buf, "%6lu", rounded); watch_display_text(WATCH_POSITION_BOTTOM, buf); // Make sure LSDs always filled diff --git a/watch-faces/complication/tarot_face.c b/watch-faces/complication/tarot_face.c index ea420281..c10b7710 100644 --- a/watch-faces/complication/tarot_face.c +++ b/watch-faces/complication/tarot_face.c @@ -33,8 +33,6 @@ #include #include "tarot_face.h" -uint32_t arc4random_uniform(uint32_t upper_bound); - #define TAROT_ANIMATION_TICK_FREQUENCY 8 #define FLIPPED_BIT_POS 7 #define FLIPPED_MASK ((uint8_t)(1 << FLIPPED_BIT_POS)) diff --git a/watch-library/shared/watch/watch.h b/watch-library/shared/watch/watch.h index c6a81dd3..d2d8ba1d 100644 --- a/watch-library/shared/watch/watch.h +++ b/watch-library/shared/watch/watch.h @@ -89,3 +89,8 @@ void watch_reset_to_bootloader(void); * FIXME: find a better place for this, a couple of watch faces need it. */ void watch_disable_TRNG(void); + +#ifndef arc4random_uniform +// not sure why this definition is missing but let's put it here for now +uint32_t arc4random_uniform(uint32_t upper_bound); +#endif