From bfb875f61e5c024ccb717026f37ca6f93e3587fb Mon Sep 17 00:00:00 2001 From: Eric Bickle Date: Sat, 10 Feb 2018 19:02:42 -0800 Subject: [PATCH 1/2] Fixed initialization of std::string to nullptr --- napi-inl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/napi-inl.h b/napi-inl.h index f34ed7ad7..0ce3af28e 100644 --- a/napi-inl.h +++ b/napi-inl.h @@ -1729,7 +1729,7 @@ inline NAPI_NO_RETURN void Error::Fatal(const char* location, const char* messag napi_fatal_error(location, NAPI_AUTO_LENGTH, message, NAPI_AUTO_LENGTH); } -inline Error::Error() : ObjectReference(), _message(nullptr) { +inline Error::Error() : ObjectReference() { } inline Error::Error(napi_env env, napi_value value) : ObjectReference(env, nullptr) { From b75d66a1a323b424950f453739f4f5a00046cd75 Mon Sep 17 00:00:00 2001 From: Eric Bickle Date: Sat, 10 Feb 2018 19:03:02 -0800 Subject: [PATCH 2/2] Enabled VC++ static analysis --- test/binding.gyp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/test/binding.gyp b/test/binding.gyp index 36de592c1..0054f9d0c 100644 --- a/test/binding.gyp +++ b/test/binding.gyp @@ -32,7 +32,10 @@ 'cflags!': [ '-fno-exceptions' ], 'cflags_cc!': [ '-fno-exceptions' ], 'msvs_settings': { - 'VCCLCompilerTool': { 'ExceptionHandling': 1 }, + 'VCCLCompilerTool': { + 'ExceptionHandling': 1, + 'EnablePREfast': 'true', + }, }, 'xcode_settings': { 'CLANG_CXX_LIBRARY': 'libc++', @@ -46,7 +49,10 @@ 'cflags': [ '-fno-exceptions' ], 'cflags_cc': [ '-fno-exceptions' ], 'msvs_settings': { - 'VCCLCompilerTool': { 'ExceptionHandling': 0 }, + 'VCCLCompilerTool': { + 'ExceptionHandling': 0, + 'EnablePREfast': 'true', + }, }, 'xcode_settings': { 'CLANG_CXX_LIBRARY': 'libc++',