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) {