ao_flash_task: Add casts to reduce -Wconversion warnings
[fw/altos] / src / product / ao_flash_task.c
index 9a12add659a00af10bc62b48b5042b62f834f73e..8ae9b2e5d3fe4b26a4680ee519cbee4911ec02d4 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -25,10 +26,11 @@ void
 ao_panic(uint8_t reason)
 {
        (void) reason;
+       for (;;);
 }
 
 void
-ao_put_string(__code char *s)
+ao_put_string(const char *s)
 {
        char    c;
        while ((c = *s++)) {
@@ -47,7 +49,7 @@ ao_application(void)
 static uint32_t
 ao_get_hex32(void)
 {
-       int8_t  n;
+       int     n;
        uint32_t v = 0;
 
        for (;;) {
@@ -64,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;