diff --git a/tinyxml2/tinyxml2.vcxproj b/tinyxml2/tinyxml2.vcxproj
index b960fcb..82d04b0 100644
--- a/tinyxml2/tinyxml2.vcxproj
+++ b/tinyxml2/tinyxml2.vcxproj
@@ -85,7 +85,7 @@
Level4
Disabled
- WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
+ WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)
false
@@ -115,7 +115,7 @@
MaxSpeed
true
true
- WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)
+ WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)
true
diff --git a/xmltest.cpp b/xmltest.cpp
index 55300b8..c7d42d6 100644
--- a/xmltest.cpp
+++ b/xmltest.cpp
@@ -153,11 +153,6 @@ int main( int /*argc*/, const char ** /*argv*/ )
_CrtMemCheckpoint( &startMemState );
#endif
- #if defined(_MSC_VER)
- #pragma warning ( push )
- #pragma warning ( disable : 4996 ) // Fail to see a compelling reason why this should be deprecated.
- #endif
-
#if defined(_MSC_VER)
_mkdir( "resources/out/" );
#else
@@ -178,10 +173,6 @@ int main( int /*argc*/, const char ** /*argv*/ )
}
fclose( fp );
- #if defined(_MSC_VER)
- #pragma warning ( pop )
- #endif
-
XMLTest( "Example-1", 0, example_1() );
XMLTest( "Example-2", 0, example_2() );
XMLTest( "Example-3", 0, example_3() );
@@ -424,16 +415,8 @@ int main( int /*argc*/, const char ** /*argv*/ )
// Check the round trip.
int okay = 0;
-
-#if defined(_MSC_VER)
-#pragma warning ( push )
-#pragma warning ( disable : 4996 ) // Fail to see a compelling reason why this should be deprecated.
-#endif
FILE* saved = fopen( "resources/out/utf8testout.xml", "r" );
FILE* verify = fopen( "resources/utf8testverify.xml", "r" );
-#if defined(_MSC_VER)
-#pragma warning ( pop )
-#endif
if ( saved && verify )
{
@@ -548,28 +531,15 @@ int main( int /*argc*/, const char ** /*argv*/ )
XMLTest( "Entity transformation: read. ", expected, context, true );
-#if defined(_MSC_VER)
-#pragma warning ( push )
-#pragma warning ( disable : 4996 ) // Fail to see a compelling reason why this should be deprecated.
-#endif
FILE* textfile = fopen( "resources/out/textfile.txt", "w" );
-#if defined(_MSC_VER)
-#pragma warning ( pop )
-#endif
if ( textfile )
{
XMLPrinter streamer( textfile );
psg->Accept( &streamer );
fclose( textfile );
}
-#if defined(_MSC_VER)
-#pragma warning ( push )
-#pragma warning ( disable : 4996 ) // Fail to see a compelling reason why this should be deprecated.
-#endif
- textfile = fopen( "resources/out/textfile.txt", "r" );
-#if defined(_MSC_VER)
-#pragma warning ( pop )
-#endif
+
+ textfile = fopen( "resources/out/textfile.txt", "r" );
TIXMLASSERT( textfile );
if ( textfile )
{
@@ -980,14 +950,7 @@ int main( int /*argc*/, const char ** /*argv*/ )
QueryPerformanceFrequency( (LARGE_INTEGER*) &freq );
#endif
-#if defined(_MSC_VER)
-#pragma warning ( push )
-#pragma warning ( disable : 4996 ) // Fail to see a compelling reason why this should be deprecated.
-#endif
FILE* fp = fopen( "resources/dream.xml", "r" );
-#if defined(_MSC_VER)
-#pragma warning ( pop )
-#endif
fseek( fp, 0, SEEK_END );
long size = ftell( fp );
fseek( fp, 0, SEEK_SET );