Replace clang diagnostics with gcc

Clang understands both types of pragmas. Unfortunately it seems that due to bug in gcc (id=53431) this doesn't help
This commit is contained in:
Danila Malyutin 2015-07-27 02:45:25 +03:00
parent 9a37acee3e
commit caa6db8617

View file

@ -104,10 +104,10 @@ namespace fmt
{
std::vector<char> buffptr(length);
#if !defined(_MSC_VER)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wformat-security"
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wformat-security"
size_t printlen = snprintf(buffptr.data(), length, fmt, std::forward<Args>(parameters)...);
#pragma clang diagnostic pop
#pragma GCC diagnostic pop
#else
size_t printlen = _snprintf_s(buffptr.data(), length, length - 1, fmt, std::forward<Args>(parameters)...);
#endif