mirror of
https://github.com/fmtlib/fmt.git
synced 2025-04-18 11:42:22 +00:00
Suppress more bogus warnings
This commit is contained in:
parent
ecd2b80e8f
commit
fb12cfd196
@ -212,7 +212,8 @@ TEST(WriterTest, Allocator) {
|
|||||||
typedef AllocatorRef<MockAllocator> TestAllocator;
|
typedef AllocatorRef<MockAllocator> TestAllocator;
|
||||||
MockAllocator alloc;
|
MockAllocator alloc;
|
||||||
fmt::BasicMemoryWriter<char, TestAllocator> w((TestAllocator(&alloc)));
|
fmt::BasicMemoryWriter<char, TestAllocator> w((TestAllocator(&alloc)));
|
||||||
std::size_t size = 1.5 * fmt::internal::INLINE_BUFFER_SIZE;
|
std::size_t size =
|
||||||
|
static_cast<std::size_t>(1.5 * fmt::internal::INLINE_BUFFER_SIZE);
|
||||||
std::vector<char> mem(size);
|
std::vector<char> mem(size);
|
||||||
EXPECT_CALL(alloc, allocate(size)).WillOnce(testing::Return(&mem[0]));
|
EXPECT_CALL(alloc, allocate(size)).WillOnce(testing::Return(&mem[0]));
|
||||||
for (int i = 0; i < fmt::internal::INLINE_BUFFER_SIZE + 1; ++i)
|
for (int i = 0; i < fmt::internal::INLINE_BUFFER_SIZE + 1; ++i)
|
||||||
|
@ -25,6 +25,9 @@
|
|||||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Disable bogus MSVC warnings.
|
||||||
|
#define _CRT_SECURE_NO_WARNINGS
|
||||||
|
|
||||||
#include "posix-test.h"
|
#include "posix-test.h"
|
||||||
|
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
@ -32,7 +35,6 @@
|
|||||||
#include <climits>
|
#include <climits>
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
# define _CRT_SECURE_NO_WARNINGS
|
|
||||||
# include <io.h>
|
# include <io.h>
|
||||||
# undef max
|
# undef max
|
||||||
# undef ERROR
|
# undef ERROR
|
||||||
|
Loading…
x
Reference in New Issue
Block a user