diff --git a/error.h b/error.h
index 26b99fb0fa76adcf601c35717b3e1bc19bdb826a..cd24a4d33ce03bd3c5289a10be8ab5e13297b1d7 100644
--- a/error.h
+++ b/error.h
@@ -18,6 +18,7 @@ extern int myrank;
   ({                                                                     \
     printf("[%04i] %s %s: " s "\n", myrank, clocks_get_timesincestart(), \
            __FUNCTION__, ##__VA_ARGS__);                                 \
+    fflush(stdout);                                                      \
   })
 
 /* Print MPI error string. */
diff --git a/mpiuse.c b/mpiuse.c
index 6bd7b3116e0910b152e49112be86057bad80a0f6..4748eddef5e67d7f1607d8f3f8edbe58b4c0425f 100644
--- a/mpiuse.c
+++ b/mpiuse.c
@@ -254,6 +254,6 @@ int mpiuse_nr_ranks(void) { return mpiuse_max_rank + 1; }
  */
 struct mpiuse_log_entry *mpiuse_get_log(int ind) {
 
-  if (ind < mpiuse_log_count && ind >= 0) return &mpiuse_log[ind];
+  if ((size_t)ind < mpiuse_log_count && ind >= 0) return &mpiuse_log[ind];
   return NULL;
 }
diff --git a/swiftmpistepsim.c b/swiftmpistepsim.c
index 5722398fcdf05de61d866b09f48a8928ffaa1e41..04787bf01e6eb7aaea2bbff023efcb50f6cbca55 100644
--- a/swiftmpistepsim.c
+++ b/swiftmpistepsim.c
@@ -378,7 +378,7 @@ static void pick_logs(void) {
       nlogs, sizeof(struct mpiuse_log_entry *));
   nr_recvs = 0;
 
-  for (int k = 0; k < nlogs; k++) {
+  for (size_t k = 0; k < nlogs; k++) {
     struct mpiuse_log_entry *log = mpiuse_get_log(k);
     if (log->rank == myrank && log->activation) {
       if (log->type == task_type_send || log->type == task_type_recv) {