瀏覽代碼

tests: avoid MSVC preaching about unsafe functions

Anonymous Maarten 2 年之前
父節點
當前提交
b771d9beec
共有 3 個文件被更改,包括 11 次插入2 次删除
  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"