]> git.sur5r.net Git - openocd/commitdiff
MinGW build fixes
authorFreddie Chopin <freddie_chopin@op.pl>
Mon, 28 Dec 2009 20:08:48 +0000 (21:08 +0100)
committerDavid Brownell <dbrownell@users.sourceforge.net>
Mon, 28 Dec 2009 21:09:31 +0000 (13:09 -0800)
Print "ssize_t" as "%ld" (+ cast to long) not as "%zu".
Official MinGW (gcc 3.4.5) doesn't understand "z" flag.

Signed-off-by: Freddie Chopin <freddie_chopin@op.pl>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
src/flash/mflash.c
src/flash/nand/tcl.c
src/flash/nor/tcl.c
src/target/target.c

index 5c8ca8c16b46cc6912301c814cc3faa38a2e8999..04f5c7751ab3455b4e636bd3abf4153b1345d934 100644 (file)
@@ -751,8 +751,8 @@ COMMAND_HANDLER(mg_write_cmd)
 
        if (duration_measure(&bench) == ERROR_OK)
        {
-               command_print(CMD_CTX, "wrote %zu byte from file %s "
-                               "in %fs (%0.3f kB/s)", fileio.size, CMD_ARGV[1],
+               command_print(CMD_CTX, "wrote %ld bytes from file %s "
+                               "in %fs (%0.3f kB/s)", (long)fileio.size, CMD_ARGV[1],
                                duration_elapsed(&bench), duration_kbps(&bench, fileio.size));
        }
 
index ad77d7ca852ca83088c35987e2abbc600eb58da6..4f90c7b112f186671d9daa9f0027a2ac9cdd448b 100644 (file)
@@ -409,8 +409,8 @@ COMMAND_HANDLER(handle_nand_dump_command)
 
        if (nand_fileio_finish(&s) == ERROR_OK)
        {
-               command_print(CMD_CTX, "dumped %zu bytes in %fs (%0.3f kb/s)", 
-                               s.fileio.size, duration_elapsed(&s.bench),
+               command_print(CMD_CTX, "dumped %ld bytes in %fs (%0.3f kb/s)", 
+                               (long)s.fileio.size, duration_elapsed(&s.bench),
                                duration_kbps(&s.bench, s.fileio.size));
        }
        return ERROR_OK;
index 1097bdf8f3b27f58af40f0e62d24536152588a46..ad2b8f11d89402673d880b509f4f5a0adab35879 100644 (file)
@@ -625,9 +625,9 @@ COMMAND_HANDLER(handle_flash_write_bank_command)
 
        if ((ERROR_OK == retval) && (duration_measure(&bench) == ERROR_OK))
        {
-               command_print(CMD_CTX, "wrote %zu bytes from file %s to flash bank %u"
+               command_print(CMD_CTX, "wrote %ld bytes from file %s to flash bank %u"
                                " at offset 0x%8.8" PRIx32 " in %fs (%0.3f kb/s)",
-                               fileio.size, CMD_ARGV[1], p->bank_number, offset,
+                               (long)fileio.size, CMD_ARGV[1], p->bank_number, offset,
                                duration_elapsed(&bench), duration_kbps(&bench, fileio.size));
        }
 
index ebddbba823d2fca74574169ff33a6640f0caaa23..8cb53b36dfc6c4667271bf360ea037e51dadb9ee 100644 (file)
@@ -2488,7 +2488,7 @@ COMMAND_HANDLER(handle_dump_image_command)
        if ((ERROR_OK == retval) && (duration_measure(&bench) == ERROR_OK))
        {
                command_print(CMD_CTX,
-                               "dumped %zu bytes in %fs (%0.3f kb/s)", fileio.size,
+                               "dumped %ld bytes in %fs (%0.3f kb/s)", (long)fileio.size,
                                duration_elapsed(&bench), duration_kbps(&bench, fileio.size));
        }