Lately, I started using lint for static code analysis.
One of the warning I get sometimes is regarding this issue.
Let's say for instance that I've got the following function:
uint32_t foo( void );
And let's say that I delibertly ignore the return value of the function.
To make the warning dissapear, one can write
(void) foo();
My question is, what is the "proper" way to write code like this, should I continue as I always did, since the compiler doesn't complain about it, or should I use the void for clarity, so other code maintainer will know that I delibertly ignored the return value.
When I look at the code like this ( with the void ), it looks pretty strange to me...
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…