Should fix this warning:
-- 8< --
target_scale.c: In function 'ts_invoke_counter':
target_scale.c:90: warning: this decimal constant is unsigned only in ISO C90
target_scale.c:91: warning: this decimal constant is unsigned only in ISO C90
target_scale.c:93: warning: integer constant is too large for 'unsigned long' type
-- >8 --
/* Calcualte the rate */
if (prev_counter > curr_counter) /* => counter overflow */
{
- if (prev_counter <= 4294967295) /* 32 bit overflow */
- difference = (4294967295 - prev_counter) + curr_counter;
+ if (prev_counter <= 4294967295UL) /* 32 bit overflow */
+ difference = (4294967295UL - prev_counter) + curr_counter;
else /* 64 bit overflow */
- difference = (18446744073709551615U - prev_counter) + curr_counter;
+ difference = (18446744073709551615ULL - prev_counter) + curr_counter;
}
else /* no overflow */
{