Allow 'norandommap' with verify
[fio.git] / io_u.c
diff --git a/io_u.c b/io_u.c
index 62a76b9db9c4b98759fbb46f86231ea0c9ac9539..f2406e8c1ec91cb86f56196b2f83e33dca9087ca 100644 (file)
--- a/io_u.c
+++ b/io_u.c
@@ -851,7 +851,8 @@ struct io_u *get_io_u(struct thread_data *td)
 
 out:
        if (!td_io_prep(td, io_u)) {
-               fio_gettime(&io_u->start_time, NULL);
+               if (!td->o.disable_slat)
+                       fio_gettime(&io_u->start_time, NULL);
                return io_u;
        }
 err_put:
@@ -881,7 +882,11 @@ void io_u_log_error(struct thread_data *td, struct io_u *io_u)
 static void io_completed(struct thread_data *td, struct io_u *io_u,
                         struct io_completion_data *icd)
 {
-       unsigned long usec;
+       /*
+        * Older gcc's are too dumb to realize that usec is always used
+        * initialized, silence that warning.
+        */
+       unsigned long uninitialized_var(usec);
 
        dprint_io_u(io_u, "io complete");