Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 4898

SDK • Re: Trouble printing time_us_64() [SOLVED]

$
0
0
Your code does not use the result from the macro at all.
Ah, indeed. Elsewhere I do assign it back to the original variable, which is why I was only getting one warning. This part of the code with the ticks is untested so far, I had not paid much attention to what it is warning about. So it is a legit error.

Code:

tick_count = clamp(tick_count, min_ticks,max_ticks);
That works much better.

I guess that's why they invented -Wall :)
Thanks gcc !!

Statistics: Posted by pie_face — Thu Jan 02, 2025 7:10 pm



Viewing all articles
Browse latest Browse all 4898

Trending Articles