# HG changeset patch # User etisserant # Date 1176894259 -7200 # Node ID b2f8b91d89b5d542857887e6debe6aea073902a6 # Parent b6fbc1c59a44c4f5e9c6a5f67e9b2d6f4dc040a5 Removed compilation warnings with some GCC. diff -r b6fbc1c59a44 -r b2f8b91d89b5 include/data.h --- 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 */\ } diff -r b6fbc1c59a44 -r b2f8b91d89b5 include/unix/canfestival.h --- 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 typedef HINSTANCE LIB_HANDLE; diff -r b6fbc1c59a44 -r b2f8b91d89b5 src/timer.c --- 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) ((aval = 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); } } }