title: 'jpg_name' may be used uninitialized in this function [-Werror=uninitialized]
body: <pre><code>int counter = 0;
  char *jpg_name;
  sprintf(jpg_name, "%3i.jpg", counter);
  FILE *photo = fopen( jpg_name, "w");
  counter++;
  </code></pre>
  
  <p>I keep getting the following error:</p>
  
  <pre><code>'jpg_name' may be used uninitialized in this function [-Werror=uninitialized]
  </code></pre>
  
  <p>I'm trying to write file names using the <code>sprintf</code> function. I think I must somehow be declaring the <code>char*</code> in an incorrect way, but I'm not sure how to do it correctly.</p>