Prevent interger overflow on the AVR
Prevent interger overflow on the AVR

Compiling examples/er-rest-example for the avr-raven gives:

  integer overflow in expression [-Woverflow]

On the AVR int is 16 bit and some calculations may overflow.
This happens for example with multiplications involving
CLOCK_SECOND where all the operands are of type int.
Casting one of the operands to clock_time_t forces
the arithmetic to clock_time_t without increasing the size
of the program (the calculation is performed at compile time).

MohamedSeliem/contiki,arurke/contiki,MohamedSeliem/contiki,arurke/contiki,MohamedSeliem/contiki,MohamedSeliem/contiki,MohamedSeliem/contiki,arurke/contiki,arurke/contiki,MohamedSeliem/contiki,arurke/contiki,MohamedSeliem/contiki,arurke/contiki,arurke/contiki