From f8c9106d67d083246f384cc4b0c43fa572a08fd2 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Mon, 17 Dec 2012 15:41:00 -0800 Subject: [PATCH] Prevent potential warnings about macro redefinitions. --- format.cc | 2 ++ format_test.cc | 1 + 2 files changed, 3 insertions(+) diff --git a/format.cc b/format.cc index 16734aef..bb486da6 100644 --- a/format.cc +++ b/format.cc @@ -26,6 +26,7 @@ */ // Disable useless MSVC warnings. +#undef _CRT_SECURE_NO_WARNINGS #define _CRT_SECURE_NO_WARNINGS #include "format.h" @@ -42,6 +43,7 @@ using std::size_t; using fmt::Formatter; #if _MSC_VER +# undef snprintf # define snprintf _snprintf #endif diff --git a/format_test.cc b/format_test.cc index 2dbf00cb..1cdeb619 100644 --- a/format_test.cc +++ b/format_test.cc @@ -26,6 +26,7 @@ */ // Disable useless MSVC warnings. +#undef _CRT_SECURE_NO_WARNINGS #define _CRT_SECURE_NO_WARNINGS #include