Quote Originally Posted by laserlight View Post
They are all warnings, actually.
Yeah, they are reported as warnings by the compiler, but such things as dereferencing a NULL pointer is an error - perhaps not compile error, but my definition of error is not always just limited to that.

The first one is not necessarily an issue since // is a valid comment marker in C99
Indeed. VS only supports C90, and it was in a MS header, so I removed it... You probably saw it before I edited it away.

and the "'realloc' might return null pointer" warning has already been covered by anon, while I am guessing that the "Dereferencing NULL pointer" are directly related to the current problem that simone.marras brought up.
Not to rain on anyone's parade, but a little evidence or compiler warnings to back it up doesn't hurt, eh?
Besides, it shows that you should not do this. It also shows that fixing these problems does not raise any flags when using code analysis with VS, which is a good thing, as well!