title: Argument of type "volatile char *" is incompatible with parameter of type "const char *"
body: <p>I have a function whose prototype is as follows:</p>
  
  <pre><code>void foo(const char * data);
  </code></pre>
  
  <p>Elsewhere in my code, I have a global variable declared as follows</p>
  
  <pre><code>volatile char var[100];
  </code></pre>
  
  <p>Whenever I try to do this:</p>
  
  <pre><code>foo(var);
  </code></pre>
  
  <p>The compiler throws up the following error message:</p>
  
  <p><strong>Argument of type "volatile char *" is incompatible with parameter of type "const char *"</strong></p>
  
  <p>Why is that the case? As I understand it, the variable in my function is not allowed to change the pointer or its contents. I understand that because my global variable is volatile, it could potentially change at any time, but seeing as it is perfectly legal to have a volatile const variable, I don't see why I am getting this compiler error.</p>
  
  <p>Thanks</p>
  
  <p>--Amr</p>