Fixup two compile warnings
[fio.git] / init.c
diff --git a/init.c b/init.c
index 5ff73859d50d444ed371c33a36c710182aa0bb38..6b6e386e398a04b4d8e27c7a034e6cd66e58025c 100644 (file)
--- a/init.c
+++ b/init.c
@@ -309,7 +309,7 @@ static void free_shm(void)
        free(trigger_remote_cmd);
        trigger_file = trigger_cmd = trigger_remote_cmd = NULL;
 
-       options_free(fio_options, &def_thread);
+       options_free(fio_options, &def_thread.o);
        fio_filelock_exit();
        scleanup();
 }
@@ -903,26 +903,6 @@ static const char *get_engine_name(const char *str)
        return p;
 }
 
-static int exists_and_not_regfile(const char *filename)
-{
-       struct stat sb;
-
-       if (lstat(filename, &sb) == -1)
-               return 0;
-
-#ifndef WIN32 /* NOT Windows */
-       if (S_ISREG(sb.st_mode))
-               return 0;
-#else
-       /* \\.\ is the device namespace in Windows, where every file
-        * is a device node */
-       if (S_ISREG(sb.st_mode) && strncmp(filename, "\\\\.\\", 4) != 0)
-               return 0;
-#endif
-
-       return 1;
-}
-
 static void init_rand_file_service(struct thread_data *td)
 {
        unsigned long nranges = td->o.nr_files << FIO_FSERVICE_SHIFT;
@@ -1458,6 +1438,13 @@ static int add_job(struct thread_data *td, const char *jobname, int job_add_num,
                };
                const char *suf;
 
+#ifndef CONFIG_ZLIB
+               if (td->client_type) {
+                       log_err("fio: --write_hist_log requires zlib in client/server mode\n");
+                       goto err;
+               }
+#endif
+
                if (p.log_gz_store)
                        suf = "log.fz";
                else