title: How to ignore uninitialized variable error in MSVC
body: <p>I'm having problems with MSVS compiler, I have the following code:</p>
  
  <pre><code>if (!list) {
      *type = raw_data[*i++];
      ptr = (char*) &amp;size;
      ptr[1] = raw_data[*i++];
      ptr[0] = raw_data[*i++];
      name = new char[size+1];
      memcpy (name, raw_data+*i, size);
      name[size] = '\0';
      *i += size;
  }
  </code></pre>
  
  <p>And later:</p>
  
  <pre><code>if (!list) {
      s-&gt;name = name;
      s-&gt;name_size = size;
  }
  </code></pre>
  
  <p>The value of list doesn't change in this function, however I can't compile the code because of this error:</p>
  
  <blockquote>
    <p>Error 1   error C4703: potentially uninitialized local pointer variable
    'name' used</p>
  </blockquote>
  
  <p>I find it incredibly annoying that this isn't a warning but an error. Changing the bool to const bool doesn't help either. Does someone know how to ignore this specific error in Visual Studio, but still show other errors/warnings?</p>