tests MAINTENANCE char overflow
diff --git a/tests/utests/basic/test_common.c b/tests/utests/basic/test_common.c
index cf01c96..75235a2 100644
--- a/tests/utests/basic/test_common.c
+++ b/tests/utests/basic/test_common.c
@@ -26,30 +26,30 @@
/* test invalid UTF-8 characters in lyxml_getutf8
* - https://en.wikipedia.org/wiki/UTF-8 */
- buf[0] = 0x04;
+ buf[0] = (char)0x04;
assert_int_equal(LY_EINVAL, ly_getutf8(&str, &c, &len));
- buf[0] = 0x80;
+ buf[0] = (char)0x80;
assert_int_equal(LY_EINVAL, ly_getutf8(&str, &c, &len));
- buf[0] = 0xc0;
- buf[1] = 0x00;
+ buf[0] = (char)0xc0;
+ buf[1] = (char)0x00;
assert_int_equal(LY_EINVAL, ly_getutf8(&str, &c, &len));
- buf[1] = 0x80;
+ buf[1] = (char)0x80;
assert_int_equal(LY_EINVAL, ly_getutf8(&str, &c, &len));
- buf[0] = 0xe0;
- buf[1] = 0x00;
- buf[2] = 0x80;
+ buf[0] = (char)0xe0;
+ buf[1] = (char)0x00;
+ buf[2] = (char)0x80;
assert_int_equal(LY_EINVAL, ly_getutf8(&str, &c, &len));
- buf[1] = 0x80;
+ buf[1] = (char)0x80;
assert_int_equal(LY_EINVAL, ly_getutf8(&str, &c, &len));
- buf[0] = 0xf0;
- buf[1] = 0x00;
- buf[2] = 0x80;
- buf[3] = 0x80;
+ buf[0] = (char)0xf0;
+ buf[1] = (char)0x00;
+ buf[2] = (char)0x80;
+ buf[3] = (char)0x80;
assert_int_equal(LY_EINVAL, ly_getutf8(&str, &c, &len));
- buf[1] = 0x80;
+ buf[1] = (char)0x80;
assert_int_equal(LY_EINVAL, ly_getutf8(&str, &c, &len));
}
diff --git a/tests/utests/types/binary.c b/tests/utests/types/binary.c
index 556e0b4..2df1cc9 100644
--- a/tests/utests/types/binary.c
+++ b/tests/utests/types/binary.c
@@ -47,7 +47,7 @@
test_plugin_store(void **state)
{
const char *val, *dec_val;
- char bin_val[2];
+ unsigned char bin_val[2];
struct ly_err_item *err = NULL;
struct lys_module *mod;
struct lyd_value value = {0};