]> git.kernelconcepts.de Git - karo-tx-redboot.git/blobdiff - packages/redboot/v2_0/src/xyzModem.c
unified MX27, MX25, MX37 trees
[karo-tx-redboot.git] / packages / redboot / v2_0 / src / xyzModem.c
index 25794b8a0225355d4ab57e8c665a488b6eedfdac..cb0e197c451e8245a3c154da810b34fa2958861a 100644 (file)
@@ -319,7 +319,7 @@ xyzModem_get_hdr(void)
 int 
 xyzModem_stream_open(connection_info_t *info, int *err)
 {
-    int console_chan, stat;
+    int console_chan, stat=0;
     int retries = xyzModem_MAX_RETRIES;
     int crc_retries = xyzModem_MAX_RETRIES_WITH_CRC;
 
@@ -372,7 +372,7 @@ xyzModem_stream_open(connection_info_t *info, int *err)
                 // skip filename
                 while (*xyz.bufp++);
                 // get the length
-                parse_num(xyz.bufp, &xyz.file_length, NULL, " ");
+                parse_num((char *)xyz.bufp, &xyz.file_length, NULL, " ");
 #endif
                 // The rest of the file name data block quietly discarded
                 xyz.tx_ack = true;
@@ -398,7 +398,7 @@ xyzModem_stream_open(connection_info_t *info, int *err)
 }
 
 int 
-xyzModem_stream_read(char *buf, int size, int *err)
+xyzModem_stream_read(void *buf, int size, int *err)
 {
     int stat, total, len;
     int retries;
@@ -487,7 +487,7 @@ xyzModem_stream_read(char *buf, int size, int *err)
             if (size < len) len = size;
             memcpy(buf, xyz.bufp, len);
             size -= len;
-            buf += len;
+            buf = (char *)buf + len;
             total += len;
             xyz.len -= len;
             xyz.bufp += len;