Avoided unused variable warnings. stable-1.5
authorFlorian Pose <fp@igh-essen.com>
Mon, 09 Jan 2012 17:42:28 +0100
branchstable-1.5
changeset 2235 cd49c2c31dcb
parent 2234 18f9c69d9590
child 2241 0ba77ef52922
Avoided unused variable warnings.
master/ethernet.c
master/fsm_foe.c
master/master.c
--- a/master/ethernet.c	Mon Jan 09 17:42:12 2012 +0100
+++ b/master/ethernet.c	Mon Jan 09 17:42:28 2012 +0100
@@ -441,7 +441,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;
@@ -497,7 +500,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
@@ -1236,7 +1236,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); 
@@ -1271,8 +1273,10 @@
             ec_master_queue_datagram(master, &master->fsm_datagram);
         }
         ecrt_master_send(master);
+#ifdef EC_USE_HRTIMER
         sent_bytes = master->main_device.tx_skb[
             master->main_device.tx_ring_index]->len;
+#endif
         up(&master->io_sem);
 
         if (ec_fsm_master_idle(&master->fsm)) {