diff --git a/src/msw/stackwalk.cpp b/src/msw/stackwalk.cpp index 4c86de102c..ae04b0bc6c 100644 --- a/src/msw/stackwalk.cpp +++ b/src/msw/stackwalk.cpp @@ -306,6 +306,18 @@ void wxStackWalker::WalkFromException(size_t maxDepth) #endif // wxUSE_ON_FATAL_EXCEPTION +#ifdef __VISUALC__ + #pragma warning(push) + + // "warning C4740: flow in or out of inline asm code suppresses global + // optimization" + #pragma warning(disable: 4740) + + // "warning C4748: /GS can not protect parameters and local variables from + // local buffer overrun because optimizations are disabled in function" + #pragma warning(disable: 4748) +#endif + void wxStackWalker::Walk(size_t skip, size_t maxDepth) { // This code is based on frames.cpp from Edd Dawson's dbg library @@ -348,5 +360,9 @@ void wxStackWalker::Walk(size_t skip, size_t maxDepth) WalkFrom(&ctx, skip, maxDepth); } +#ifdef __VISUALC__ + #pragma warning(pop) +#endif + #endif // wxUSE_STACKWALKER