Re-enable warning 4005 and remove _CRT_SECURE_NO_WARNINGS
The macro _CRT_SECURE_NO_WARNINGS is no longer needed for chromium
code as pdfium code itself is warning free;
For standalone build, the macro may suppress warnings from third
party code. But it has no use now as it is shadowed by disabled 4996
warnings.
This is one of the efforts to re-enable warnings for pdfium code.
BUG=pdfium:29
R=brucedawson@chromium.org
Review URL: https://codereview.chromium.org/1836443002 .
diff --git a/BUILD.gn b/BUILD.gn
index f22a418..a21c0da 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -18,7 +18,6 @@
"PNG_PREFIX",
"PNG_USE_READ_MACROS",
"V8_DEPRECATION_WARNINGS",
- "_CRT_SECURE_NO_WARNINGS",
]
if (pdf_use_skia) {
diff --git a/core/fxcrt/include/fx_system.h b/core/fxcrt/include/fx_system.h
index 22fdef2..4900634 100644
--- a/core/fxcrt/include/fx_system.h
+++ b/core/fxcrt/include/fx_system.h
@@ -54,7 +54,6 @@
#endif
#if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
-#define _CRT_SECURE_NO_WARNINGS
#include <windows.h>
#include <sal.h>
#endif
diff --git a/pdfium.gyp b/pdfium.gyp
index e61237f..06f960b 100644
--- a/pdfium.gyp
+++ b/pdfium.gyp
@@ -57,7 +57,6 @@
'PNG_PREFIX',
'PNG_USE_READ_MACROS',
'V8_DEPRECATION_WARNINGS',
- '_CRT_SECURE_NO_WARNINGS',
],
'include_dirs': [
# This is implicit in GN.
@@ -94,7 +93,7 @@
}],
],
'msvs_disabled_warnings': [
- 4005, 4018, 4146, 4333, 4345, 4267,
+ 4018, 4146, 4333, 4345, 4267,
],
'variables': {
'clang_warning_flags': [