From b0d95eb831e161ac7010ecf7c540478400a44d41 Mon Sep 17 00:00:00 2001 From: Florian Pose <fp@igh-essen.com> Date: Tue, 18 Sep 2007 14:18:30 +0000 Subject: [PATCH] Avoid warnings on some compilers. --- master/slave.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/master/slave.c b/master/slave.c index 2a61afc6..2cecdfa0 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) { -- GitLab