diff --git a/master/slave.c b/master/slave.c
index 2a61afc6576b00ba2562cfdfa2ee7fe7d7451b0b..2cecdfa06c2a463a9b63d4778b23a4ed5473eea0 100644
--- a/master/slave.c
+++ b/master/slave.c
@@ -807,7 +807,8 @@ size_t ec_slave_info(const ec_slave_t *slave, /**< EtherCAT slave */
         }
     }
 
-    if (!list_empty(&slave->sii_pdos))
+    // type-cast to avoid warnings on some compilers
+    if (!list_empty((struct list_head *) &slave->sii_pdos))
         off += sprintf(buffer + off, "\nAvailable PDOs:\n");
 
     list_for_each_entry(pdo, &slave->sii_pdos, list) {
@@ -828,7 +829,8 @@ size_t ec_slave_info(const ec_slave_t *slave, /**< EtherCAT slave */
         }
     }
 
-    if (!list_empty(&slave->sdo_confs))
+    // type-cast to avoid warnings on some compilers
+    if (!list_empty((struct list_head *) &slave->sdo_confs))
         off += sprintf(buffer + off, "\nSDO configurations:\n");
 
     list_for_each_entry(sdodata, &slave->sdo_confs, list) {