Skip to content

Commit

Permalink
Land #1046, [Windows] Mark old_report_mode as unused for release builds
Browse files Browse the repository at this point in the history
  • Loading branch information
busterb committed May 28, 2024
2 parents d9c3a50 + 8ce9710 commit 82d645a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions crypto/compat/posix_win.c
Original file line number Diff line number Diff line change
Expand Up @@ -164,9 +164,10 @@ static void noop_handler(const wchar_t *expression, const wchar_t *function,
}

#define BEGIN_SUPPRESS_IPH \
int old_report_mode = _CrtSetReportMode(_CRT_ASSERT, 0); \
_invalid_parameter_handler old_handler = _set_thread_local_invalid_parameter_handler(noop_handler)
const int old_report_mode = _CrtSetReportMode(_CRT_ASSERT, 0); \
const _invalid_parameter_handler old_handler = _set_thread_local_invalid_parameter_handler(noop_handler)
#define END_SUPPRESS_IPH \
(void)old_report_mode; /* Silence warning in release mode when _CrtSetReportMode compiles to void. */ \
_CrtSetReportMode(_CRT_ASSERT, old_report_mode); \
_set_thread_local_invalid_parameter_handler(old_handler)

Expand Down

0 comments on commit 82d645a

Please sign in to comment.