Examples of errors detected by the V732 diagnostic

V732. Unary minus operator does not modify a bool type value.


Miranda IM

V732 Unary minus operator does not modify a bool type variable. Consider using the '!' operator. - ADDITIONAL IN CURRENT modern_docking.cpp 275


typedef struct tagCLUIDATA
{
  ....
  BOOL fDocked;
  ....
} CLUIDATA;

int Docking_ProcessWindowMessage(WPARAM wParam,LPARAM lParam)
{
  ....
  if ((msg->wParam && g_CluiData.fDocked<0) ||
      (!msg->wParam && g_CluiData.fDocked>0))
    g_CluiData.fDocked=-g_CluiData.fDocked;
  ....
}


Do you make errors in the code?

Check your code
with PVS-Studio

Static code analysis
for C, C++ and C#

goto PVS-Studio;