Browse Source

tests: avoid MSVC preaching about unsafe functions

Anonymous Maarten 2 years ago
parent
commit
b771d9beec
3 changed files with 11 additions and 2 deletions
  1. 3 1
      test/testautomation_audio.c
  2. 3 1
      test/testautomation_rwops.c
  3. 5 0
      test/testiconv.c

+ 3 - 1
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 <stdio.h>
 #include <string.h>

+ 3 - 1
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 <stdio.h>
 

+ 5 - 0
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 <stdio.h>
 
 #include "SDL.h"