Avoided unused variable warnings.
--- a/master/ethernet.c Mon Jan 09 17:42:12 2012 +0100
+++ b/master/ethernet.c Mon Jan 09 17:42:28 2012 +0100
@@ -443,7 +443,10 @@
{
size_t rec_size, data_size;
uint8_t *data, frame_type, last_fragment, time_appended, mbox_prot;
- uint8_t frame_number, fragment_offset, fragment_number;
+ uint8_t fragment_offset, fragment_number;
+#if EOE_DEBUG_LEVEL >= 2
+ uint8_t frame_number;
+#endif
off_t offset;
#if EOE_DEBUG_LEVEL >= 3
unsigned int i;
@@ -499,7 +502,9 @@
time_appended = (EC_READ_U16(data) >> 9) & 0x0001;
fragment_number = EC_READ_U16(data + 2) & 0x003F;
fragment_offset = (EC_READ_U16(data + 2) >> 6) & 0x003F;
+#if EOE_DEBUG_LEVEL >= 2
frame_number = (EC_READ_U16(data + 2) >> 12) & 0x000F;
+#endif
#if EOE_DEBUG_LEVEL >= 2
EC_SLAVE_DBG(eoe->slave, 0, "EoE %s RX fragment %u%s, offset %u,"
--- a/master/fsm_foe.c Mon Jan 09 17:42:12 2012 +0100
+++ b/master/fsm_foe.c Mon Jan 09 17:42:28 2012 +0100
@@ -622,15 +622,12 @@
ec_fsm_foe_t *fsm /**< FoE statemachine. */
)
{
- size_t current_size;
ec_slave_t *slave = fsm->slave;
fsm->rx_buffer_offset = 0;
fsm->rx_expected_packet_no = 1;
fsm->rx_last_packet = 0;
- current_size = fsm->rx_filename_len;
-
#ifdef DEBUG_FOE
printk("ec_fsm_foe_read_start()\n");
#endif
--- a/master/master.c Mon Jan 09 17:42:12 2012 +0100
+++ b/master/master.c Mon Jan 09 17:42:28 2012 +0100
@@ -1351,7 +1351,9 @@
ec_master_t *master = (ec_master_t *) priv_data;
ec_slave_t *slave = NULL;
int fsm_exec;
+#ifdef EC_USE_HRTIMER
size_t sent_bytes;
+#endif
// send interval in IDLE phase
ec_master_set_send_interval(master, 1000000 / HZ);
@@ -1387,8 +1389,10 @@
EC_DEVICE_MAIN);
}
ecrt_master_send(master);
+#ifdef EC_USE_HRTIMER
sent_bytes = master->devices[EC_DEVICE_MAIN].tx_skb[
master->devices[EC_DEVICE_MAIN].tx_ring_index]->len;
+#endif
up(&master->io_sem);
if (ec_fsm_master_idle(&master->fsm)) {