From b771d9beeccf47ee1d8d0d9f7b2c1577b5830a38 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Thu, 6 Oct 2022 01:09:32 +0200 Subject: [PATCH] tests: avoid MSVC preaching about unsafe functions --- test/testautomation_audio.c | 4 +++- test/testautomation_rwops.c | 4 +++- test/testiconv.c | 5 +++++ 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/test/testautomation_audio.c b/test/testautomation_audio.c index 96c174f5c..dd7ef3f11 100644 --- a/test/testautomation_audio.c +++ b/test/testautomation_audio.c @@ -4,7 +4,9 @@ */ /* quiet windows compiler warnings */ -#define _CRT_SECURE_NO_WARNINGS +#if defined(_MSC_VER) && !defined(_CRT_SECURE_NO_WARNINGS) +# define _CRT_SECURE_NO_WARNINGS +#endif #include #include diff --git a/test/testautomation_rwops.c b/test/testautomation_rwops.c index 44e0086bb..f2d5627e5 100644 --- a/test/testautomation_rwops.c +++ b/test/testautomation_rwops.c @@ -10,7 +10,9 @@ */ /* quiet windows compiler warnings */ -#define _CRT_SECURE_NO_WARNINGS +#if defined(_MSC_VER) && !defined(_CRT_SECURE_NO_WARNINGS) +# define _CRT_SECURE_NO_WARNINGS +#endif #include diff --git a/test/testiconv.c b/test/testiconv.c index 883f8eedf..fc0806618 100644 --- a/test/testiconv.c +++ b/test/testiconv.c @@ -10,6 +10,11 @@ freely. */ +/* quiet windows compiler warnings */ +#if defined(_MSC_VER) && !defined(_CRT_SECURE_NO_WARNINGS) +# define _CRT_SECURE_NO_WARNINGS +#endif + #include #include "SDL.h"