]> git.earman.xyz Git - sensor-watch.git/commitdiff
silence warnings
authorJoey Castillo <joeycastillo@utexas.edu>
Sun, 6 Jul 2025 16:40:06 +0000 (12:40 -0400)
committerJoey Castillo <joeycastillo@utexas.edu>
Sun, 6 Jul 2025 16:40:06 +0000 (12:40 -0400)
watch-faces/clock/close_enough_face.c
watch-faces/complication/kitchen_conversions_face.c
watch-faces/complication/tarot_face.c
watch-library/shared/watch/watch.h

index a0bdb6f4d6df6d1f46ff104ec08fbb83a8396ce7..cde6d28ec8e7c5389ce44f9405eb2057c9c7d681 100644 (file)
@@ -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"
index 7428de3b85911afb42627a9798a123456c5ef18c..c75239fbcc2aff51b60bb123a5702729953e58f9 100644 (file)
@@ -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
index ea420281d33c810632a8459bb57ea09197a178a4..c10b771095a8cabee1d07f8f868c88c77420dc1f 100644 (file)
@@ -33,8 +33,6 @@
 #include <string.h>
 #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))
index c6a81dd3ca28404bdc2f1d6d02ebb7e7d9675e95..d2d8ba1ddd8205cf2df9b3318e1cb710cbef65ad 100644 (file)
@@ -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