ao_flash_task: Add casts to reduce -Wconversion warnings
[fw/altos] / src / product / ao_flash_task.c
index a680ca181e7afd2771bc35f3d71ddab91fe3cbe8..8ae9b2e5d3fe4b26a4680ee519cbee4911ec02d4 100644 (file)
@@ -26,6 +26,7 @@ void
 ao_panic(uint8_t reason)
 {
        (void) reason;
+       for (;;);
 }
 
 void
@@ -48,7 +49,7 @@ ao_application(void)
 static uint32_t
 ao_get_hex32(void)
 {
-       int8_t  n;
+       int     n;
        uint32_t v = 0;
 
        for (;;) {
@@ -65,7 +66,7 @@ ao_get_hex32(void)
                        n = n - ('A' - 10);
                else
                        break;
-               v = (v << 4) | n;
+               v = (v << 4) | (uint8_t) n;
                n = ao_usb_getchar();
        }
        return v;