I am exploring an sdk and I came across the following set of statements.
uint32_t init_time = 0;
init_time = get_current_time_in_ms();
(void)init_time; // What does this statement do?
My first thought was that this is a NULL check of some sorts but I tried zero and non-zero value in a test C code doing something similar but response in both case was the same.
Any help would be appreciated.
This statement does not do anything logically.
It is sometimes added to avoid warnings in compilers and Static Analysers for unused variables
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With