Compiler message -Wunused confusion

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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!



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux