How to ignore uninitialized variable error in MSVC
问题 I'm having problems with MSVS compiler, I have the following code: if (!list) { *type = raw_data[*i++]; ptr = (char*) &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; } And later: if (!list) { s->name = name; s->name_size = size; } The value of list doesn't change in this function, however I can't compile the code because of this error: Error 1 error C4703: potentially uninitialized local pointer