title: Misra C error in Macro definition
body: <p>This piece of code reports three misra c errors:</p>
  
  <ol>
  <li>Inappropriate macro expansion</li>
  <li>Function-like macro definition</li>
  <li>Macro parameter with no parentheses</li>
  </ol>
  
  <p>The original code is:</p>
  
  <pre><code>#define Wait(a, b)                         \
  if (READ(b+0x1U))                          \
  {                                          \
      while ((a &amp; Write(b)))                 \
      {                                      \
          /* Do nothing - Busy wait */       \
      }                                      \
  }
  
  Here READ(b) is a macro and Write(b) is a function with no Misra C error.
  </code></pre>
  
  <p>I have trying changing it to remove errors</p>
  
  <pre><code>#define Wait(a, b)                                                 \
  if ((uint32_t)0U != READ((b)+0x1U))                                \
  {                                                                  \
      while ((uint32_t)0U != ((uint32_t)(a) &amp; Write((uint32_t)(b)))) \
      {                                                              \
          /* Do nothing - Busy wait */                               \
      }                                                              \
  }
  </code></pre>
  
  <p>But i am still getting the first two errors. What needs to be done to remove these Misra C errors.</p>