diff options
author | Marc Schink <openocd-dev@marcschink.de> | 2015-10-02 17:35:15 +0200 |
---|---|---|
committer | Freddie Chopin <freddie.chopin@gmail.com> | 2015-11-03 22:14:07 +0000 |
commit | 24d9f0cfa0ee84e927d84957cab22c6571fa3185 (patch) | |
tree | 6b3b46834c4537b93852662d68d8b5c209fe54a5 /src/flash/mflash.c | |
parent | 0578e4c4f4fbaec3e833fec0c118cee4698ce7c6 (diff) | |
download | riscv-openocd-24d9f0cfa0ee84e927d84957cab22c6571fa3185.zip riscv-openocd-24d9f0cfa0ee84e927d84957cab22c6571fa3185.tar.gz riscv-openocd-24d9f0cfa0ee84e927d84957cab22c6571fa3185.tar.bz2 |
helper/fileio: Use size_t for file size.
Change-Id: Ie116b44ba15e8ae41ca9ed4a354a82b2c4a92233
Signed-off-by: Marc Schink <openocd-dev@marcschink.de>
Reviewed-on: http://openocd.zylin.com/2997
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
Diffstat (limited to 'src/flash/mflash.c')
-rw-r--r-- | src/flash/mflash.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/flash/mflash.c b/src/flash/mflash.c index ea1673f..6f4a988 100644 --- a/src/flash/mflash.c +++ b/src/flash/mflash.c @@ -761,7 +761,7 @@ COMMAND_HANDLER(mg_write_cmd) if (ret != ERROR_OK) return ret; - int filesize; + size_t filesize; buffer = malloc(MG_FILEIO_CHUNK); if (!buffer) { fileio_close(&fileio); @@ -801,8 +801,8 @@ COMMAND_HANDLER(mg_write_cmd) } if (duration_measure(&bench) == ERROR_OK) { - command_print(CMD_CTX, "wrote %ld bytes from file %s " - "in %fs (%0.3f kB/s)", (long)filesize, CMD_ARGV[1], + command_print(CMD_CTX, "wrote %zu bytes from file %s " + "in %fs (%0.3f kB/s)", filesize, CMD_ARGV[1], duration_elapsed(&bench), duration_kbps(&bench, filesize)); } |