altos: Fix printf format mis-matches
[fw/altos] / src / micropeak-v2.0 / ao_micropeak.c
index 1bf0999ec1da00c8743e3c7421f0270ce877c99b..a4de48543a70d2cbf24dbad2f184fd73f2cc4870 100644 (file)
@@ -167,9 +167,7 @@ ao_battery_voltage(void)
 static void
 ao_log_erase(void)
 {
-       uint32_t        pos;
-       for (pos = 0; pos < ao_storage_log_max; pos += ao_storage_block)
-               ao_storage_erase(pos);
+       ao_storage_erase(0, ao_storage_log_max);
 }
 
 uint8_t        ao_on_battery;
@@ -227,7 +225,7 @@ ao_log_list(void)
        if (ao_log_present())
                printf ("flight %d start %x end %x\n",
                        1,
-                       0, MAX_LOG_OFFSET >> 8);
+                       0, (unsigned) (MAX_LOG_OFFSET >> 8));
        printf ("done\n");
 }
 
@@ -291,7 +289,7 @@ ao_hsi_init(void)
        stm_rcc.csr |= (1 << STM_RCC_CSR_RMVF);
 }
 
-void
+int
 main(void)
 {
        int i;