Skip to content

Commit 0dbb7d9

Browse files
committed
Use an MSVC-specific macro to suppress warnings (Windows only)
1 parent bfb0fb7 commit 0dbb7d9

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/packcc.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
*/
3131

3232
#ifdef _MSC_VER
33+
#define _CRT_NONSTDC_NO_WARNINGS
3334
#define _CRT_SECURE_NO_WARNINGS
3435
#ifdef _DEBUG
3536
#define _CRTDBG_MAP_ALLOC
@@ -4109,7 +4110,9 @@ static bool_t generate(context_t *ctx) {
41094110
stream__puts(
41104111
&sstream,
41114112
"#ifdef _MSC_VER\n"
4113+
"#undef _CRT_NONSTDC_NO_WARNINGS\n"
41124114
"#undef _CRT_SECURE_NO_WARNINGS\n"
4115+
"#define _CRT_NONSTDC_NO_WARNINGS\n"
41134116
"#define _CRT_SECURE_NO_WARNINGS\n"
41144117
"#endif /* _MSC_VER */\n"
41154118
"#include <stdio.h>\n"

0 commit comments

Comments
 (0)