Revision: 166
http://xmlwrapp.svn.sourceforge.net/xmlwrapp/?rev=166&view=rev
Author: vadz
Date: 2009-12-29 13:45:21 +0000 (Tue, 29 Dec 2009)
Log Message:
-----------
Suppress VC8+ warnings about vsnprintf() by defining _CRT_SECURE_NO_WARNINGS
Modified Paths:
--------------
trunk/src/libxml/utility.cxx
Modified: trunk/src/libxml/utility.cxx
===================================================================
--- trunk/src/libxml/utility.cxx 2009-12-20 12:51:39 UTC (rev 165)
+++ trunk/src/libxml/utility.cxx 2009-12-29 13:45:21 UTC (rev 166)
@@ -30,6 +30,15 @@
* SUCH DAMAGE.
*/
+#ifdef _MSC_VER
+ // using vsnprintf() under MSVC 2005 or later results in a warning C4996
+ // because the function may be used in unsafe ways -- as we do use it
+ // correctly here, disable the warning by predefining this symbol before
+ // any standard headers are included (we don't bother to test MSVC version
+ // here as defining it does no harm for the previous versions anyhow)
+ #define _CRT_SECURE_NO_WARNINGS
+#endif
+
#include "utility.h"
#include <cstdarg>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|