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>
This commit is contained in:
committed by
Freddie Chopin
parent
0578e4c4f4
commit
24d9f0cfa0
@@ -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));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user