From f19ac83152b54a204b8148815a538d868973e1e1 Mon Sep 17 00:00:00 2001 From: Andreas Färber Date: Sun, 22 May 2016 04:34:04 +0200 Subject: Fix usage of timeval_ms() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit First, fix the timeval_ms() implementation to not have K&R but ANSI argument semantics by adding a missing void. timeval_ms() returns an int64_t, not uint64_t or long long. Consistently use int64_t for variables and PRI*64 as format string. While at it, change a few related variables to bool for clarity. Note that timeval_ms() may return a negative error code, but not a single caller checks for that. Change-Id: I27cf83e75b3e9a8913f6c43e98a281bea77aac13 Signed-off-by: Andreas Färber Reviewed-on: http://openocd.zylin.com/3499 Tested-by: jenkins Reviewed-by: Andreas Fritiofson Reviewed-by: Tomas Vanek --- src/svf/svf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/svf') diff --git a/src/svf/svf.c b/src/svf/svf.c index 5f95b0c6..e7e815c1 100644 --- a/src/svf/svf.c +++ b/src/svf/svf.c @@ -361,7 +361,7 @@ COMMAND_HANDLER(handle_svf_command) #define SVF_MAX_NUM_OF_OPTIONS 5 int command_num = 0; int ret = ERROR_OK; - long long time_measure_ms; + int64_t time_measure_ms; int time_measure_s, time_measure_m; /* use NULL to indicate a "plain" svf file which accounts for @@ -535,7 +535,7 @@ COMMAND_HANDLER(handle_svf_command) time_measure_s %= 60; if (time_measure_ms < 1000) command_print(CMD_CTX, - "\r\nTime used: %dm%ds%lldms ", + "\r\nTime used: %dm%ds%" PRId64 "ms ", time_measure_m, time_measure_s, time_measure_ms); -- cgit v1.2.3-18-g5258