cancel
Showing results for 
Search instead for 
Did you mean: 

Gfx 4.24.1, C++20, warning: compound assignment with 'volatile'-qualified left operand is deprecated [-Wvolatile]

ferro
Lead

Dear Gfx Team,

When building Gfx in CubeIDE 1.17, C++20 compiler,

in file framework\include\platform\core\MCUInstrumentation.hpp ,

statement 'cc_consumed += cc_temp' causes this warning

../Middlewares/ST/touchgfx/framework/include/platform/core/MCUInstrumentation.hpp: In member function 'virtual void touchgfx::MCUInstrumentation::setMCUActive(bool)':
../Middlewares/ST/touchgfx/framework/include/platform/core/MCUInstrumentation.hpp:73:37: warning: compound assignment with 'volatile'-qualified left operand is deprecated [-Wvolatile]
   73 |                         cc_consumed += cc_temp;
      |                         ~~~~~~~~~~~~^~~~~~~~~~

If you could please change it to

cc_consumed = cc_consumed + cc_temp;

With this change the warning is no longer.

Thanks
Ferro

 

0 REPLIES 0