From 604275c06c93771a7d87bab127fc32d78df08fe7 Mon Sep 17 00:00:00 2001 From: Zachary Struck Date: Sun, 21 Aug 2016 20:21:42 -0400 Subject: [PATCH] Fixed Visual Studio analyze warning about inconsistent annotation. --- include/internal/catch_debugger.hpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/include/internal/catch_debugger.hpp b/include/internal/catch_debugger.hpp index 8c552661..32839bc7 100644 --- a/include/internal/catch_debugger.hpp +++ b/include/internal/catch_debugger.hpp @@ -82,7 +82,12 @@ #endif // Platform #ifdef CATCH_PLATFORM_WINDOWS - extern "C" __declspec(dllimport) void __stdcall OutputDebugStringA( const char* ); + #if defined(_MSC_VER) && _MSC_VER >= 1700 + #define CATCH_INTERNAL_WINDOWS_SAL_IN_OPT _In_opt_ + #else + #define CATCH_INTERNAL_WINDOWS_SAL_IN_OPT + #endif + extern "C" __declspec(dllimport) void __stdcall OutputDebugStringA( CATCH_INTERNAL_WINDOWS_SAL_IN_OPT const char* ); namespace Catch { void writeToDebugConsole( std::string const& text ) { ::OutputDebugStringA( text.c_str() );