On 18/04/2023 11:10, Vincenzo Frascino wrote:
On 4/17/23 11:47, Colin Ian King wrote:
In the unlikely case that CLOCK_REALTIME is not defined, variable ret is
not initialized and further accumulation of return values to ret can leave
ret in an undefined state. Fix this by initialized ret to zero and changing
the assignment of ret to an accumulation for the CLOCK_REALTIME case.
I was wondering how did you find this.
I used cppcheck --force --enable=all, this examines the #if defined() paths.
Reviewed-by: Vincenzo Frascino <vincenzo.frascino@xxxxxxx>