Compiler message -Wunused confusion
A. Mc.
47dragonfyre@gmail.com
Wed Feb 14 11:11:58 GMT 2024
Hello,
I am receiving the gcc compiler warning -Wunused-value computed not used. I
can confirm this is true in my embedded application, the statement never
switches. But I am completely confused as to why. It's essentially the
following code:
volatile bool foo;
while (true) {
if (foo == true){
//do something
foo = false;}
else{
//do something else
foo = true;}
}
Which never switches. What could be the cause of this?
Many thanks in advance!
More information about the Gcc-help
mailing list