X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;f=eta.c;h=9111f5ec1e670bfc4177c12e24601795be291efb;hb=d7235efbc3a4b6f8c2794fc71d544066e4110eff;hp=0b795263325bbef5372cfb8a6760ed3b089da521;hpb=f7c305464667b118b62aff9b846d1a939fbc1547;p=fio.git diff --git a/eta.c b/eta.c index 0b795263..9111f5ec 100644 --- a/eta.c +++ b/eta.c @@ -2,8 +2,12 @@ * Status and ETA code */ #include -#include #include +#ifdef CONFIG_VALGRIND_DEV +#include +#else +#define DRD_IGNORE_VAR(x) do { } while (0) +#endif #include "fio.h" #include "lib/pow2.h" @@ -145,7 +149,7 @@ void eta_to_str(char *str, unsigned long eta_sec) str += sprintf(str, "%02uh:", h); str += sprintf(str, "%02um:", m); - str += sprintf(str, "%02us", s); + sprintf(str, "%02us", s); } /* @@ -617,7 +621,7 @@ void display_thread_status(struct jobs_eta *je) free(iops_str[ddir]); } } - p += sprintf(p, "\r"); + sprintf(p, "\r"); printf("%s", output); @@ -668,6 +672,7 @@ void print_thread_status(void) void print_status_init(int thr_number) { + DRD_IGNORE_VAR(__run_str); __run_str[thr_number] = 'P'; update_condensed_str(__run_str, run_str); }