]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - common/xyzModem.c
TX6 Release 2013-04-22
[karo-tx-uboot.git] / common / xyzModem.c
index 7a46805e13363495103426e057e2d106545b7e0d..278afebe1302c186c0f6f67c1e341333d0edfd1b 100644 (file)
@@ -69,7 +69,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
 
@@ -100,7 +100,7 @@ static struct
 
 #ifndef REDBOOT                        /*SB */
 typedef int cyg_int32;
-int
+static int
 CYGACC_COMM_IF_GETC_TIMEOUT (char chan, char *c)
 {
 #define DELAY 20
@@ -118,7 +118,7 @@ CYGACC_COMM_IF_GETC_TIMEOUT (char chan, char *c)
   return 0;
 }
 
-void
+static void
 CYGACC_COMM_IF_PUTC (char x, char y)
 {
   putc (y);
@@ -165,7 +165,7 @@ _tolower (char c)
 }
 
 /* Parse (scan) a number */
-bool
+static bool
 parse_num (char *s, unsigned long *val, char **es, char *delim)
 {
   bool first = true;
@@ -235,7 +235,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);
@@ -249,9 +249,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)
 {
 }
@@ -282,7 +283,7 @@ zm_dprintf (char *fmt, ...)
   return len;
 }
 
-static void
+static inline void
 zm_flush (void)
 {
 #ifdef REDBOOT
@@ -307,19 +308,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);
@@ -786,7 +787,7 @@ xyzModem_stream_terminate (bool abort, int (*getc) (void))
       ZM_DEBUG (zm_dprintf ("Engaging cleanup mode...\n"));
       /*
        * Consume any trailing crap left in the inbuffer from
-       * previous recieved blocks. Since very few files are an exact multiple
+       * previous received blocks. Since very few files are an exact multiple
        * of the transfer block size, there will almost always be some gunk here.
        * If we don't eat it now, RedBoot will think the user typed it.
        */