From 9f51bce2aae78cfabdaf445d85b5355eadccc599 Mon Sep 17 00:00:00 2001 From: Vincent Lejeune Date: Tue, 27 Oct 2015 00:36:32 +0100 Subject: [PATCH] StrFmt: Fix unknow pragma on MSVC --- Utilities/StrFmt.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Utilities/StrFmt.h b/Utilities/StrFmt.h index efaf02f66f..d40a0b722c 100644 --- a/Utilities/StrFmt.h +++ b/Utilities/StrFmt.h @@ -233,12 +233,14 @@ namespace fmt for (std::size_t buf_size = fixed_buf.size();;) { +#ifndef _MSC_VER #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wformat-security" +#endif const std::size_t len = std::snprintf(buf_addr, buf_size, fmt, do_unveil(args)...); - +#ifndef _MSC_VER #pragma GCC diagnostic pop - +#endif if (len > INT_MAX) { throw std::runtime_error("std::snprintf() failed");