fixed compiler warnings if NDEBUG enabled in core code
[fio.git] / helper_thread.c
index b9b83db3057435f6fd2918d84cc3e96bdb7c4252..26857773bc0dbafe9e593d64bcaf36dae15a0696 100644 (file)
@@ -1,4 +1,7 @@
+#include <errno.h>
 #include <signal.h>
+#include <stdio.h>
+#include <string.h>
 #include <unistd.h>
 #ifdef CONFIG_HAVE_TIMERFD_CREATE
 #include <sys/timerfd.h>
@@ -122,7 +125,10 @@ static void submit_action(enum action a)
                return;
 
        ret = write_to_pipe(helper_data->pipe[1], &data, sizeof(data));
-       assert(ret == 1);
+       if (ret != 1) {
+               log_err("failed to write action into pipe, err %i:%s", errno, strerror(errno));
+               assert(0);
+       }
 }
 
 void helper_reset(void)