mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-01-18 12:52:44 +01:00
Merge pull request #1615 from authmillenon/cbor-unittests-warnings
Fix unittests warnings
This commit is contained in:
commit
578030fc5f
@ -34,6 +34,7 @@ static void my_cbor_print(const cbor_stream_t *stream)
|
|||||||
#ifndef CBOR_NO_PRINT
|
#ifndef CBOR_NO_PRINT
|
||||||
cbor_stream_print(stream);
|
cbor_stream_print(stream);
|
||||||
#else
|
#else
|
||||||
|
(void)stream;
|
||||||
printf("<no print support>");
|
printf("<no print support>");
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@ -372,7 +373,7 @@ static void test_array(void)
|
|||||||
TEST_ASSERT_EQUAL_INT(1, i);
|
TEST_ASSERT_EQUAL_INT(1, i);
|
||||||
char buffer[1024];
|
char buffer[1024];
|
||||||
offset += cbor_deserialize_byte_string(&stream, offset, buffer, sizeof(buffer));
|
offset += cbor_deserialize_byte_string(&stream, offset, buffer, sizeof(buffer));
|
||||||
TEST_ASSERT_EQUAL_STRING("a", buffer);
|
TEST_ASSERT_EQUAL_STRING("a", &(buffer[0]));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -436,11 +437,11 @@ static void test_map(void)
|
|||||||
offset += cbor_deserialize_int(&stream, offset, &key);
|
offset += cbor_deserialize_int(&stream, offset, &key);
|
||||||
TEST_ASSERT_EQUAL_INT(1, key);
|
TEST_ASSERT_EQUAL_INT(1, key);
|
||||||
offset += cbor_deserialize_byte_string(&stream, offset, value, sizeof(value));
|
offset += cbor_deserialize_byte_string(&stream, offset, value, sizeof(value));
|
||||||
TEST_ASSERT_EQUAL_STRING("1", value);
|
TEST_ASSERT_EQUAL_STRING("1", &(value[0]));
|
||||||
offset += cbor_deserialize_int(&stream, offset, &key);
|
offset += cbor_deserialize_int(&stream, offset, &key);
|
||||||
TEST_ASSERT_EQUAL_INT(2, key);
|
TEST_ASSERT_EQUAL_INT(2, key);
|
||||||
offset += cbor_deserialize_byte_string(&stream, offset, value, sizeof(value));
|
offset += cbor_deserialize_byte_string(&stream, offset, value, sizeof(value));
|
||||||
TEST_ASSERT_EQUAL_STRING("2", value);
|
TEST_ASSERT_EQUAL_STRING("2", &(value[0]));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user