title: How to fix Misra 2012 violation , " Assignment operation in expression "
body: <p>I am trying to clear a bit in a 32bit variable using macro. eg.</p>
  
  <pre><code>#define CLEAR_BIT( VAR, BIT )       ( VAR &amp;= ~( BIT ) )
  </code></pre>
  
  <p>in function, I have called macro as </p>
  
  <pre><code>CLEAR_BIT(variable, 0x01 );
  </code></pre>
  
  <p>In this case, I am getting MISRA C - 2012 violation as " Assignment operation in the expression"  " MISRA-C:2012 R.13.1, R.13.2, R.13.4 "</p>
  
  <p>If someone can let me know, What I am doing wrong as per MISRA C rules?</p>