🚨 fixed some warnings

This commit is contained in:
Niels Lohmann 2018-12-23 13:56:18 +01:00
parent db53bdac19
commit 6f89613acd
No known key found for this signature in database
GPG key ID: 7F3CEA63AE251B69
15 changed files with 170 additions and 168 deletions

View file

@ -175,7 +175,7 @@ TEST_CASE("CBOR")
numbers.push_back(-4294967297);
for (auto i : numbers)
{
CAPTURE(i);
CAPTURE(i)
// create JSON value with integer number
json j = i;
@ -232,7 +232,7 @@ TEST_CASE("CBOR")
numbers.push_back(-4294967296);
for (auto i : numbers)
{
CAPTURE(i);
CAPTURE(i)
// create JSON value with integer number
json j = i;
@ -273,7 +273,7 @@ TEST_CASE("CBOR")
{
for (int32_t i = -65536; i <= -257; ++i)
{
CAPTURE(i);
CAPTURE(i)
// create JSON value with integer number
json j = i;
@ -325,7 +325,7 @@ TEST_CASE("CBOR")
{
for (auto i = -256; i < -24; ++i)
{
CAPTURE(i);
CAPTURE(i)
// create JSON value with integer number
json j = i;
@ -357,7 +357,7 @@ TEST_CASE("CBOR")
{
for (auto i = -24; i <= -1; ++i)
{
CAPTURE(i);
CAPTURE(i)
// create JSON value with integer number
json j = i;
@ -387,7 +387,7 @@ TEST_CASE("CBOR")
{
for (size_t i = 0; i <= 23; ++i)
{
CAPTURE(i);
CAPTURE(i)
// create JSON value with integer number
json j = -1;
@ -418,7 +418,7 @@ TEST_CASE("CBOR")
{
for (size_t i = 24; i <= 255; ++i)
{
CAPTURE(i);
CAPTURE(i)
// create JSON value with integer number
json j = -1;
@ -451,7 +451,7 @@ TEST_CASE("CBOR")
{
for (size_t i = 256; i <= 65535; ++i)
{
CAPTURE(i);
CAPTURE(i)
// create JSON value with integer number
json j = -1;
@ -489,7 +489,7 @@ TEST_CASE("CBOR")
65536u, 77777u, 1048576u
})
{
CAPTURE(i);
CAPTURE(i)
// create JSON value with integer number
json j = -1;
@ -532,7 +532,7 @@ TEST_CASE("CBOR")
4294967296ul, 4611686018427387903ul
})
{
CAPTURE(i);
CAPTURE(i)
// create JSON value with integer number
json j = -1;
@ -580,7 +580,7 @@ TEST_CASE("CBOR")
{
for (int16_t i = -32768; i <= -129; ++i)
{
CAPTURE(i);
CAPTURE(i)
// create JSON value with integer number
json j = i;
@ -616,7 +616,7 @@ TEST_CASE("CBOR")
{
for (size_t i = 0; i <= 23; ++i)
{
CAPTURE(i);
CAPTURE(i)
// create JSON value with unsigned integer number
json j = i;
@ -646,7 +646,7 @@ TEST_CASE("CBOR")
{
for (size_t i = 24; i <= 255; ++i)
{
CAPTURE(i);
CAPTURE(i)
// create JSON value with unsigned integer number
json j = i;
@ -679,7 +679,7 @@ TEST_CASE("CBOR")
{
for (size_t i = 256; i <= 65535; ++i)
{
CAPTURE(i);
CAPTURE(i)
// create JSON value with unsigned integer number
json j = i;
@ -716,7 +716,7 @@ TEST_CASE("CBOR")
65536u, 77777u, 1048576u
})
{
CAPTURE(i);
CAPTURE(i)
// create JSON value with unsigned integer number
json j = i;
@ -758,7 +758,7 @@ TEST_CASE("CBOR")
4294967296ul, 4611686018427387903ul
})
{
CAPTURE(i);
CAPTURE(i)
// create JSON value with integer number
json j = i;
@ -934,7 +934,7 @@ TEST_CASE("CBOR")
{
for (size_t N = 0; N <= 0x17; ++N)
{
CAPTURE(N);
CAPTURE(N)
// create JSON value with string containing of N * 'x'
const auto s = std::string(N, 'x');
@ -968,7 +968,7 @@ TEST_CASE("CBOR")
{
for (size_t N = 24; N <= 255; ++N)
{
CAPTURE(N);
CAPTURE(N)
// create JSON value with string containing of N * 'x'
const auto s = std::string(N, 'x');
@ -1003,7 +1003,7 @@ TEST_CASE("CBOR")
256u, 999u, 1025u, 3333u, 2048u, 65535u
})
{
CAPTURE(N);
CAPTURE(N)
// create JSON value with string containing of N * 'x'
const auto s = std::string(N, 'x');
@ -1036,7 +1036,7 @@ TEST_CASE("CBOR")
65536u, 77777u, 1048576u
})
{
CAPTURE(N);
CAPTURE(N)
// create JSON value with string containing of N * 'x'
const auto s = std::string(N, 'x');
@ -1620,7 +1620,7 @@ TEST_CASE("CBOR regressions", "[!throws]")
"test/data/cbor_regression/test21"
})
{
CAPTURE(filename);
CAPTURE(filename)
try
{
@ -1825,7 +1825,7 @@ TEST_CASE("CBOR roundtrips", "[hide]")
"test/data/nst_json_testsuite/test_parsing/y_structure_whitespace_array.json"
})
{
CAPTURE(filename);
CAPTURE(filename)
SECTION(filename + ": std::vector<uint8_t>")
{
@ -1968,7 +1968,7 @@ TEST_CASE("all CBOR first bytes", "[!throws]")
{
// check that parse_error.112 is only thrown if the
// first byte is in the unsupported set
CAPTURE(e.what());
CAPTURE(e.what())
if (std::find(unsupported.begin(), unsupported.end(), byte) != unsupported.end())
{
CHECK(e.id == 112);