X-Git-Url: https://git.kernelconcepts.de/?a=blobdiff_plain;f=common%2FxyzModem.c;h=8e35e99a0df76ded98f8537f3d62d497b0df4c4b;hb=bb839461559b8c0ca10f67492f9f0e878d338a56;hp=39f7d17a7c7dd9baa34125f488296e2ccc51c902;hpb=aaf5e825606a70ddc8fca8e366d8c16a6fd3cc7c;p=karo-tx-uboot.git diff --git a/common/xyzModem.c b/common/xyzModem.c index 39f7d17a7c..8e35e99a0d 100644 --- a/common/xyzModem.c +++ b/common/xyzModem.c @@ -37,7 +37,7 @@ #define BSP 0x08 #define NAK 0x15 #define CAN 0x18 -#define EOF 0x1A /* ^Z for DOS officionados */ +#define EOF 0x1A /* ^Z for DOS aficionados */ #define USE_YMODEM_LENGTH @@ -203,7 +203,7 @@ parse_num (char *s, unsigned long *val, char **es, char *delim) static int zm_dprintf (char *fmt, ...) { - int cur_console; + int cur_console __attribute__((unused)); va_list args; va_start (args, fmt); @@ -217,9 +217,10 @@ zm_dprintf (char *fmt, ...) #ifdef REDBOOT CYGACC_CALL_IF_SET_CONSOLE_COMM (cur_console); #endif + return 0; } -static void +static inline void zm_flush (void) { } @@ -250,7 +251,7 @@ zm_dprintf (char *fmt, ...) return len; } -static void +static inline void zm_flush (void) { #ifdef REDBOOT @@ -275,19 +276,19 @@ zm_dump_buf (void *buf, int len) static unsigned char zm_buf[2048]; static unsigned char *zm_bp; -static void +static inline void zm_new (void) { zm_bp = zm_buf; } -static void +static inline void zm_save (unsigned char c) { *zm_bp++ = c; } -static void +static inline void zm_dump (int line) { zm_dprintf ("Packet at line: %d\n", line); @@ -759,7 +760,8 @@ xyzModem_stream_terminate (bool abort, int (*getc) (void)) * If we don't eat it now, RedBoot will think the user typed it. */ ZM_DEBUG (zm_dprintf ("Trailing gunk:\n")); - while ((c = (*getc) ()) > -1); + while ((c = (*getc) ()) > -1) + ; ZM_DEBUG (zm_dprintf ("\n")); /* * Make a small delay to give terminal programs like minicom