title: Const-qualification of parameters in function declaration
body: <p>I have the following function declaration in a header file:</p>
  
  <pre><code>extern void flash(const char *message, const enum msg_type type);
  </code></pre>
  
  <p>Basically, it takes two parameters and pushes a corresponding message into a global message queue. Since it doesn't need to modify the parameters, I const-qualified them. However, CLion's static code analyzer emitted a warning about it:</p>
  
  <blockquote>
    <p>Clang-Tidy: Parameter 'type' is const-qualified in the function declaration; const-qualification of parameters only has an effect on function definitions</p>
  </blockquote>
  
  <p><a href="https://i.stack.imgur.com/HRfB9.png" rel="noreferrer"><img src="https://i.stack.imgur.com/HRfB9.png" alt="enter image description here"></a></p>
  
  <p>Here is my questions:</p>
  
  <ol>
  <li>I const-qualified both parameters, why does only the latter trigger a warning?</li>
  <li>Is it really bad? I know it has no effect, but technically specking <code>const</code> qualifiers have no effect too.</li>
  <li>Can I get rid of this warning?</li>
  </ol>