mirror of
https://github.com/msgpack/msgpack-c.git
synced 2025-10-13 22:50:19 +02:00
Added -Wconversion support for C++.
This commit is contained in:
@@ -1,5 +1,12 @@
|
||||
#include <msgpack.hpp>
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wconversion"
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
#include <sstream>
|
||||
|
||||
TEST(streaming, basic)
|
||||
@@ -168,7 +175,7 @@ public:
|
||||
while(true) {
|
||||
pac.reserve_buffer(32*1024);
|
||||
|
||||
size_t len = static_cast<size_t>(input.readsome(pac.buffer(), pac.buffer_capacity()));
|
||||
size_t len = static_cast<size_t>(input.readsome(pac.buffer(), static_cast<std::streamsize>(pac.buffer_capacity())));
|
||||
|
||||
if(len == 0) {
|
||||
return;
|
||||
@@ -240,7 +247,7 @@ TEST(streaming, basic_compat)
|
||||
while(count < 3) {
|
||||
pac.reserve_buffer(32*1024);
|
||||
|
||||
size_t len = static_cast<size_t>(input.readsome(pac.buffer(), pac.buffer_capacity()));
|
||||
size_t len = static_cast<size_t>(input.readsome(pac.buffer(), static_cast<std::streamsize>(pac.buffer_capacity())));
|
||||
pac.buffer_consumed(len);
|
||||
|
||||
while(pac.execute()) {
|
||||
@@ -276,7 +283,7 @@ public:
|
||||
while(true) {
|
||||
pac.reserve_buffer(32*1024);
|
||||
|
||||
size_t len = static_cast<size_t>(input.readsome(pac.buffer(), pac.buffer_capacity()));
|
||||
size_t len = static_cast<size_t>(input.readsome(pac.buffer(), static_cast<std::streamsize>(pac.buffer_capacity())));
|
||||
|
||||
if(len == 0) {
|
||||
return;
|
||||
|
Reference in New Issue
Block a user