Removed compilation warnings with some GCC.
--- a/include/data.h Tue Apr 17 16:13:22 2007 +0200
+++ b/include/data.h Wed Apr 18 13:04:19 2007 +0200
@@ -128,7 +128,7 @@
{\
REPEAT_SDO_MAX_SIMULTANEOUS_TRANSFERTS_TIMES(s_transfer_Initializer)\
},\
- _SDOtimeoutError,/*&NODE_PREFIX ## _SDOtimeoutError, /* SDOtimeoutError */\
+ _SDOtimeoutError, /* SDOtimeoutError */\
\
/* State machine*/\
Unknown_state, /* nodeState */\
@@ -141,10 +141,10 @@
0, /* csHeartbeat */\
0 /* csPDO */\
},\
- _initialisation,/*&NODE_PREFIX ## _initialisation, /* initialisation */\
- _preOperational,/*&NODE_PREFIX ## _preOperational, /* preOperational */\
- _operational,/*&NODE_PREFIX ## _operational, /* operational */\
- _stopped,/*&NODE_PREFIX ## _stopped, /* stopped */\
+ _initialisation, /* initialisation */\
+ _preOperational, /* preOperational */\
+ _operational, /* operational */\
+ _stopped, /* stopped */\
\
/* NMT-heartbeat */\
& NODE_PREFIX ## _highestSubIndex_obj1016, /* ConsumerHeartbeatCount */\
@@ -152,7 +152,7 @@
NODE_PREFIX ## _heartBeatTimers, /* ConsumerHeartBeatTimers */\
& NODE_PREFIX ## _obj1017, /* ProducerHeartBeatTime */\
TIMER_NONE, /* ProducerHeartBeatTimer */\
- _heartbeatError,/*NODE_PREFIX ## _heartbeatError, /* heartbeatError */\
+ _heartbeatError, /* heartbeatError */\
\
{REPEAT_NMT_MAX_NODE_ID_TIMES(NMTable_Initializer)},\
/* is well initialized at "Unknown_state". Is it ok ? (FD)*/\
@@ -162,8 +162,8 @@
& NODE_PREFIX ## _obj1005, /* COB_ID_Sync */\
& NODE_PREFIX ## _obj1006, /* Sync_Cycle_Period */\
/*& NODE_PREFIX ## _obj1007, */ /* Sync_window_length */\
- _post_sync,/*NODE_PREFIX ## _post_sync, /* post_sync */\
- _post_TPDO,/*NODE_PREFIX ## _post_TPDO, /* post_TPDO */\
+ _post_sync, /* post_sync */\
+ _post_TPDO, /* post_TPDO */\
\
/* PDO, structure s_process_var */\
{\
@@ -173,7 +173,7 @@
\
/* General */\
0, /* toggle */\
- NULL,/*NODE_PREFIX ## _canSend, /* canSend */\
+ NULL, /* canSend */\
NODE_PREFIX ## _scanIndexOD, /* scanIndexOD */\
_storeODSubIndex /* storeODSubIndex */\
}
--- a/include/unix/canfestival.h Tue Apr 17 16:13:22 2007 +0200
+++ b/include/unix/canfestival.h Wed Apr 18 13:04:19 2007 +0200
@@ -4,6 +4,7 @@
#include "timerscfg.h"
#include "can_driver.h"
#include "data.h"
+#include "timers_driver.h"
#ifdef WIN32
#include <windows.h>
typedef HINSTANCE LIB_HANDLE;
--- a/src/timer.c Tue Apr 17 16:13:22 2007 +0200
+++ b/src/timer.c Wed Apr 18 13:04:19 2007 +0200
@@ -32,7 +32,7 @@
TIMEVAL total_sleep_time = TIMEVAL_MAX;
TIMER_HANDLE last_timer_raw = -1;
-#define minval(a,b) ((a<b)?a:b)
+#define min_val(a,b) ((a<b)?a:b)
/* --------- Use this to declare a new alarm --------- */
TIMER_HANDLE SetAlarm(CO_Data* d, UNS32 id, TimerCallback_t callback, TIMEVAL value, TIMEVAL period)
@@ -68,7 +68,7 @@
if (row_number == last_timer_raw + 1) last_timer_raw++;
/* set next wakeup alarm if new entry is sooner than others, or if it is alone */
- real_timer_value = minval(value, TIMEVAL_MAX);
+ real_timer_value = min_val(value, TIMEVAL_MAX);
elapsed_time = getElapsedTime();
/*printf("elapsed_time=%d real_timer_value=%d total_sleep_time=%d\n", elapsed_time, real_timer_value, total_sleep_time); */
@@ -131,7 +131,7 @@
row->val = row->interval - (overrun % row->interval);
row->state = TIMER_TRIG_PERIOD; /* ask for trig, periodic */
/* Check if this new timer value is the soonest */
- next_wakeup = minval(row->val,next_wakeup);
+ next_wakeup = min_val(row->val,next_wakeup);
}
}
else
@@ -140,7 +140,7 @@
row->val -= real_total_sleep_time;
/* Check if this new timer value is the soonest */
- next_wakeup = minval(row->val,next_wakeup);
+ next_wakeup = min_val(row->val,next_wakeup);
}
}
}