title: Error: format string is not a string literal
body: <p>I have written a simple program in C, which allocates memory for a string vector and then prints this. </p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;string.h&gt;
  
  int main() {
      char str_a[20];
  
      strcpy(str_a, "Hello, world!\n");
      printf(str_a);
  }
  </code></pre>
  
  <p>Using compiler <code>gcc</code>, this gives a compilation error:</p>
  
  <pre><code>char_array2.c:8:12: warning: format string is not a string literal
        (potentially insecure) [-Wformat-security]
      printf(str_a);
  
  1 warning generated.
  </code></pre>
  
  <p>I do not understand why I am getting a warning. Can someone explain it to me? </p>