Fixed MS static analysis warnings

Cleaned up a few warnings to allow VS2012 to compile idl_parser and idl_gen_text (for exporting binary protobuf blobs as JSON) cleanly under static analysis.
This commit is contained in:
Chris Pickett
2016-01-05 13:38:03 -06:00
parent a6a38f6035
commit 30013b4ff8
2 changed files with 5 additions and 2 deletions

View File

@@ -210,6 +210,9 @@ inline void EnsureDirExists(const std::string &filepath) {
auto parent = StripFileName(filepath);
if (parent.length()) EnsureDirExists(parent);
#ifdef _WIN32
#ifdef _MSC_VER
#pragma warning(suppress: 6031)
#endif
_mkdir(filepath.c_str());
#else
mkdir(filepath.c_str(), S_IRWXU|S_IRGRP|S_IXGRP);