title: c Warning[Pe188]: enumerated type mixed with another type
body: <p>I got the warning:</p>
  
  <blockquote>
    <p>Warning[Pe188]: enumerated type mixed with another type</p>
  </blockquote>
  
  <p>at: </p>
  
  <pre><code>ErrorFlag = (CurrentTime - TimerX &gt; TIMEOUT_X);
  </code></pre>
  
  <p>but the warning is gone if I replace it with:</p>
  
  <pre><code>if(CurrentTime - TimerX &gt; TIMEOUT_X)
  {
    ErrorFlag = TRUE;
  }
  </code></pre>
  
  <p>Whats wrong with the first method to set <code>ErrorFlag</code>?</p>
  
  <p><strong>Edit</strong>:</p>
  
  <p>I have a local <code>enum</code>:</p>
  
  <pre><code>typedef enum{
     FALSE = 0;
     TRUE= 1;
  }BOOL;
  </code></pre>
  
  <p>and <code>ErrorFlag</code> is of type <code>BOOL</code>.</p>