Writing for a DM643x DSP. I need to read a register in order to clear the hardware so I make a line "temp=register". The function does nothing with the result that is read. So I get a warning--
"func.c", line xx: warning: variable "temp" was set but never used
Two issues--
1. Clean code--how do I do this so I don't get a warning?
2. Reliable compiles--the register is listed as volatile and the code seems to be working. However, given the warning, I want to make sure that the compiler does not optimize out this read operation. Is there something I can or need to do to make sure this read operation takes place?