Avoided unused variable warnings.
authorFlorian Pose <fp@igh-essen.com>
Mon, 09 Jan 2012 17:42:28 +0100
changeset 2240 b45438edf869
parent 2239 fb6ec8610ada
child 2245 13ef066f37d3
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
@@ -446,7 +446,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;
@@ -502,7 +505,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
@@ -627,15 +627,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
@@ -1,6 +1,6 @@
 /******************************************************************************
  *
- *  $Id: master.c,v afb40fd6018e 2011/09/16 12:10:23 fp $
+ *  $Id$
  *
  *  Copyright (C) 2006-2008  Florian Pose, Ingenieurgemeinschaft IgH
  *
@@ -1316,7 +1316,9 @@
 {
     ec_master_t *master = (ec_master_t *) priv_data;
     ec_slave_t *slave = NULL;
+#ifdef EC_USE_HRTIMER
     size_t sent_bytes;
+#endif
 
     // send interval in IDLE phase
     ec_master_set_send_interval(master, 1000000 / HZ); 
@@ -1355,8 +1357,10 @@
         // queue and send
         ec_mutex_lock(&master->io_mutex);
         ecrt_master_send(master);
+#ifdef EC_USE_HRTIMER
         sent_bytes = master->main_device.tx_skb[
             master->main_device.tx_ring_index]->len;
+#endif
         ec_mutex_unlock(&master->io_mutex);
 
         if (ec_fsm_master_idle(&master->fsm)) {