diff --git a/compat/compat.c b/compat/compat.c
index 1ae54f6..0ed350a 100644
--- a/compat/compat.c
+++ b/compat/compat.c
@@ -128,7 +128,7 @@
 {
     static char line[256];
     char *ptr;
-    unsigned int len;
+    ssize_t len;
 
     if (!lineptr || !n) {
         errno = EINVAL;
diff --git a/src/common.c b/src/common.c
index 3a1f904..d473e3f 100644
--- a/src/common.c
+++ b/src/common.c
@@ -164,7 +164,7 @@
 }
 
 char *
-ly_strnchr(const char *s, int c, unsigned int len)
+ly_strnchr(const char *s, int c, size_t len)
 {
     for ( ; *s != (char)c; ++s, --len) {
         if ((*s == '\0') || (!len)) {
@@ -188,9 +188,8 @@
 LY_ERR
 ly_getutf8(const char **input, uint32_t *utf8_char, size_t *bytes_read)
 {
-    uint32_t c, len;
-    int aux;
-    int i;
+    uint32_t c, aux;
+    size_t len;
 
     if (bytes_read) {
         (*bytes_read) = 0;
@@ -224,7 +223,7 @@
         len = 3;
 
         c &= 0x0f;
-        for (i = 1; i <= 2; i++) {
+        for (uint64_t i = 1; i <= 2; i++) {
             aux = (*input)[i];
             if ((aux & 0xc0) != 0x80) {
                 return LY_EINVAL;
@@ -241,7 +240,7 @@
         len = 4;
 
         c &= 0x07;
-        for (i = 1; i <= 3; i++) {
+        for (uint64_t i = 1; i <= 3; i++) {
             aux = (*input)[i];
             if ((aux & 0xc0) != 0x80) {
                 return LY_EINVAL;
@@ -574,7 +573,7 @@
     LY_ERR ret = LY_EVALID;
     const char *in = *pred;
     size_t offset = 1;
-    int expr = 0;
+    uint8_t expr = 0;
     char quot;
 
     assert(in[0] == '\[');
diff --git a/src/common.h b/src/common.h
index a4110ba..e4c12b8 100644
--- a/src/common.h
+++ b/src/common.h
@@ -67,8 +67,8 @@
 };
 
 extern THREAD_LOCAL enum int_log_opts log_opt;
-extern volatile uint8_t ly_log_level;
-extern volatile uint8_t ly_log_opts;
+extern volatile LY_LOG_LEVEL ly_log_level;
+extern volatile uint32_t ly_log_opts;
 
 /**
  * @brief Set error-app-tag to the last error record in the context.
@@ -105,7 +105,7 @@
 #ifdef NDEBUG
 #  define LOGDBG(dbg_group, str, ...)
 #else
-void ly_log_dbg(int group, const char *format, ...);
+void ly_log_dbg(uint32_t group, const char *format, ...);
 #  define LOGDBG(dbg_group, str, ...) ly_log_dbg(dbg_group, str, ##__VA_ARGS__);
 #endif
 
@@ -326,7 +326,7 @@
  * @param[in] len Limit the search to this number of characters in @p s.
  * @return Pointer to first @p c occurence in @p s, NULL if not found in first @p len characters.
  */
-char *ly_strnchr(const char *s, int c, unsigned int len);
+char *ly_strnchr(const char *s, int c, size_t len);
 
 /**
  * @brief Compare NULL-terminated @p refstr with @str_len bytes from @p str.
diff --git a/src/context.c b/src/context.c
index 59051d3..27b9822 100644
--- a/src/context.c
+++ b/src/context.c
@@ -70,7 +70,6 @@
 {
     struct stat st;
     char *new_dir = NULL;
-    unsigned int u;
 
     LY_CHECK_ARG_RET(ctx, ctx, LY_EINVAL);
 
@@ -92,7 +91,7 @@
                          LOGERR(ctx, LY_ESYS, "Given search directory \"%s\" is not a directory.", new_dir); free(new_dir),
                          LY_EINVAL);
         /* avoid path duplication */
-        for (u = 0; u < ctx->search_paths.count; ++u) {
+        for (uint32_t u = 0; u < ctx->search_paths.count; ++u) {
             if (!strcmp(new_dir, ctx->search_paths.objs[u])) {
                 free(new_dir);
                 return LY_EEXIST;
@@ -136,8 +135,6 @@
 API LY_ERR
 ly_ctx_unset_searchdir(struct ly_ctx *ctx, const char *value)
 {
-    unsigned int index;
-
     LY_CHECK_ARG_RET(ctx, ctx, LY_EINVAL);
 
     if (!ctx->search_paths.count) {
@@ -146,6 +143,8 @@
 
     if (value) {
         /* remove specific search directory */
+        uint32_t index;
+
         for (index = 0; index < ctx->search_paths.count; ++index) {
             if (!strcmp(value, ctx->search_paths.objs[index])) {
                 break;
@@ -167,7 +166,7 @@
 }
 
 API LY_ERR
-ly_ctx_unset_searchdir_last(struct ly_ctx *ctx, unsigned int count)
+ly_ctx_unset_searchdir_last(struct ly_ctx *ctx, uint32_t count)
 {
     LY_CHECK_ARG_RET(ctx, ctx, LY_EINVAL);
 
@@ -190,7 +189,7 @@
 }
 
 API LY_ERR
-ly_ctx_new(const char *search_dir, int options, struct ly_ctx **new_ctx)
+ly_ctx_new(const char *search_dir, uint16_t options, struct ly_ctx **new_ctx)
 {
     struct ly_ctx *ctx = NULL;
     struct lys_module *module;
@@ -268,7 +267,7 @@
     return rc;
 }
 
-API int
+API uint16_t
 ly_ctx_get_options(const struct ly_ctx *ctx)
 {
     LY_CHECK_ARG_RET(ctx, ctx, 0);
@@ -276,7 +275,7 @@
 }
 
 API LY_ERR
-ly_ctx_set_options(struct ly_ctx *ctx, int option)
+ly_ctx_set_options(struct ly_ctx *ctx, uint16_t option)
 {
     LY_CHECK_ARG_RET(ctx, ctx, LY_EINVAL);
     LY_CHECK_ERR_RET(option & LY_CTX_NOYANGLIBRARY, LOGARG(ctx, option), LY_EINVAL);
@@ -288,7 +287,7 @@
 }
 
 API LY_ERR
-ly_ctx_unset_options(struct ly_ctx *ctx, int option)
+ly_ctx_unset_options(struct ly_ctx *ctx, uint16_t option)
 {
     LY_CHECK_ARG_RET(ctx, ctx, LY_EINVAL);
     LY_CHECK_ERR_RET(option & LY_CTX_NOYANGLIBRARY, LOGARG(ctx, option), LY_EINVAL);
@@ -327,7 +326,7 @@
 }
 
 API const struct lys_module *
-ly_ctx_get_module_iter(const struct ly_ctx *ctx, unsigned int *index)
+ly_ctx_get_module_iter(const struct ly_ctx *ctx, uint32_t *index)
 {
     LY_CHECK_ARG_RET(ctx, ctx, index, NULL);
 
@@ -352,7 +351,7 @@
  * @return Module matching the given key, NULL if no such module found.
  */
 static struct lys_module *
-ly_ctx_get_module_by_iter(const struct ly_ctx *ctx, const char *key, size_t key_size, size_t key_offset, unsigned int *index)
+ly_ctx_get_module_by_iter(const struct ly_ctx *ctx, const char *key, size_t key_size, size_t key_offset, uint32_t *index)
 {
     struct lys_module *mod;
     const char *value;
@@ -383,7 +382,7 @@
 ly_ctx_get_module_by(const struct ly_ctx *ctx, const char *key, size_t key_offset, const char *revision)
 {
     struct lys_module *mod;
-    unsigned int index = 0;
+    uint32_t index = 0;
 
     while ((mod = ly_ctx_get_module_by_iter(ctx, key, 0, key_offset, &index))) {
         if (!revision) {
@@ -427,7 +426,7 @@
 ly_ctx_get_module_latest_by(const struct ly_ctx *ctx, const char *key, size_t key_offset)
 {
     struct lys_module *mod;
-    unsigned int index = 0;
+    uint32_t index = 0;
 
     while ((mod = ly_ctx_get_module_by_iter(ctx, key, 0, key_offset, &index))) {
         if (mod->latest_revision) {
@@ -464,7 +463,7 @@
 ly_ctx_get_module_implemented_by(const struct ly_ctx *ctx, const char *key, size_t key_size, size_t key_offset)
 {
     struct lys_module *mod;
-    unsigned int index = 0;
+    uint32_t index = 0;
 
     while ((mod = ly_ctx_get_module_by_iter(ctx, key, key_size, key_offset, &index))) {
         if (mod->implemented) {
@@ -533,7 +532,7 @@
 }
 
 API const struct lysc_node *
-ly_ctx_get_node(const struct ly_ctx *ctx, const struct lysc_node *ctx_node, const char *data_path, int output)
+ly_ctx_get_node(const struct ly_ctx *ctx, const struct lysc_node *ctx_node, const char *data_path, uint8_t output)
 {
     const struct lysc_node *snode = NULL;
     struct lyxp_expr *exp = NULL;
@@ -622,7 +621,7 @@
 }
 
 static LY_ERR
-ylib_deviation(struct lyd_node *parent, const struct lys_module *cur_mod, int bis)
+ylib_deviation(struct lyd_node *parent, const struct lys_module *cur_mod, uint8_t bis)
 {
     LY_ARRAY_COUNT_TYPE i;
     struct lys_module *mod;
@@ -647,7 +646,7 @@
 }
 
 static LY_ERR
-ylib_submodules(struct lyd_node *parent, const struct lys_module *cur_mod, int bis)
+ylib_submodules(struct lyd_node *parent, const struct lys_module *cur_mod, uint8_t bis)
 {
     LY_ERR ret;
     LY_ARRAY_COUNT_TYPE i;
@@ -694,7 +693,8 @@
 {
     LY_ERR ret;
     uint32_t i;
-    int bis = 0, r;
+    uint8_t bis = 0;
+    int r;
     char id[8], *str;
     const struct lys_module *mod;
     struct lyd_node *root = NULL, *root_bis = NULL, *cont, *set_bis = NULL;
diff --git a/src/context.h b/src/context.h
index 7a14c9d..122ca8c 100644
--- a/src/context.h
+++ b/src/context.h
@@ -198,7 +198,7 @@
  * @param[out] new_ctx Pointer to the created libyang context if LY_SUCCESS returned.
  * @return LY_ERR return value.
  */
-LY_ERR ly_ctx_new(const char *search_dir, int options, struct ly_ctx **new_ctx);
+LY_ERR ly_ctx_new(const char *search_dir, uint16_t options, struct ly_ctx **new_ctx);
 
 /**
  * @brief Add the search path into libyang context
@@ -234,7 +234,7 @@
  * Value 0 does not change the search path set.
  * @return LY_ERR return value
  */
-LY_ERR ly_ctx_unset_searchdir_last(struct ly_ctx *ctx, unsigned int count);
+LY_ERR ly_ctx_unset_searchdir_last(struct ly_ctx *ctx, uint32_t count);
 
 /**
  * @brief Get the NULL-terminated list of the search paths in libyang context. Do not modify the result!
@@ -251,7 +251,7 @@
  * @param[in] ctx Context to query.
  * @return Combination of all the currently set context's options, see @ref contextoptions.
  */
-int ly_ctx_get_options(const struct ly_ctx *ctx);
+uint16_t ly_ctx_get_options(const struct ly_ctx *ctx);
 
 /**
  * @brief Set some of the context's options, see @ref contextoptions.
@@ -259,7 +259,7 @@
  * @param[in] option Combination of the context's options to be set, see @ref contextoptions.
  * @return LY_ERR value.
  */
-LY_ERR ly_ctx_set_options(struct ly_ctx *ctx, int option);
+LY_ERR ly_ctx_set_options(struct ly_ctx *ctx, uint16_t option);
 
 /**
  * @brief Unset some of the context's options, see @ref contextoptions.
@@ -267,7 +267,7 @@
  * @param[in] option Combination of the context's options to be unset, see @ref contextoptions.
  * @return LY_ERR value.
  */
-LY_ERR ly_ctx_unset_options(struct ly_ctx *ctx, int option);
+LY_ERR ly_ctx_unset_options(struct ly_ctx *ctx, uint16_t option);
 
 /**
  * @brief Get current ID of the modules set. The value is available also
@@ -373,7 +373,7 @@
  * to be used in all calls starting with value 0.
  * @return Next context module, NULL if the last was already returned.
  */
-const struct lys_module *ly_ctx_get_module_iter(const struct ly_ctx *ctx, unsigned int *index);
+const struct lys_module *ly_ctx_get_module_iter(const struct ly_ctx *ctx, uint32_t *index);
 
 /**
  * @brief Get YANG module of the given namespace and revision.
@@ -418,7 +418,7 @@
  * @return Found schema node or NULL.
  */
 const struct lysc_node *ly_ctx_get_node(const struct ly_ctx *ctx, const struct lysc_node *ctx_node,
-        const char *data_path, int output);
+        const char *data_path, uint8_t output);
 
 /**
  * @brief Reset cached latest revision information of the schemas in the context.
diff --git a/src/diff.c b/src/diff.c
index e20c520..a02c5dd 100644
--- a/src/diff.c
+++ b/src/diff.c
@@ -231,7 +231,7 @@
  * @return LY_ERR value on other errors.
  */
 static LY_ERR
-lyd_diff_userord_attrs(const struct lyd_node *first, const struct lyd_node *second, int options,
+lyd_diff_userord_attrs(const struct lyd_node *first, const struct lyd_node *second, uint16_t options,
         struct lyd_diff_userord **userord, enum lyd_diff_op *op, const char **orig_default, char **value,
         char **orig_value, char **key, char **orig_key)
 {
@@ -394,7 +394,7 @@
  * @return LY_ERR value on other errors.
  */
 static LY_ERR
-lyd_diff_attrs(const struct lyd_node *first, const struct lyd_node *second, int options, enum lyd_diff_op *op,
+lyd_diff_attrs(const struct lyd_node *first, const struct lyd_node *second, uint16_t options, enum lyd_diff_op *op,
         const char **orig_default, char **orig_value)
 {
     const struct lysc_node *schema;
@@ -516,7 +516,7 @@
  * @return LY_ERR value.
  */
 static LY_ERR
-lyd_diff_siblings_r(const struct lyd_node *first, const struct lyd_node *second, int options, int nosiblings,
+lyd_diff_siblings_r(const struct lyd_node *first, const struct lyd_node *second, uint16_t options, uint8_t nosiblings,
         struct lyd_node **diff)
 {
     LY_ERR ret = LY_SUCCESS;
@@ -669,7 +669,7 @@
 }
 
 static LY_ERR
-lyd_diff(const struct lyd_node *first, const struct lyd_node *second, int options, int nosiblings, struct lyd_node **diff)
+lyd_diff(const struct lyd_node *first, const struct lyd_node *second, uint16_t options, uint8_t nosiblings, struct lyd_node **diff)
 {
     const struct ly_ctx *ctx;
 
@@ -694,13 +694,13 @@
 }
 
 API LY_ERR
-lyd_diff_tree(const struct lyd_node *first, const struct lyd_node *second, int options, struct lyd_node **diff)
+lyd_diff_tree(const struct lyd_node *first, const struct lyd_node *second, uint16_t options, struct lyd_node **diff)
 {
     return lyd_diff(first, second, options, 1, diff);
 }
 
 API LY_ERR
-lyd_diff_siblings(const struct lyd_node *first, const struct lyd_node *second, int options, struct lyd_node **diff)
+lyd_diff_siblings(const struct lyd_node *first, const struct lyd_node *second, uint16_t options, struct lyd_node **diff)
 {
     return lyd_diff(first, second, options, 0, diff);
 }
@@ -1512,7 +1512,7 @@
     struct lyd_meta *meta;
     const char *val1 = NULL;
     char *val2;
-    int flags;
+    uint32_t flags;
 
     meta = lyd_find_meta(leaf->meta, mod, "orig-value");
     LY_CHECK_ERR_RET(!meta, LOGINT(LYD_CTX(leaf)), LY_EINT);
@@ -1538,7 +1538,7 @@
 lyd_diff_reverse_default(struct lyd_node *node, const struct lys_module *mod)
 {
     struct lyd_meta *meta;
-    int flag1, flag2;
+    uint32_t flag1, flag2;
 
     meta = lyd_find_meta(node->meta, mod, "orig-default");
     if (!meta) {
diff --git a/src/hash_table.c b/src/hash_table.c
index 3c749ea..bc6ec8b 100644
--- a/src/hash_table.c
+++ b/src/hash_table.c
@@ -24,8 +24,8 @@
 #include "common.h"
 #include "dict.h"
 
-static int
-lydict_val_eq(void *val1_p, void *val2_p, int UNUSED(mod), void *cb_data)
+static uint8_t
+lydict_val_eq(void *val1_p, void *val2_p, uint8_t UNUSED(mod), void *cb_data)
 {
     LY_CHECK_ARG_RET(NULL, val1_p, val2_p, cb_data, 0);
 
@@ -55,13 +55,12 @@
 void
 lydict_clean(struct dict_table *dict)
 {
-    unsigned int i;
     struct dict_rec *dict_rec = NULL;
     struct ht_rec *rec = NULL;
 
     LY_CHECK_ARG_RET(NULL, dict, );
 
-    for (i = 0; i < dict->hash_tab->size; i++) {
+    for (uint32_t i = 0; i < dict->hash_tab->size; i++) {
         /* get ith record */
         rec = (struct ht_rec *)&dict->hash_tab->recs[i * dict->hash_tab->rec_size];
         if (rec->hits == 1) {
@@ -128,8 +127,8 @@
 API void
 lydict_remove(const struct ly_ctx *ctx, const char *value)
 {
+    LY_ERR ret;
     size_t len;
-    int ret;
     uint32_t hash;
     struct dict_rec rec, *match = NULL;
     char *val_p;
@@ -151,7 +150,7 @@
     /* check if value is already inserted */
     ret = lyht_find(ctx->dict.hash_tab, &rec, hash, (void **)&match);
 
-    if (ret == 0) {
+    if (ret == LY_SUCCESS) {
         LY_CHECK_ERR_GOTO(!match, LOGINT(ctx), finish);
 
         /* if value is already in dictionary, decrement reference counter */
@@ -174,10 +173,10 @@
 }
 
 static char *
-dict_insert(const struct ly_ctx *ctx, char *value, size_t len, int zerocopy)
+dict_insert(const struct ly_ctx *ctx, char *value, size_t len, uint8_t zerocopy)
 {
+    LY_ERR ret = 0;
     struct dict_rec *match = NULL, rec;
-    int ret = 0;
     uint32_t hash;
 
     hash = dict_hash(value, len);
@@ -256,7 +255,7 @@
 }
 
 struct hash_table *
-lyht_new(uint32_t size, uint16_t val_size, values_equal_cb val_equal, void *cb_data, int resize)
+lyht_new(uint32_t size, uint16_t val_size, values_equal_cb val_equal, void *cb_data, uint16_t resize)
 {
     struct hash_table *ht;
 
@@ -276,7 +275,7 @@
     ht->size = size;
     ht->val_equal = val_equal;
     ht->cb_data = cb_data;
-    ht->resize = (uint16_t)resize;
+    ht->resize = resize;
 
     ht->rec_size = (sizeof(struct ht_rec) - 1) + val_size;
     /* allocate the records correctly */
@@ -333,12 +332,11 @@
 }
 
 static LY_ERR
-lyht_resize(struct hash_table *ht, int enlarge)
+lyht_resize(struct hash_table *ht, uint8_t enlarge)
 {
     struct ht_rec *rec;
     unsigned char *old_recs;
     uint32_t i, old_size;
-    int ret;
 
     old_recs = ht->recs;
     old_size = ht->size;
@@ -361,7 +359,7 @@
     for (i = 0; i < old_size; ++i) {
         rec = lyht_get_rec(old_recs, ht->rec_size, i);
         if (rec->hits > 0) {
-            ret = lyht_insert(ht, rec->val, rec->hash, NULL);
+            LY_ERR ret = lyht_insert(ht, rec->val, rec->hash, NULL);
             assert(!ret);
             (void)ret;
         }
@@ -487,7 +485,7 @@
  * @return LY_SUCCESS if record was found.
  */
 static LY_ERR
-lyht_find_rec(struct hash_table *ht, void *val_p, uint32_t hash, int mod, struct ht_rec **crec_p, uint32_t *col,
+lyht_find_rec(struct hash_table *ht, void *val_p, uint32_t hash, uint8_t mod, struct ht_rec **crec_p, uint32_t *col,
         struct ht_rec **rec_p)
 {
     struct ht_rec *rec, *crec;
@@ -593,9 +591,9 @@
 lyht_insert_with_resize_cb(struct hash_table *ht, void *val_p, uint32_t hash,
         values_equal_cb resize_val_equal, void **match_p)
 {
+    LY_ERR r, ret = LY_SUCCESS;
     struct ht_rec *rec, *crec = NULL;
     int32_t i;
-    int r, ret;
     values_equal_cb old_val_equal;
 
     if (!lyht_find_first(ht, hash, &rec)) {
@@ -646,7 +644,6 @@
     }
 
     /* check size & enlarge if needed */
-    ret = LY_SUCCESS;
     ++ht->used;
     if (ht->resize) {
         r = (ht->used * 100) / ht->size;
@@ -685,7 +682,8 @@
 {
     struct ht_rec *rec, *crec;
     int32_t i;
-    int first_matched = 0, r, ret;
+    uint8_t first_matched = 0;
+    LY_ERR r, ret = LY_SUCCESS;
 
     LY_CHECK_ERR_RET(lyht_find_first(ht, hash, &rec), LOGARG(NULL, hash), LY_ENOTFOUND); /* hash not found */
 
@@ -725,7 +723,6 @@
     }
 
     /* check size & shrink if needed */
-    ret = LY_SUCCESS;
     --ht->used;
     if (ht->resize == 2) {
         r = (ht->used * 100) / ht->size;
diff --git a/src/hash_table.h b/src/hash_table.h
index dde9570..6c44d6c 100644
--- a/src/hash_table.h
+++ b/src/hash_table.h
@@ -47,7 +47,7 @@
  * @param[in] cb_data User callback data.
  * @return 0 on non-equal, non-zero on equal.
  */
-typedef int (*values_equal_cb)(void *val1_p, void *val2_p, int mod, void *cb_data);
+typedef uint8_t (*values_equal_cb)(void *val1_p, void *val2_p, uint8_t mod, void *cb_data);
 
 /** when the table is at least this much percent full, it is enlarged (double the size) */
 #define LYHT_ENLARGE_PERCENTAGE 75
@@ -128,7 +128,7 @@
  * @param[in] resize Whether to resize the table on too few/too many records taken.
  * @return Empty hash table, NULL on error.
  */
-struct hash_table *lyht_new(uint32_t size, uint16_t val_size, values_equal_cb val_equal, void *cb_data, int resize);
+struct hash_table *lyht_new(uint32_t size, uint16_t val_size, values_equal_cb val_equal, void *cb_data, uint16_t resize);
 
 /**
  * @brief Set hash table value equal callback.
diff --git a/src/json.c b/src/json.c
index 2cd60dd..65de12b 100644
--- a/src/json.c
+++ b/src/json.c
@@ -87,7 +87,7 @@
  * @brief Set value corresponding to the current context's status
  */
 static void
-lyjson_ctx_set_value(struct lyjson_ctx *jsonctx, const char *value, size_t value_len, int dynamic)
+lyjson_ctx_set_value(struct lyjson_ctx *jsonctx, const char *value, size_t value_len, uint8_t dynamic)
 {
     assert(jsonctx);
 
@@ -323,7 +323,7 @@
 {
     size_t offset = 0, exponent = 0;
     const char *in = jsonctx->in->current;
-    int minus = 0;
+    uint8_t minus = 0;
 
     if (in[offset] == '-') {
         ++offset;
@@ -376,7 +376,7 @@
         char *ptr, *dec_point, *num;
         const char *e_ptr = &in[exponent + 1];
         size_t num_len, i;
-        long int dp_position; /* final position of the deciaml point */
+        int64_t dp_position; /* final position of the deciaml point */
 
         errno = 0;
         e_val = strtol(e_ptr, &ptr, 10);
@@ -437,7 +437,9 @@
             }
         }
         /* copy the value */
-        for (unsigned int dp_placed = dp_position ? 0 : 1, j = minus; j < exponent; j++) {
+        uint8_t dp_placed;
+        size_t j;
+        for (dp_placed = dp_position ? 0 : 1, j = minus; j < exponent; j++) {
             if (in[j] == '.') {
                 continue;
             }
@@ -679,7 +681,7 @@
 lyjson_ctx_next(struct lyjson_ctx *jsonctx, enum LYJSON_PARSER_STATUS *status)
 {
     LY_ERR ret = LY_SUCCESS;
-    int toplevel = 0;
+    uint8_t toplevel = 0;
     enum LYJSON_PARSER_STATUS prev;
 
     assert(jsonctx);
diff --git a/src/json.h b/src/json.h
index d53f673..8948969 100644
--- a/src/json.h
+++ b/src/json.h
@@ -60,14 +60,14 @@
 
     const char *value;      /* LYJSON_STRING, LYJSON_NUMBER, LYJSON_OBJECT */
     size_t value_len;       /* LYJSON_STRING, LYJSON_NUMBER, LYJSON_OBJECT */
-    int dynamic;            /* LYJSON_STRING, LYJSON_NUMBER, LYJSON_OBJECT */
+    uint8_t dynamic;        /* LYJSON_STRING, LYJSON_NUMBER, LYJSON_OBJECT */
 
     struct {
         enum LYJSON_PARSER_STATUS status;
         uint32_t status_count;
         const char *value;
         size_t value_len;
-        int dynamic;
+        uint8_t dynamic;
         const char *input;
     } backup;
 };
diff --git a/src/log.c b/src/log.c
index 1b4e229..53a5726 100644
--- a/src/log.c
+++ b/src/log.c
@@ -31,12 +31,12 @@
 #include "tree_data.h"
 #include "tree_schema.h"
 
-volatile uint8_t ly_log_level = LY_LLWRN;
-volatile uint8_t ly_log_opts = LY_LOLOG | LY_LOSTORE_LAST;
+volatile LY_LOG_LEVEL ly_log_level = LY_LLWRN;
+volatile uint32_t ly_log_opts = LY_LOLOG | LY_LOSTORE_LAST;
 static ly_log_clb log_clb;
-static volatile int path_flag = 1;
+static volatile uint8_t path_flag = 1;
 #ifndef NDEBUG
-volatile int ly_log_dbg_groups = 0;
+volatile uint32_t ly_log_dbg_groups = 0;
 #endif
 
 /* how many bytes add when enlarging buffers */
@@ -190,17 +190,17 @@
     return prev;
 }
 
-API int
-ly_log_options(int opts)
+API uint32_t
+ly_log_options(uint32_t opts)
 {
-    uint8_t prev = ly_log_opts;
+    uint32_t prev = ly_log_opts;
 
     ly_log_opts = opts;
     return prev;
 }
 
 API void
-ly_verb_dbg(int dbg_groups)
+ly_verb_dbg(uint32_t dbg_groups)
 {
 #ifndef NDEBUG
     ly_log_dbg_groups = dbg_groups;
@@ -210,7 +210,7 @@
 }
 
 API void
-ly_set_log_clb(ly_log_clb clb, int path)
+ly_set_log_clb(ly_log_clb clb, uint8_t path)
 {
     log_clb = clb;
     path_flag = path;
@@ -294,7 +294,7 @@
         const char *format, va_list args)
 {
     char *msg = NULL;
-    int free_strs;
+    uint8_t free_strs;
 
     if (level > ly_log_level) {
         /* do not print or store the message */
@@ -349,7 +349,7 @@
 #ifndef NDEBUG
 
 void
-ly_log_dbg(int group, const char *format, ...)
+ly_log_dbg(uint32_t group, const char *format, ...)
 {
     char *dbg_format;
     const char *str_group;
diff --git a/src/log.h b/src/log.h
index 87bab61..00eb55c 100644
--- a/src/log.h
+++ b/src/log.h
@@ -15,6 +15,8 @@
 #ifndef LY_LOG_H_
 #define LY_LOG_H_
 
+#include <stdint.h>
+
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -75,7 +77,7 @@
  * @param[in] opts Bitfield of @ref logopts.
  * @return Previous logger options.
  */
-int ly_log_options(int opts);
+uint32_t ly_log_options(uint32_t opts);
 
 #ifndef NDEBUG
 
@@ -102,7 +104,7 @@
  * @brief Enable specific debugging messages (independent of log level).
  * @param[in] dbg_groups Bitfield of enabled debug message groups (see @ref dbggroup).
  */
-void ly_verb_dbg(int dbg_groups);
+void ly_verb_dbg(uint32_t dbg_groups);
 
 #endif
 
@@ -129,7 +131,7 @@
  *            presence) or it can be NULL, so consider it as an optional parameter. If the flag is 0, libyang will
  *            not bother with resolving the path.
  */
-void ly_set_log_clb(ly_log_clb clb, int path);
+void ly_set_log_clb(ly_log_clb clb, uint8_t path);
 
 /**
  * @brief Get logger callback.
diff --git a/src/parser.c b/src/parser.c
index ffbe1d9..f1fd349 100644
--- a/src/parser.c
+++ b/src/parser.c
@@ -288,7 +288,7 @@
 }
 
 API void
-ly_in_free(struct ly_in *in, int destroy)
+ly_in_free(struct ly_in *in, uint8_t destroy)
 {
     if (!in) {
         return;
@@ -407,7 +407,7 @@
 
 LY_ERR
 lyd_parser_create_term(struct lyd_ctx *lydctx, const struct lysc_node *schema, const char *value, size_t value_len,
-        int *dynamic, int value_hints, LY_PREFIX_FORMAT format, void *prefix_data, struct lyd_node **node)
+        uint8_t *dynamic, uint32_t value_hints, LY_PREFIX_FORMAT format, void *prefix_data, struct lyd_node **node)
 {
     LY_ERR ret;
 
@@ -423,7 +423,7 @@
 
 LY_ERR
 lyd_parser_create_meta(struct lyd_ctx *lydctx, struct lyd_node *parent, struct lyd_meta **meta, const struct lys_module *mod,
-        const char *name, size_t name_len, const char *value, size_t value_len, int *dynamic, int value_hints,
+        const char *name, size_t name_len, const char *value, size_t value_len, uint8_t *dynamic, uint32_t value_hints,
         LY_PREFIX_FORMAT format, void *prefix_data, const struct lysc_node *ctx_snode)
 {
     LY_ERR ret;
diff --git a/src/parser.h b/src/parser.h
index 28c40bd..2c35f24 100644
--- a/src/parser.h
+++ b/src/parser.h
@@ -167,7 +167,7 @@
  * @param[in] destroy Flag to free the input data buffer (for LY_IN_MEMORY) or to
  * close stream/file descriptor (for LY_IN_FD and LY_IN_FILE)
  */
-void ly_in_free(struct ly_in *in, int destroy);
+void ly_in_free(struct ly_in *in, uint8_t destroy);
 
 #ifdef __cplusplus
 }
diff --git a/src/parser_data.h b/src/parser_data.h
index 000f25f..4b16efc 100644
--- a/src/parser_data.h
+++ b/src/parser_data.h
@@ -129,8 +129,8 @@
  * @return LY_SUCCESS in case of successful parsing (and validation).
  * @return LY_ERR value in case of error. Additional error information can be obtained from the context using ly_err* functions.
  */
-LY_ERR lyd_parse_data(const struct ly_ctx *ctx, struct ly_in *in, LYD_FORMAT format, int parse_options,
-        int validate_options, struct lyd_node **tree);
+LY_ERR lyd_parse_data(const struct ly_ctx *ctx, struct ly_in *in, LYD_FORMAT format, uint32_t parse_options,
+        uint32_t validate_options, struct lyd_node **tree);
 
 /**
  * @brief Parse (and validate) input data as a YANG data tree.
@@ -147,8 +147,8 @@
  * @return LY_SUCCESS in case of successful parsing (and validation).
  * @return LY_ERR value in case of error. Additional error information can be obtained from the context using ly_err* functions.
  */
-LY_ERR lyd_parse_data_mem(const struct ly_ctx *ctx, const char *data, LYD_FORMAT format, int parse_options,
-        int validate_options, struct lyd_node **tree);
+LY_ERR lyd_parse_data_mem(const struct ly_ctx *ctx, const char *data, LYD_FORMAT format, uint32_t parse_options,
+        uint32_t validate_options, struct lyd_node **tree);
 
 /**
  * @brief Parse (and validate) input data as a YANG data tree.
@@ -165,7 +165,7 @@
  * @return LY_SUCCESS in case of successful parsing (and validation).
  * @return LY_ERR value in case of error. Additional error information can be obtained from the context using ly_err* functions.
  */
-LY_ERR lyd_parse_data_fd(const struct ly_ctx *ctx, int fd, LYD_FORMAT format, int parse_options, int validate_options,
+LY_ERR lyd_parse_data_fd(const struct ly_ctx *ctx, int fd, LYD_FORMAT format, uint32_t parse_options, uint32_t validate_options,
         struct lyd_node **tree);
 
 /**
@@ -183,8 +183,8 @@
  * @return LY_SUCCESS in case of successful parsing (and validation).
  * @return LY_ERR value in case of error. Additional error information can be obtained from the context using ly_err* functions.
  */
-LY_ERR lyd_parse_data_path(const struct ly_ctx *ctx, const char *path, LYD_FORMAT format, int parse_options,
-        int validate_options, struct lyd_node **tree);
+LY_ERR lyd_parse_data_path(const struct ly_ctx *ctx, const char *path, LYD_FORMAT format, uint32_t parse_options,
+        uint32_t validate_options, struct lyd_node **tree);
 
 /**
  * @brief Parse (and validate) data from the input handler as a YANG RPC/action invocation.
@@ -256,7 +256,7 @@
  * @return LY_SUCCESS on success.
  * @return LY_ERR error on error.
  */
-LY_ERR lyd_validate_all(struct lyd_node **tree, const struct ly_ctx *ctx, int val_opts, struct lyd_node **diff);
+LY_ERR lyd_validate_all(struct lyd_node **tree, const struct ly_ctx *ctx, uint32_t val_opts, struct lyd_node **diff);
 
 /**
  * @brief Fully validate a data tree of a module.
@@ -268,7 +268,7 @@
  * @return LY_SUCCESS on success.
  * @return LY_ERR error on error.
  */
-LY_ERR lyd_validate_module(struct lyd_node **tree, const struct lys_module *module, int val_opts, struct lyd_node **diff);
+LY_ERR lyd_validate_module(struct lyd_node **tree, const struct lys_module *module, uint32_t val_opts, struct lyd_node **diff);
 
 /**
  * @brief Validate an RPC/action, notification, or RPC/action reply.
diff --git a/src/parser_internal.h b/src/parser_internal.h
index d547913..03199f8 100644
--- a/src/parser_internal.h
+++ b/src/parser_internal.h
@@ -171,7 +171,7 @@
  * @param[in] value_hints Data parser's hint for the value's type.
  */
 LY_ERR lyd_parser_create_term(struct lyd_ctx *lydctx, const struct lysc_node *schema, const char *value, size_t value_len,
-        int *dynamic, int value_hints, LY_PREFIX_FORMAT format, void *prefix_data, struct lyd_node **node);
+        uint8_t *dynamic, uint32_t value_hints, LY_PREFIX_FORMAT format, void *prefix_data, struct lyd_node **node);
 
 /**
  * @brief Wrapper around lyd_create_meta() for data parsers.
@@ -181,7 +181,7 @@
  */
 LY_ERR lyd_parser_create_meta(struct lyd_ctx *lydctx, struct lyd_node *parent, struct lyd_meta **meta,
         const struct lys_module *mod, const char *name, size_t name_len, const char *value,
-        size_t value_len, int *dynamic, int value_hints, LY_PREFIX_FORMAT format,
+        size_t value_len, uint8_t *dynamic, uint32_t value_hints, LY_PREFIX_FORMAT format,
         void *prefix_data, const struct lysc_node *ctx_snode);
 
 #endif /* LY_PARSER_INTERNAL_H_ */
diff --git a/src/parser_json.c b/src/parser_json.c
index a2bdbfb..5585aac 100644
--- a/src/parser_json.c
+++ b/src/parser_json.c
@@ -86,11 +86,11 @@
  */
 static void
 lydjson_parse_name(const char *value, size_t value_len, const char **name_p, size_t *name_len_p, const char **prefix_p,
-        size_t *prefix_len_p, int *is_meta_p)
+        size_t *prefix_len_p, uint8_t *is_meta_p)
 {
     const char *name, *prefix = NULL;
     size_t name_len, prefix_len = 0;
-    int is_meta = 0;
+    uint8_t is_meta = 0;
 
     name = memchr(value, ':', value_len);
     if (name != NULL) {
@@ -183,13 +183,13 @@
  * @return LY_ENOT in case the input data are expected to be skipped
  */
 static LY_ERR
-lydjson_get_snode(const struct lyd_json_ctx *lydctx, int is_attr, const char *prefix, size_t prefix_len, const char *name,
+lydjson_get_snode(const struct lyd_json_ctx *lydctx, uint8_t is_attr, const char *prefix, size_t prefix_len, const char *name,
         size_t name_len, const struct lyd_node_inner *parent, const struct lysc_node **snode_p)
 {
     struct lys_module *mod = NULL;
 
     /* leave if-feature check for validation */
-    int getnext_opts = LYS_GETNEXT_NOSTATECHECK | (lydctx->int_opts & LYD_INTOPT_REPLY ? LYS_GETNEXT_OUTPUT : 0);
+    uint32_t getnext_opts = LYS_GETNEXT_NOSTATECHECK | (lydctx->int_opts & LYD_INTOPT_REPLY ? LYS_GETNEXT_OUTPUT : 0);
 
     /* init return value */
     *snode_p = NULL;
@@ -371,7 +371,7 @@
         while (key_set.count && status != LYJSON_OBJECT_CLOSED) {
             const char *name, *prefix;
             size_t name_len, prefix_len;
-            int is_attr;
+            uint8_t is_attr;
 
             /* match the key */
             snode = NULL;
@@ -436,7 +436,7 @@
  * @return LY_EINVAL in case of invalid context status not referring to a value.
  */
 static LY_ERR
-lydjson_value_type_hint(struct lyd_json_ctx *lydctx, enum LYJSON_PARSER_STATUS *status_p, int *type_hint_p)
+lydjson_value_type_hint(struct lyd_json_ctx *lydctx, enum LYJSON_PARSER_STATUS *status_p, uint32_t *type_hint_p)
 {
     *type_hint_p = 0;
 
@@ -480,7 +480,7 @@
  * and they are expected to be parsed as opaq nodes.
  */
 static LY_ERR
-lydjson_data_check_opaq(struct lyd_json_ctx *lydctx, const struct lysc_node *snode, int *type_hint_p)
+lydjson_data_check_opaq(struct lyd_json_ctx *lydctx, const struct lysc_node *snode, uint32_t *type_hint_p)
 {
     LY_ERR ret = LY_SUCCESS;
     struct lyjson_ctx *jsonctx = lydctx->jsonctx;
@@ -548,14 +548,14 @@
 {
     LY_ERR ret = LY_SUCCESS;
     struct lyd_node *node, *attr, *next, *start = *first_p, *meta_iter;
-    unsigned int instance = 0;
+    uint64_t instance = 0;
     const char *prev = NULL;
 
     /* finish linking metadata */
     LY_LIST_FOR_SAFE(*first_p, next, attr) {
         struct lyd_node_opaq *meta_container = (struct lyd_node_opaq *)attr;
-        unsigned int match = 0;
-        int is_attr;
+        uint64_t match = 0;
+        uint8_t is_attr;
         const char *name, *prefix;
         size_t name_len, prefix_len;
         const struct lysc_node *snode;
@@ -599,7 +599,7 @@
                     /* convert opaq node to a attribute of the opaq node */
                     struct lyd_node_opaq *meta = (struct lyd_node_opaq *)meta_iter;
                     struct ly_prefix *val_prefs = NULL;
-                    int dynamic = 0;
+                    uint8_t dynamic = 0;
 
                     /* get value prefixes */
                     LY_CHECK_GOTO(ret = lydjson_get_value_prefixes(lydctx->jsonctx->ctx, lydctx->jsonctx->value, lydctx->jsonctx->value_len, &val_prefs), cleanup);
@@ -634,7 +634,7 @@
                     /* convert opaq node to a metadata of the node */
                     struct lyd_node_opaq *meta = (struct lyd_node_opaq *)meta_iter;
                     struct lys_module *mod = NULL;
-                    int dynamic = 0;
+                    uint8_t dynamic = 0;
 
                     mod = ly_ctx_get_module_implemented(lydctx->jsonctx->ctx, meta->prefix.id);
                     if (mod) {
@@ -701,15 +701,15 @@
     LY_ERR ret = LY_SUCCESS;
     enum LYJSON_PARSER_STATUS status;
     const char *expected;
-    int in_parent = 0;
+    uint8_t in_parent = 0;
     const char *name, *prefix = NULL;
     size_t name_len, prefix_len = 0;
     struct lys_module *mod;
     struct lyd_meta *meta = NULL;
     const struct ly_ctx *ctx = lydctx->jsonctx->ctx;
-    int is_attr = 0;
+    uint8_t is_attr = 0;
     struct lyd_node *prev = node;
-    int instance = 0;
+    uint32_t instance = 0;
     uint16_t nodetype;
 
     assert(snode || node);
@@ -743,7 +743,7 @@
 
         if (!node || node->schema != prev->schema) {
             LOGVAL(lydctx->jsonctx->ctx, LY_VLOG_LYD, prev->parent, LYVE_REFERENCE,
-                   "Missing JSON data instance no. %d of %s:%s to be coupled with metadata.",
+                   "Missing JSON data instance no. %u of %s:%s to be coupled with metadata.",
                    instance, prev->schema->module->name, prev->schema->name);
             ret = LY_EVALID;
             goto cleanup;
@@ -928,8 +928,8 @@
     const char *value = NULL, *module_name;
     size_t value_len = 0, module_name_len = 0;
     struct ly_prefix *val_prefs = NULL;
-    int dynamic = 0;
-    int type_hint = 0;
+    uint8_t dynamic = 0;
+    uint32_t type_hint = 0;
 
     if (*status_inner_p != LYJSON_OBJECT && *status_inner_p != LYJSON_OBJECT_EMPTY) {
         /* prepare for creating opaq node with a value */
@@ -1086,7 +1086,7 @@
         enum LYJSON_PARSER_STATUS *status, struct lyd_node **node)
 {
     LY_ERR ret;
-    int type_hint;
+    uint32_t type_hint;
     uint32_t prev_opts;
     struct lyd_node *tree = NULL;
 
@@ -1199,7 +1199,7 @@
     enum LYJSON_PARSER_STATUS status_inner = 0;
     const char *name, *prefix = NULL;
     size_t name_len, prefix_len = 0;
-    int is_meta = 0;
+    uint8_t is_meta = 0;
     const struct lysc_node *snode = NULL;
     struct lyd_node *node = NULL, *attr_node = NULL;
     const struct ly_ctx *ctx = lydctx->jsonctx->ctx;
@@ -1368,7 +1368,7 @@
  * @return LY_ERR value.
  */
 static LY_ERR
-lyd_parse_json_init(const struct ly_ctx *ctx, struct ly_in *in, int parse_options, int validate_options,
+lyd_parse_json_init(const struct ly_ctx *ctx, struct ly_in *in, uint32_t parse_options, uint32_t validate_options,
         struct lyd_json_ctx **lydctx_p)
 {
     LY_ERR ret = LY_SUCCESS;
@@ -1405,7 +1405,7 @@
 }
 
 LY_ERR
-lyd_parse_json_data(const struct ly_ctx *ctx, struct ly_in *in, int parse_options, int validate_options,
+lyd_parse_json_data(const struct ly_ctx *ctx, struct ly_in *in, uint32_t parse_options, uint32_t validate_options,
         struct lyd_node **tree_p, struct lyd_ctx **lydctx_p)
 {
     LY_ERR ret = LY_SUCCESS;
@@ -1464,7 +1464,7 @@
     LY_ERR ret = LY_ENOT, r;
     const char *name, *prefix, *value = NULL;
     size_t name_len, prefix_len, value_len;
-    int is_attr, dynamic = 0;
+    uint8_t is_attr, dynamic = 0;
     enum LYJSON_PARSER_STATUS status;
     struct lyd_node *et;
 
@@ -1631,7 +1631,7 @@
     LY_ERR ret = LY_ENOT, r;
     const char *name, *prefix;
     size_t name_len, prefix_len;
-    int is_attr;
+    uint8_t is_attr;
     enum LYJSON_PARSER_STATUS status;
 
     *envp_p = NULL;
diff --git a/src/parser_lyb.c b/src/parser_lyb.c
index ce04658..e084458 100644
--- a/src/parser_lyb.c
+++ b/src/parser_lyb.c
@@ -171,9 +171,9 @@
  * @return LY_ERR value.
  */
 static LY_ERR
-lyb_read_string(char **str, int with_length, struct lylyb_ctx *lybctx)
+lyb_read_string(char **str, uint8_t with_length, struct lylyb_ctx *lybctx)
 {
-    int next_chunk = 0;
+    uint8_t next_chunk = 0;
     size_t len = 0, cur_len;
 
     *str = NULL;
@@ -345,7 +345,7 @@
 lyb_parse_metadata(struct lyd_lyb_ctx *lybctx, const struct lysc_node *sparent, struct lyd_meta **meta)
 {
     LY_ERR ret = LY_SUCCESS;
-    int dynamic;
+    uint8_t dynamic;
     uint8_t i, count = 0;
     char *meta_name = NULL, *meta_value;
     const struct lys_module *mod;
@@ -464,7 +464,7 @@
     uint8_t count, i;
     struct lyd_attr *attr2;
     char *prefix = NULL, *module_name = NULL, *name = NULL, *value = NULL;
-    int dynamic = 0;
+    uint8_t dynamic = 0;
     LYD_FORMAT format = 0;
     struct ly_prefix *val_prefs = NULL;
 
@@ -589,7 +589,7 @@
     uint8_t i, j;
     const struct lysc_node *sibling;
     LYB_HASH hash[LYB_HASH_BITS - 1];
-    int getnext_opts;
+    uint32_t getnext_opts;
 
     *snode = NULL;
     /* leave if-feature check for validation */
@@ -688,9 +688,9 @@
     struct ly_prefix *val_prefs = NULL;
     LYD_ANYDATA_VALUETYPE value_type;
     char *value = NULL, *name = NULL, *prefix = NULL, *module_key = NULL;
-    int dynamic = 0;
+    uint8_t dynamic = 0;
     LYD_FORMAT format = 0;
-    int prev_lo;
+    uint32_t prev_lo;
     const struct ly_ctx *ctx = lybctx->lybctx->ctx;
 
     /* register a new subtree */
@@ -986,8 +986,8 @@
  * @param[out] lydctx_p Data parser context to finish validation.
  */
 static LY_ERR
-lyd_parse_lyb_(const struct ly_ctx *ctx, struct lyd_node_inner **parent, struct ly_in *in, int parse_options, int validate_options,
-        int data_type, struct lyd_node **tree_p, struct lyd_node **op_p, struct lyd_ctx **lydctx_p)
+lyd_parse_lyb_(const struct ly_ctx *ctx, struct lyd_node_inner **parent, struct ly_in *in, uint32_t parse_options, uint32_t validate_options,
+        uint32_t data_type, struct lyd_node **tree_p, struct lyd_node **op_p, struct lyd_ctx **lydctx_p)
 {
     LY_ERR ret = LY_SUCCESS;
     struct lyd_lyb_ctx *lybctx;
@@ -1083,7 +1083,7 @@
 }
 
 LY_ERR
-lyd_parse_lyb_data(const struct ly_ctx *ctx, struct ly_in *in, int parse_options, int validate_options,
+lyd_parse_lyb_data(const struct ly_ctx *ctx, struct ly_in *in, uint32_t parse_options, uint32_t validate_options,
         struct lyd_node **tree_p, struct lyd_ctx **lydctx_p)
 {
     return lyd_parse_lyb_(ctx, NULL, in, parse_options, validate_options, 0, tree_p, NULL, lydctx_p);
diff --git a/src/parser_schema.h b/src/parser_schema.h
index 5001fe8..6be8f6f 100644
--- a/src/parser_schema.h
+++ b/src/parser_schema.h
@@ -107,7 +107,7 @@
  * file suffix.
  * @return LY_ERR value (LY_SUCCESS is returned even if the file is not found, then the *localfile is NULL).
  */
-LY_ERR lys_search_localfile(const char * const *searchpaths, int cwd, const char *name, const char *revision,
+LY_ERR lys_search_localfile(const char * const *searchpaths, uint8_t cwd, const char *name, const char *revision,
         char **localfile, LYS_INFORMAT *format);
 
 /** @} schematree */
diff --git a/src/parser_stmt.c b/src/parser_stmt.c
index c9b5809..af0feee 100644
--- a/src/parser_stmt.c
+++ b/src/parser_stmt.c
@@ -32,8 +32,8 @@
 static LY_ERR
 lysp_stmt_validate_value(struct lys_parser_ctx *ctx, enum yang_arg val_type, const char *val)
 {
-    int prefix = 0, first = 1;
-    unsigned int c;
+    uint8_t prefix = 0, first = 1;
+    uint32_t c;
     size_t utf8_char_len;
 
     while (*val) {
diff --git a/src/parser_xml.c b/src/parser_xml.c
index 7e2647a..491b21c 100644
--- a/src/parser_xml.c
+++ b/src/parser_xml.c
@@ -381,7 +381,7 @@
     uint32_t prev_opts;
     struct lyd_node *node = NULL, *anchor;
     struct ly_prefix *val_prefs;
-    int getnext_opts;
+    uint32_t getnext_opts;
 
     xmlctx = lydctx->xmlctx;
     ctx = xmlctx->ctx;
@@ -616,7 +616,7 @@
 }
 
 LY_ERR
-lyd_parse_xml_data(const struct ly_ctx *ctx, struct ly_in *in, int parse_options, int validate_options,
+lyd_parse_xml_data(const struct ly_ctx *ctx, struct ly_in *in, uint32_t parse_options, uint32_t validate_options,
         struct lyd_node **tree_p, struct lyd_ctx **lydctx_p)
 {
     LY_ERR ret = LY_SUCCESS;
diff --git a/src/parser_yang.c b/src/parser_yang.c
index 88cd2b1..3a18537 100644
--- a/src/parser_yang.c
+++ b/src/parser_yang.c
@@ -139,9 +139,9 @@
  */
 LY_ERR
 buf_store_char(struct lys_yang_parser_ctx *ctx, struct ly_in *in, enum yang_arg arg, char **word_p, size_t *word_len,
-        char **word_b, size_t *buf_len, int need_buf, int *prefix)
+        char **word_b, size_t *buf_len, uint8_t need_buf, uint8_t *prefix)
 {
-    unsigned int c;
+    uint32_t c;
     size_t len;
 
     /* check  valid combination of input paremeters - if need_buf specified, word_b must be provided */
@@ -220,7 +220,7 @@
  * @return LY_ERR values.
  */
 LY_ERR
-skip_comment(struct lys_yang_parser_ctx *ctx, struct ly_in *in, int comment)
+skip_comment(struct lys_yang_parser_ctx *ctx, struct ly_in *in, uint8_t comment)
 {
     /* internal statuses: 0 - comment ended,
      *                    1 - in line comment,
@@ -295,10 +295,11 @@
     /* string: 0 - string ended, 1 - string with ', 2 - string with ", 3 - string with " with last character \,
      *         4 - string finished, now skipping whitespaces looking for +,
      *         5 - string continues after +, skipping whitespaces */
-    unsigned int string, block_indent = 0, current_indent = 0, need_buf = 0;
+    uint8_t string;
+    uint64_t block_indent = 0, current_indent = 0;
+    uint8_t need_buf = 0, prefix = 0;
     const char *c;
-    int prefix = 0;
-    unsigned int trailing_ws = 0; /* current number of stored trailing whitespace characters */
+    uint64_t trailing_ws = 0; /* current number of stored trailing whitespace characters */
 
     if (in->current[0] == '\"') {
         string = 2;
@@ -514,7 +515,7 @@
         char **word_b, size_t *word_len)
 {
     size_t buf_len = 0;
-    int prefix = 0;
+    uint8_t prefix = 0;
     /* word buffer - dynamically allocated */
     *word_b = NULL;
 
@@ -631,9 +632,8 @@
 LY_ERR
 get_keyword(struct lys_yang_parser_ctx *ctx, struct ly_in *in, enum ly_stmt *kw, char **word_p, size_t *word_len)
 {
-    int prefix;
+    uint8_t prefix;
     const char *word_start;
-    unsigned int c;
     size_t len;
 
     if (word_p) {
@@ -721,6 +721,8 @@
 extension:
         while (in->current[0] && (in->current[0] != ' ') && (in->current[0] != '\t') && (in->current[0] != '\n')
                 && (in->current[0] != '{') && (in->current[0] != ';')) {
+            uint32_t c = 0;
+
             LY_CHECK_ERR_RET(ly_getutf8(&in->current, &c, &len),
                              LOGVAL_PARSER(ctx, LY_VCODE_INCHAR, in->current[-len]), LY_EVALID);
             ++ctx->indent;
@@ -816,7 +818,7 @@
  * @return LY_ERR values.
  */
 static LY_ERR
-parse_ext(struct lys_yang_parser_ctx *ctx, struct ly_in *in, const char *ext_name, int ext_name_len, LYEXT_SUBSTMT insubstmt,
+parse_ext(struct lys_yang_parser_ctx *ctx, struct ly_in *in, const char *ext_name, size_t ext_name_len, LYEXT_SUBSTMT insubstmt,
         LY_ARRAY_COUNT_TYPE insubstmt_index, struct lysp_ext_instance **exts)
 {
     LY_ERR ret = LY_SUCCESS;
diff --git a/src/parser_yin.c b/src/parser_yin.c
index c907f97..442c038 100644
--- a/src/parser_yin.c
+++ b/src/parser_yin.c
@@ -276,8 +276,8 @@
 LY_ERR
 yin_validate_value(struct lys_yin_parser_ctx *ctx, enum yang_arg val_type)
 {
-    int prefix = 0;
-    unsigned int c;
+    uint8_t prefix = 0;
+    uint32_t c;
     size_t utf8_char_len, already_read = 0;
     const char *val;
 
@@ -292,10 +292,10 @@
 
         switch (val_type) {
         case Y_IDENTIF_ARG:
-            LY_CHECK_RET(lysp_check_identifierchar((struct lys_parser_ctx *)ctx, c, !already_read, NULL));
+            LY_CHECK_RET(lysp_check_identifierchar((struct lys_parser_ctx *)ctx, c, already_read ? 0 : 1, NULL));
             break;
         case Y_PREF_IDENTIF_ARG:
-            LY_CHECK_RET(lysp_check_identifierchar((struct lys_parser_ctx *)ctx, c, !already_read, &prefix));
+            LY_CHECK_RET(lysp_check_identifierchar((struct lys_parser_ctx *)ctx, c, already_read ? 0 : 1, &prefix));
             break;
         case Y_STR_ARG:
         case Y_MAYBE_STR_ARG:
@@ -378,9 +378,9 @@
  * @return Pointer to desired record on success, NULL if element is not in the array.
  */
 static struct yin_subelement *
-get_record(enum ly_stmt type, size_t array_size, struct yin_subelement *array)
+get_record(enum ly_stmt type, LY_ARRAY_COUNT_TYPE array_size, struct yin_subelement *array)
 {
-    for (unsigned int u = 0; u < array_size; ++u) {
+    for (LY_ARRAY_COUNT_TYPE u = 0; u < array_size; ++u) {
         if (array[u].type == type) {
             return &array[u];
         }
diff --git a/src/path.c b/src/path.c
index 5a65ada..88f24a9 100644
--- a/src/path.c
+++ b/src/path.c
@@ -697,7 +697,7 @@
     const struct lys_module *mod;
     const struct lysc_node *node2, *cur_node, *op;
     struct ly_path *p = NULL;
-    int getnext_opts;
+    uint32_t getnext_opts;
     const char *name;
     size_t name_len;
 
diff --git a/src/plugins_exts.c b/src/plugins_exts.c
index 94c97cd..9158e09 100644
--- a/src/plugins_exts.c
+++ b/src/plugins_exts.c
@@ -37,9 +37,7 @@
 struct lyext_plugin *
 lyext_get_plugin(struct lysc_ext *ext)
 {
-    unsigned int u;
-
-    for (u = 0; lyext_plugins_internal[u].module; ++u) {
+    for (uint8_t u = 0; lyext_plugins_internal[u].module; ++u) {
         if (!strcmp(ext->name, lyext_plugins_internal[u].name) &&
                 !strcmp(ext->module->name, lyext_plugins_internal[u].module) &&
                 (!lyext_plugins_internal[u].revision || !strcmp(ext->module->revision, lyext_plugins_internal[u].revision))) {
diff --git a/src/plugins_exts.h b/src/plugins_exts.h
index 8a4033b..40fd29e 100644
--- a/src/plugins_exts.h
+++ b/src/plugins_exts.h
@@ -41,7 +41,7 @@
  * @brief Macro to store version of extension plugins API in the plugins.
  * It is matched when the plugin is being loaded by libyang.
  */
-#define LYEXT_VERSION_CHECK int lyext_api_version = LYEXT_API_VERSION;
+#define LYEXT_VERSION_CHECK uint32_t lyext_api_version = LYEXT_API_VERSION;
 
 /**
  * @defgroup extensionscompile YANG Extensions - Compilation Helpers
diff --git a/src/plugins_types.c b/src/plugins_types.c
index 9be990b..aec7306 100644
--- a/src/plugins_types.c
+++ b/src/plugins_types.c
@@ -174,7 +174,7 @@
  */
 static const char *
 ly_type_print_simple(const struct lyd_value *value, LY_PREFIX_FORMAT UNUSED(format),
-        void *UNUSED(prefix_data), int *dynamic)
+        void *UNUSED(prefix_data), uint8_t *dynamic)
 {
     *dynamic = 0;
     return (char *)value->canonical;
@@ -349,7 +349,7 @@
 
     if (len + trailing_zeros < value_len) {
         /* consume trailing whitespaces to check that there is nothing after it */
-        unsigned long int u;
+        uint64_t u;
         for (u = len + trailing_zeros; u < value_len && isspace(value[u]); ++u) {}
         if (u != value_len) {
             if (asprintf(&errmsg, "Invalid %lu. character of decimal64 value \"%.*s\".",
@@ -517,7 +517,7 @@
  * Implementation of the ly_type_store_clb.
  */
 static LY_ERR
-ly_type_store_int(const struct ly_ctx *ctx, struct lysc_type *type, const char *value, size_t value_len, int options,
+ly_type_store_int(const struct ly_ctx *ctx, struct lysc_type *type, const char *value, size_t value_len, uint32_t options,
         LY_PREFIX_FORMAT UNUSED(format), void *UNUSED(prefix_data), const void *UNUSED(context_node),
         const struct lyd_node *UNUSED(tree), struct lyd_value *storage, struct ly_err_item **err)
 {
@@ -573,7 +573,7 @@
  * Implementation of the ly_type_store_clb.
  */
 static LY_ERR
-ly_type_store_uint(const struct ly_ctx *ctx, struct lysc_type *type, const char *value, size_t value_len, int options,
+ly_type_store_uint(const struct ly_ctx *ctx, struct lysc_type *type, const char *value, size_t value_len, uint32_t options,
         LY_PREFIX_FORMAT UNUSED(format), void *UNUSED(prefix_data), const void *UNUSED(context_node),
         const struct lyd_node *UNUSED(tree), struct lyd_value *storage, struct ly_err_item **err)
 {
@@ -627,7 +627,7 @@
  * Implementation of the ly_type_store_clb.
  */
 static LY_ERR
-ly_type_store_decimal64(const struct ly_ctx *ctx, struct lysc_type *type, const char *value, size_t value_len, int options,
+ly_type_store_decimal64(const struct ly_ctx *ctx, struct lysc_type *type, const char *value, size_t value_len, uint32_t options,
         LY_PREFIX_FORMAT UNUSED(format), void *UNUSED(prefix_data), const void *UNUSED(context_node),
         const struct lyd_node *UNUSED(tree), struct lyd_value *storage, struct ly_err_item **err)
 {
@@ -656,7 +656,7 @@
              * for (num<0) - extra character for '-' sign */
             count = sprintf(buf, "%0*" PRId64 " ", (d > 0) ? (type_dec->fraction_digits + 1) : (type_dec->fraction_digits + 2), d);
         }
-        for (int i = type_dec->fraction_digits, j = 1; i > 0; i--) {
+        for (uint8_t i = type_dec->fraction_digits, j = 1; i > 0; i--) {
             if (j && i > 1 && buf[count - 2] == '0') {
                 /* we have trailing zero to skip */
                 buf[count - 1] = '\0';
@@ -693,14 +693,14 @@
  * Implementation of the ly_type_store_clb.
  */
 static LY_ERR
-ly_type_store_binary(const struct ly_ctx *ctx, struct lysc_type *type, const char *value, size_t value_len, int options,
+ly_type_store_binary(const struct ly_ctx *ctx, struct lysc_type *type, const char *value, size_t value_len, uint32_t options,
         LY_PREFIX_FORMAT UNUSED(format), void *UNUSED(prefix_data), const void *UNUSED(context_node),
         const struct lyd_node *UNUSED(tree), struct lyd_value *storage, struct ly_err_item **err)
 {
     size_t start = 0, stop = 0, count = 0, u, termination = 0;
     struct lysc_type_bin *type_bin = (struct lysc_type_bin *)type;
     char *errmsg;
-    int erc = 0;
+    int rc = 0;
 
     LY_CHECK_ARG_RET(ctx, value, LY_EINVAL);
 
@@ -744,7 +744,7 @@
                 }
                 if (!termination) {
                     /* error */
-                    erc = asprintf(&errmsg, "Invalid Base64 character (%c).", value[u]);
+                    rc = asprintf(&errmsg, "Invalid Base64 character (%c).", value[u]);
                     goto error;
                 }
             }
@@ -781,7 +781,7 @@
 
 error:
     if (!*err) {
-        if (erc == -1 || !errmsg) {
+        if (rc == -1 || !errmsg) {
             *err = ly_err_new(LY_LLERR, LY_EMEM, 0, "Memory allocation failed.", NULL, NULL);
         } else {
             *err = ly_err_new(LY_LLERR, LY_EVALID, LYVE_DATA, errmsg, NULL, NULL);
@@ -796,7 +796,7 @@
  * Implementation of the ly_type_store_clb.
  */
 static LY_ERR
-ly_type_store_string(const struct ly_ctx *ctx, struct lysc_type *type, const char *value, size_t value_len, int options,
+ly_type_store_string(const struct ly_ctx *ctx, struct lysc_type *type, const char *value, size_t value_len, uint32_t options,
         LY_PREFIX_FORMAT UNUSED(format), void *UNUSED(prefix_data), const void *UNUSED(context_node),
         const struct lyd_node *UNUSED(tree), struct lyd_value *storage, struct ly_err_item **err)
 {
@@ -836,7 +836,7 @@
  * Implementation of the ly_type_store_clb.
  */
 static LY_ERR
-ly_type_store_bits(const struct ly_ctx *ctx, struct lysc_type *type, const char *value, size_t value_len, int options,
+ly_type_store_bits(const struct ly_ctx *ctx, struct lysc_type *type, const char *value, size_t value_len, uint32_t options,
         LY_PREFIX_FORMAT UNUSED(format), void *UNUSED(prefix_data), const void *UNUSED(context_node),
         const struct lyd_node *UNUSED(tree), struct lyd_value *storage, struct ly_err_item **err)
 {
@@ -850,11 +850,11 @@
     LY_ARRAY_COUNT_TYPE u, v;
     char *errmsg = NULL;
     struct lysc_type_bits *type_bits = (struct lysc_type_bits *)type;
-    int iscanonical = 1;
+    uint8_t iscanonical = 1;
     size_t ws_count;
     size_t lws_count; /* leading whitespace count */
     const char *can = NULL;
-    int erc = 0;
+    int rc = 0;
 
     if (options & LY_TYPE_OPTS_SECOND_CALL) {
         return LY_SUCCESS;
@@ -886,7 +886,7 @@
                 /* check that the bit is not disabled */
                 LY_ARRAY_FOR(type_bits->bits[u].iffeatures, v) {
                     if (lysc_iffeature_value(&type_bits->bits[u].iffeatures[v]) == LY_ENOT) {
-                        erc = asprintf(&errmsg, "Bit \"%s\" is disabled by its %" LY_PRI_ARRAY_COUNT_TYPE ". if-feature condition.",
+                        rc = asprintf(&errmsg, "Bit \"%s\" is disabled by its %" LY_PRI_ARRAY_COUNT_TYPE ". if-feature condition.",
                                        type_bits->bits[u].name, v + 1);
                         goto error;
                     }
@@ -897,15 +897,15 @@
                 }
                 inserted = ly_set_add(items, &type_bits->bits[u], 0);
                 LY_CHECK_ERR_GOTO(inserted == -1, ret = LY_EMEM, error);
-                if ((unsigned int)inserted != items->count - 1) {
-                    erc = asprintf(&errmsg, "Bit \"%s\" used multiple times.", type_bits->bits[u].name);
+                if ((uint32_t)inserted != items->count - 1) {
+                    rc = asprintf(&errmsg, "Bit \"%s\" used multiple times.", type_bits->bits[u].name);
                     goto error;
                 }
                 goto next;
             }
         }
         /* item not found */
-        erc = asprintf(&errmsg, "Invalid bit value \"%.*s\".", (int)item_len, item);
+        rc = asprintf(&errmsg, "Invalid bit value \"%.*s\".", (int)item_len, item);
         goto error;
 next:
         /* remember for canonized form: item + space/termination-byte */
@@ -971,7 +971,7 @@
     return LY_SUCCESS;
 
 error:
-    if (erc == -1) {
+    if (rc == -1) {
         *err = ly_err_new(LY_LLERR, LY_EMEM, 0, "Memory allocation failed.", NULL, NULL);
         ret = LY_EMEM;
     } else if (errmsg) {
@@ -1025,14 +1025,14 @@
  * Implementation of the ly_type_store_clb.
  */
 static LY_ERR
-ly_type_store_enum(const struct ly_ctx *ctx, struct lysc_type *type, const char *value, size_t value_len, int options,
+ly_type_store_enum(const struct ly_ctx *ctx, struct lysc_type *type, const char *value, size_t value_len, uint32_t options,
         LY_PREFIX_FORMAT UNUSED(format), void *UNUSED(prefix_data), const void *UNUSED(context_node),
         const struct lyd_node *UNUSED(tree), struct lyd_value *storage, struct ly_err_item **err)
 {
     LY_ARRAY_COUNT_TYPE u, v;
     char *errmsg = NULL;
     struct lysc_type_enum *type_enum = (struct lysc_type_enum *)type;
-    int erc = 0;
+    int rc = 0;
 
     if (options & LY_TYPE_OPTS_SECOND_CALL) {
         return LY_SUCCESS;
@@ -1046,7 +1046,7 @@
             /* check that the enumeration value is not disabled */
             LY_ARRAY_FOR(type_enum->enums[u].iffeatures, v) {
                 if (lysc_iffeature_value(&type_enum->enums[u].iffeatures[v]) == LY_ENOT) {
-                    erc = asprintf(&errmsg, "Enumeration \"%s\" is disabled by its %" LY_PRI_ARRAY_COUNT_TYPE ". if-feature condition.",
+                    rc = asprintf(&errmsg, "Enumeration \"%s\" is disabled by its %" LY_PRI_ARRAY_COUNT_TYPE ". if-feature condition.",
                                    type_enum->enums[u].name, v + 1);
                     goto error;
                 }
@@ -1055,7 +1055,7 @@
         }
     }
     /* enum not found */
-    erc = asprintf(&errmsg, "Invalid enumeration value \"%.*s\".", (int)value_len, value);
+    rc = asprintf(&errmsg, "Invalid enumeration value \"%.*s\".", (int)value_len, value);
     goto error;
 
 match:
@@ -1072,7 +1072,7 @@
     return LY_SUCCESS;
 
 error:
-    if (erc == -1) {
+    if (rc == -1) {
         *err = ly_err_new(LY_LLERR, LY_EMEM, 0, "Memory allocation failed.", NULL, NULL);
         return LY_EMEM;
     } else {
@@ -1088,7 +1088,7 @@
  */
 static LY_ERR
 ly_type_store_boolean(const struct ly_ctx *ctx, struct lysc_type *type, const char *value, size_t value_len,
-        int options, LY_PREFIX_FORMAT UNUSED(format), void *UNUSED(prefix_data),
+        uint32_t options, LY_PREFIX_FORMAT UNUSED(format), void *UNUSED(prefix_data),
         const void *UNUSED(context_node), const struct lyd_node *UNUSED(tree),
         struct lyd_value *storage, struct ly_err_item **err)
 {
@@ -1130,7 +1130,7 @@
  * Implementation of the ly_type_store_clb.
  */
 static LY_ERR
-ly_type_store_empty(const struct ly_ctx *ctx, struct lysc_type *type, const char *value, size_t value_len, int options,
+ly_type_store_empty(const struct ly_ctx *ctx, struct lysc_type *type, const char *value, size_t value_len, uint32_t options,
         LY_PREFIX_FORMAT UNUSED(format), void *UNUSED(prefix_data),
         const void *UNUSED(context_node), const struct lyd_node *UNUSED(tree),
         struct lyd_value *storage, struct ly_err_item **err)
@@ -1186,7 +1186,7 @@
 }
 
 static const char *ly_type_print_identityref(const struct lyd_value *value, LY_PREFIX_FORMAT format, void *prefix_data,
-        int *dynamic);
+        uint8_t *dynamic);
 
 /**
  * @brief Validate, canonize and store value of the YANG built-in identiytref type.
@@ -1194,7 +1194,7 @@
  * Implementation of the ly_type_store_clb.
  */
 static LY_ERR
-ly_type_store_identityref(const struct ly_ctx *ctx, struct lysc_type *type, const char *value, size_t value_len, int options,
+ly_type_store_identityref(const struct ly_ctx *ctx, struct lysc_type *type, const char *value, size_t value_len, uint32_t options,
         LY_PREFIX_FORMAT format, void *prefix_data, const void *UNUSED(context_node),
         const struct lyd_node *UNUSED(tree), struct lyd_value *storage, struct ly_err_item **err)
 {
@@ -1205,7 +1205,8 @@
     const struct lys_module *mod;
     LY_ARRAY_COUNT_TYPE u;
     struct lysc_ident *ident = NULL, *identities;
-    int erc = 0, dyn;
+    int rc = 0;
+    uint8_t dyn;
 
     if (options & LY_TYPE_OPTS_SECOND_CALL) {
         return LY_SUCCESS;
@@ -1229,7 +1230,7 @@
 
     mod = ly_resolve_prefix(ctx, prefix, prefix_len, format, prefix_data);
     if (!mod) {
-        erc = asprintf(&errmsg, "Invalid identityref \"%.*s\" value - unable to map prefix to YANG schema.", (int)value_len, value);
+        rc = asprintf(&errmsg, "Invalid identityref \"%.*s\" value - unable to map prefix to YANG schema.", (int)value_len, value);
         goto error;
     }
     if (mod->compiled) {
@@ -1246,11 +1247,11 @@
     }
     if (u == LY_ARRAY_COUNT(identities)) {
         /* no match */
-        erc = asprintf(&errmsg, "Invalid identityref \"%.*s\" value - identity not found.", (int)value_len, value);
+        rc = asprintf(&errmsg, "Invalid identityref \"%.*s\" value - identity not found.", (int)value_len, value);
         goto error;
     } else if (!mod->compiled) {
         /* non-implemented module */
-        erc = asprintf(&errmsg, "Invalid identityref \"%.*s\" value - identity found in non-implemented module \"%s\".",
+        rc = asprintf(&errmsg, "Invalid identityref \"%.*s\" value - identity found in non-implemented module \"%s\".",
                         (int)value_len, value, mod->name);
         goto error;
     }
@@ -1264,7 +1265,7 @@
     }
     if (u == LY_ARRAY_COUNT(type_ident->bases)) {
         /* no match */
-        erc = asprintf(&errmsg, "Invalid identityref \"%.*s\" value - identity not accepted by the type specification.",
+        rc = asprintf(&errmsg, "Invalid identityref \"%.*s\" value - identity not accepted by the type specification.",
                         (int)value_len, value);
         goto error;
     }
@@ -1283,7 +1284,7 @@
     return LY_SUCCESS;
 
 error:
-    if (erc == -1 || !errmsg) {
+    if (rc == -1 || !errmsg) {
         *err = ly_err_new(LY_LLERR, LY_EMEM, 0, "Memory allocation failed.", NULL, NULL);
         return LY_EMEM;
     } else {
@@ -1312,7 +1313,7 @@
  * Implementation of the ly_type_print_clb.
  */
 static const char *
-ly_type_print_identityref(const struct lyd_value *value, LY_PREFIX_FORMAT format, void *prefix_data, int *dynamic)
+ly_type_print_identityref(const struct lyd_value *value, LY_PREFIX_FORMAT format, void *prefix_data, uint8_t *dynamic)
 {
     char *result = NULL;
 
@@ -1325,7 +1326,7 @@
 }
 
 static const char *ly_type_print_instanceid(const struct lyd_value *value, LY_PREFIX_FORMAT format, void *prefix_data,
-        int *dynamic);
+        uint8_t *dynamic);
 
 /**
  * @brief Validate and store value of the YANG built-in instance-identifier type.
@@ -1333,7 +1334,7 @@
  * Implementation of the ly_type_store_clb.
  */
 static LY_ERR
-ly_type_store_instanceid(const struct ly_ctx *ctx, struct lysc_type *type, const char *value, size_t value_len, int options,
+ly_type_store_instanceid(const struct ly_ctx *ctx, struct lysc_type *type, const char *value, size_t value_len, uint32_t options,
         LY_PREFIX_FORMAT format, void *prefix_data, const void *context_node, const struct lyd_node *tree,
         struct lyd_value *storage, struct ly_err_item **err)
 {
@@ -1344,7 +1345,9 @@
     struct ly_set predicates = {0};
     struct lyxp_expr *exp = NULL;
     const struct lysc_node *ctx_scnode;
-    int erc = 0, prefix_opt = 0, dyn;
+    int rc = 0;
+    uint32_t prefix_opt = 0;
+    uint8_t dyn;
 
     /* init */
     *err = NULL;
@@ -1373,9 +1376,9 @@
         if (ly_path_eval(storage->target, tree, NULL)) {
             /* in error message we print the JSON format of the instance-identifier - in case of XML, it is not possible
              * to get the exactly same string as original, JSON is less demanding and still well readable/understandable. */
-            int dynamic = 0;
+            uint8_t dynamic = 0;
             const char *id = storage->realtype->plugin->print(storage, LY_PREF_JSON, NULL, &dynamic);
-            erc = asprintf(&errmsg, "Invalid instance-identifier \"%s\" value - required instance not found.", id);
+            rc = asprintf(&errmsg, "Invalid instance-identifier \"%s\" value - required instance not found.", id);
             if (dynamic) {
                 free((char *)id);
             }
@@ -1391,7 +1394,7 @@
     ret = ly_path_parse(ctx, ctx_scnode, value, value_len, LY_PATH_BEGIN_ABSOLUTE, LY_PATH_LREF_FALSE,
                         prefix_opt, LY_PATH_PRED_SIMPLE, &exp);
     if (ret) {
-        erc = asprintf(&errmsg, "Invalid instance-identifier \"%.*s\" value - syntax error.", (int)value_len, value);
+        rc = asprintf(&errmsg, "Invalid instance-identifier \"%.*s\" value - syntax error.", (int)value_len, value);
         goto error;
     }
 
@@ -1399,7 +1402,7 @@
     ret = ly_path_compile(ctx, ctx_scnode->module, NULL, exp, LY_PATH_LREF_FALSE, lysc_is_output(ctx_scnode) ?
                           LY_PATH_OPER_OUTPUT : LY_PATH_OPER_INPUT, LY_PATH_TARGET_SINGLE, format, prefix_data, &path);
     if (ret) {
-        erc = asprintf(&errmsg, "Invalid instance-identifier \"%.*s\" value - semantic error.", (int)value_len, value);
+        rc = asprintf(&errmsg, "Invalid instance-identifier \"%.*s\" value - semantic error.", (int)value_len, value);
         goto error;
     }
 
@@ -1407,7 +1410,7 @@
     if (!(options & LY_TYPE_OPTS_INCOMPLETE_DATA) && !(options & LY_TYPE_OPTS_SCHEMA) && type_inst->require_instance) {
         ret = ly_path_eval(path, tree, NULL);
         if (ret) {
-            erc = asprintf(&errmsg, "Invalid instance-identifier \"%.*s\" value - instance not found.", (int)value_len, value);
+            rc = asprintf(&errmsg, "Invalid instance-identifier \"%.*s\" value - instance not found.", (int)value_len, value);
             goto error;
         }
     }
@@ -1447,7 +1450,7 @@
     ly_path_free(ctx, path);
 
     if (!*err) {
-        if (erc == -1) {
+        if (rc == -1) {
             *err = ly_err_new(LY_LLERR, LY_EMEM, 0, "Memory allocation failed.", NULL, NULL);
             ret = LY_EMEM;
         } else {
@@ -1520,7 +1523,7 @@
  * Implementation of the ly_type_print_clb.
  */
 static const char *
-ly_type_print_instanceid(const struct lyd_value *value, LY_PREFIX_FORMAT format, void *prefix_data, int *dynamic)
+ly_type_print_instanceid(const struct lyd_value *value, LY_PREFIX_FORMAT format, void *prefix_data, uint8_t *dynamic)
 {
     LY_ARRAY_COUNT_TYPE u, v;
     char *result = NULL;
@@ -1547,7 +1550,7 @@
                 case LY_PATH_PREDTYPE_LIST:
                 {
                     /* key-predicate */
-                    int d = 0;
+                    uint8_t d = 0;
                     const char *value = pred->value.realtype->plugin->print(&pred->value, format, prefix_data, &d);
                     char quot = '\'';
                     if (strchr(value, quot)) {
@@ -1563,7 +1566,7 @@
                 case LY_PATH_PREDTYPE_LEAFLIST:
                 {
                     /* leaf-list-predicate */
-                    int d = 0;
+                    uint8_t d = 0;
                     const char *value = pred->value.realtype->plugin->print(&pred->value, format, prefix_data, &d);
                     char quot = '\'';
                     if (strchr(value, quot)) {
@@ -1600,7 +1603,7 @@
                 case LY_PATH_PREDTYPE_LIST:
                 {
                     /* key-predicate */
-                    int d = 0;
+                    uint8_t d = 0;
                     const char *value = pred->value.realtype->plugin->print(&pred->value, format, prefix_data, &d);
                     char quot = '\'';
                     if (strchr(value, quot)) {
@@ -1615,7 +1618,7 @@
                 case LY_PATH_PREDTYPE_LEAFLIST:
                 {
                     /* leaf-list-predicate */
-                    int d = 0;
+                    uint8_t d = 0;
                     const char *value = pred->value.realtype->plugin->print(&pred->value, format, prefix_data, &d);
                     char quot = '\'';
                     if (strchr(value, quot)) {
@@ -1673,7 +1676,7 @@
     LY_ERR ret;
     struct lyxp_set set = {0};
     const char *val_str;
-    int dynamic;
+    uint8_t dynamic;
     uint32_t i;
 
     /* find all target data instances */
@@ -1733,7 +1736,7 @@
  * Implementation of the ly_type_store_clb.
  */
 static LY_ERR
-ly_type_store_leafref(const struct ly_ctx *ctx, struct lysc_type *type, const char *value, size_t value_len, int options,
+ly_type_store_leafref(const struct ly_ctx *ctx, struct lysc_type *type, const char *value, size_t value_len, uint32_t options,
         LY_PREFIX_FORMAT format, void *prefix_data, const void *context_node, const struct lyd_node *tree,
         struct lyd_value *storage, struct ly_err_item **err)
 {
@@ -1810,7 +1813,7 @@
  * Implementation of the ly_type_print_clb.
  */
 static const char *
-ly_type_print_leafref(const struct lyd_value *value, LY_PREFIX_FORMAT format, void *prefix_data, int *dynamic)
+ly_type_print_leafref(const struct lyd_value *value, LY_PREFIX_FORMAT format, void *prefix_data, uint8_t *dynamic)
 {
     return value->realtype->plugin->print(value, format, prefix_data, dynamic);
 }
@@ -1843,7 +1846,7 @@
  * @brief Answer if the type is suitable for the parser's hit (if any) in the specified format
  */
 LY_ERR
-type_check_parser_hint(LY_PREFIX_FORMAT format, int hint, LY_DATA_TYPE type)
+type_check_parser_hint(LY_PREFIX_FORMAT format, uint32_t hint, LY_DATA_TYPE type)
 {
     if (format == LY_PREF_JSON && hint) {
         switch (type) {
@@ -1929,7 +1932,6 @@
 ly_type_union_store_prefix_data(const struct ly_ctx *ctx, const char *value, size_t value_len, LY_PREFIX_FORMAT format,
         void *prefix_data)
 {
-    unsigned int c;
     const char *start, *stop;
     const struct lys_module *mod;
     struct lyxml_ns *ns;
@@ -1955,6 +1957,8 @@
     /* add all used prefixes */
     for (stop = start = value; (size_t)(stop - value) < value_len; start = stop) {
         size_t bytes;
+        uint32_t c;
+
         ly_getutf8(&stop, &c, &bytes);
         if (is_xmlqnamestartchar(c)) {
             for (ly_getutf8(&stop, &c, &bytes);
@@ -2062,7 +2066,7 @@
  * Implementation of the ly_type_store_clb.
  */
 static LY_ERR
-ly_type_store_union(const struct ly_ctx *ctx, struct lysc_type *type, const char *value, size_t value_len, int options,
+ly_type_store_union(const struct ly_ctx *ctx, struct lysc_type *type, const char *value, size_t value_len, uint32_t options,
         LY_PREFIX_FORMAT format, void *prefix_data, const void *context_node, const struct lyd_node *tree,
         struct lyd_value *storage, struct ly_err_item **err)
 {
@@ -2071,7 +2075,7 @@
     struct lysc_type_union *type_u = (struct lysc_type_union *)type;
     struct lyd_value_subvalue *subvalue;
     char *errmsg = NULL;
-    int prev_lo;
+    uint32_t prev_lo;
 
     if (options & LY_TYPE_OPTS_SECOND_CALL) {
         subvalue = storage->subvalue;
@@ -2187,7 +2191,7 @@
  * Implementation of the ly_type_print_clb.
  */
 static const char *
-ly_type_print_union(const struct lyd_value *value, LY_PREFIX_FORMAT format, void *prefix_data, int *dynamic)
+ly_type_print_union(const struct lyd_value *value, LY_PREFIX_FORMAT format, void *prefix_data, uint8_t *dynamic)
 {
     return value->subvalue->value->realtype->plugin->print(value->subvalue->value, format, prefix_data, dynamic);
 }
diff --git a/src/plugins_types.h b/src/plugins_types.h
index 8efb320..885b6b0 100644
--- a/src/plugins_types.h
+++ b/src/plugins_types.h
@@ -201,7 +201,7 @@
  * @return LY_ERR value if an error occurred and the value could not be canonized following the type's rules.
  */
 typedef LY_ERR (*ly_type_store_clb)(const struct ly_ctx *ctx, struct lysc_type *type, const char *value, size_t value_len,
-        int options, LY_PREFIX_FORMAT format, void *prefix_data, const void *context_node,
+        uint32_t options, LY_PREFIX_FORMAT format, void *prefix_data, const void *context_node,
         const struct lyd_node *tree, struct lyd_value *storage, struct ly_err_item **err);
 
 /**
@@ -234,7 +234,7 @@
  * @return NULL in case of error.
  */
 typedef const char *(*ly_type_print_clb)(const struct lyd_value *value, LY_PREFIX_FORMAT format, void *prefix_data,
-        int *dynamic);
+        uint8_t *dynamic);
 
 /**
  * @brief Callback to duplicate data in data structure. Note that callback is even responsible for duplicating lyd_value::canonized.
diff --git a/src/printer.c b/src/printer.c
index 6272bb3..4b07b8b 100644
--- a/src/printer.c
+++ b/src/printer.c
@@ -71,7 +71,7 @@
     {"unique", "tag", 0},                       /**< LYEXT_SUBSTMT_UNIQUE */
 };
 
-int
+uint8_t
 ly_is_default(const struct lyd_node *node)
 {
     const struct lysc_node_leaf *leaf;
@@ -109,8 +109,8 @@
     return 1;
 }
 
-int
-ly_should_print(const struct lyd_node *node, int options)
+uint8_t
+ly_should_print(const struct lyd_node *node, uint32_t options)
 {
     const struct lyd_node *elem;
 
@@ -429,7 +429,7 @@
 }
 
 API void
-ly_out_free(struct ly_out *out, void (*clb_arg_destructor)(void *arg), int destroy)
+ly_out_free(struct ly_out *out, void (*clb_arg_destructor)(void *arg), uint8_t destroy)
 {
     if (!out) {
         return;
@@ -597,8 +597,8 @@
 LY_ERR
 ly_write_(struct ly_out *out, const char *buf, size_t len)
 {
-    LY_ERR ret;
-    int written = 0;
+    LY_ERR ret = LY_SUCCESS;
+    size_t written = 0;
 
     if (out->hole_count) {
         /* we are buffering data after a hole */
@@ -640,29 +640,46 @@
 
         written = len;
         break;
-    case LY_OUT_FD:
-        written = write(out->method.fd, buf, len);
+    case LY_OUT_FD: {
+        ssize_t r;
+        r = write(out->method.fd, buf, len);
+        if (r < 0) {
+            ret = LY_ESYS;
+        } else {
+            written = (size_t)r;
+        }
         break;
+    }
     case LY_OUT_FDSTREAM:
     case LY_OUT_FILEPATH:
     case LY_OUT_FILE:
         written = fwrite(buf, sizeof *buf, len, out->method.f);
+        if (written != len) {
+            ret = LY_ESYS;
+        }
         break;
-    case LY_OUT_CALLBACK:
-        written = out->method.clb.func(out->method.clb.arg, buf, len);
+    case LY_OUT_CALLBACK: {
+        ssize_t r;
+        r = out->method.clb.func(out->method.clb.arg, buf, len);
+        if (r < 0) {
+            ret = LY_ESYS;
+        } else {
+            written = (size_t)r;
+        }
         break;
+    }
     case LY_OUT_ERROR:
         LOGINT(NULL);
         return LY_EINT;
     }
 
-    if (written < 0) {
+    if (ret) {
         if (errno == EAGAIN || errno == EWOULDBLOCK) {
+            ret = LY_SUCCESS;
             goto repeat;
         }
         LOGERR(NULL, LY_ESYS, "%s: writing data failed (%s).", __func__, strerror(errno));
         written = 0;
-        ret = LY_ESYS;
     } else if ((size_t)written != len) {
         LOGERR(NULL, LY_ESYS, "%s: writing data failed (unable to write %u from %u data).", __func__,
                len - (size_t)written, len);
diff --git a/src/printer.h b/src/printer.h
index 5eb217d..3ffbef1 100644
--- a/src/printer.h
+++ b/src/printer.h
@@ -237,7 +237,7 @@
  * @param[in] destroy Flag to free allocated buffer (for LY_OUT_MEMORY) or to
  * close stream/file descriptor (for LY_OUT_FD, LY_OUT_FDSTREAM and LY_OUT_FILE)
  */
-void ly_out_free(struct ly_out *out, void (*clb_arg_destructor)(void *arg), int destroy);
+void ly_out_free(struct ly_out *out, void (*clb_arg_destructor)(void *arg), uint8_t destroy);
 
 #ifdef __cplusplus
 }
diff --git a/src/printer_data.c b/src/printer_data.c
index 50ac2e1..1cdc0c2 100644
--- a/src/printer_data.c
+++ b/src/printer_data.c
@@ -25,7 +25,7 @@
 #include "tree_schema.h"
 
 static LY_ERR
-lyd_print_(struct ly_out *out, const struct lyd_node *root, LYD_FORMAT format, int options)
+lyd_print_(struct ly_out *out, const struct lyd_node *root, LYD_FORMAT format, uint32_t options)
 {
     LY_ERR ret = LY_SUCCESS;
 
@@ -49,7 +49,7 @@
 }
 
 API LY_ERR
-lyd_print_all(struct ly_out *out, const struct lyd_node *root, LYD_FORMAT format, int options)
+lyd_print_all(struct ly_out *out, const struct lyd_node *root, LYD_FORMAT format, uint32_t options)
 {
     LY_CHECK_ARG_RET(NULL, out, !(options & LYD_PRINT_WITHSIBLINGS), LY_EINVAL);
 
@@ -71,7 +71,7 @@
 }
 
 API LY_ERR
-lyd_print_tree(struct ly_out *out, const struct lyd_node *root, LYD_FORMAT format, int options)
+lyd_print_tree(struct ly_out *out, const struct lyd_node *root, LYD_FORMAT format, uint32_t options)
 {
     LY_CHECK_ARG_RET(NULL, out, !(options & LYD_PRINT_WITHSIBLINGS), LY_EINVAL);
 
@@ -85,7 +85,7 @@
 }
 
 API LY_ERR
-lyd_print_mem(char **strp, const struct lyd_node *root, LYD_FORMAT format, int options)
+lyd_print_mem(char **strp, const struct lyd_node *root, LYD_FORMAT format, uint32_t options)
 {
     LY_ERR ret;
     struct ly_out *out;
@@ -102,7 +102,7 @@
 }
 
 API LY_ERR
-lyd_print_fd(int fd, const struct lyd_node *root, LYD_FORMAT format, int options)
+lyd_print_fd(int fd, const struct lyd_node *root, LYD_FORMAT format, uint32_t options)
 {
     LY_ERR ret;
     struct ly_out *out;
@@ -116,7 +116,7 @@
 }
 
 API LY_ERR
-lyd_print_file(FILE *f, const struct lyd_node *root, LYD_FORMAT format, int options)
+lyd_print_file(FILE *f, const struct lyd_node *root, LYD_FORMAT format, uint32_t options)
 {
     LY_ERR ret;
     struct ly_out *out;
@@ -130,7 +130,7 @@
 }
 
 API LY_ERR
-lyd_print_path(const char *path, const struct lyd_node *root, LYD_FORMAT format, int options)
+lyd_print_path(const char *path, const struct lyd_node *root, LYD_FORMAT format, uint32_t options)
 {
     LY_ERR ret;
     struct ly_out *out;
@@ -144,7 +144,7 @@
 }
 
 API LY_ERR
-lyd_print_clb(ly_write_clb writeclb, void *user_data, const struct lyd_node *root, LYD_FORMAT format, int options)
+lyd_print_clb(ly_write_clb writeclb, void *user_data, const struct lyd_node *root, LYD_FORMAT format, uint32_t options)
 {
     LY_ERR ret;
     struct ly_out *out;
diff --git a/src/printer_data.h b/src/printer_data.h
index 44e365f..6ff1e41 100644
--- a/src/printer_data.h
+++ b/src/printer_data.h
@@ -66,7 +66,7 @@
  * @param[in] options [Data printer flags](@ref dataprinterflags) except ::LYD_PRINT_WITHSIBLINGS.
  * @return LY_ERR value.
  */
-LY_ERR lyd_print_all(struct ly_out *out, const struct lyd_node *root, LYD_FORMAT format, int options);
+LY_ERR lyd_print_all(struct ly_out *out, const struct lyd_node *root, LYD_FORMAT format, uint32_t options);
 
 /**
  * @brief Print the selected data subtree.
@@ -77,7 +77,7 @@
  * @param[in] options [Data printer flags](@ref dataprinterflags) except ::LYD_PRINT_WITHSIBLINGS.
  * @return LY_ERR value.
  */
-LY_ERR lyd_print_tree(struct ly_out *out, const struct lyd_node *root, LYD_FORMAT format, int options);
+LY_ERR lyd_print_tree(struct ly_out *out, const struct lyd_node *root, LYD_FORMAT format, uint32_t options);
 
 /**
  * @brief Print data tree in the specified format.
@@ -88,7 +88,7 @@
  * @param[in] options [Data printer flags](@ref dataprinterflags).
  * @return LY_ERR value.
  */
-LY_ERR lyd_print_mem(char **strp, const struct lyd_node *root, LYD_FORMAT format, int options);
+LY_ERR lyd_print_mem(char **strp, const struct lyd_node *root, LYD_FORMAT format, uint32_t options);
 
 /**
  * @brief Print data tree in the specified format.
@@ -99,7 +99,7 @@
  * @param[in] options [Data printer flags](@ref dataprinterflags).
  * @return LY_ERR value.
  */
-LY_ERR lyd_print_fd(int fd, const struct lyd_node *root, LYD_FORMAT format, int options);
+LY_ERR lyd_print_fd(int fd, const struct lyd_node *root, LYD_FORMAT format, uint32_t options);
 
 /**
  * @brief Print data tree in the specified format.
@@ -110,7 +110,7 @@
  * @param[in] options [Data printer flags](@ref dataprinterflags).
  * @return LY_ERR value.
  */
-LY_ERR lyd_print_file(FILE *f, const struct lyd_node *root, LYD_FORMAT format, int options);
+LY_ERR lyd_print_file(FILE *f, const struct lyd_node *root, LYD_FORMAT format, uint32_t options);
 
 /**
  * @brief Print data tree in the specified format.
@@ -121,7 +121,7 @@
  * @param[in] options [Data printer flags](@ref dataprinterflags).
  * @return LY_ERR value.
  */
-LY_ERR lyd_print_path(const char *path, const struct lyd_node *root, LYD_FORMAT format, int options);
+LY_ERR lyd_print_path(const char *path, const struct lyd_node *root, LYD_FORMAT format, uint32_t options);
 
 /**
  * @brief Print data tree in the specified format.
@@ -133,7 +133,7 @@
  * @param[in] options [Data printer flags](@ref dataprinterflags).
  * @return LY_ERR value.
  */
-LY_ERR lyd_print_clb(ly_write_clb writeclb, void *user_data, const struct lyd_node *root, LYD_FORMAT format, int options);
+LY_ERR lyd_print_clb(ly_write_clb writeclb, void *user_data, const struct lyd_node *root, LYD_FORMAT format, uint32_t options);
 
 #ifdef __cplusplus
 }
diff --git a/src/printer_internal.h b/src/printer_internal.h
index 6740916..3703ad0 100644
--- a/src/printer_internal.h
+++ b/src/printer_internal.h
@@ -65,7 +65,7 @@
 struct ext_substmt_info_s {
     const char *name;      /**< name of the statement */
     const char *arg;       /**< name of YIN's attribute to present the statement */
-    int flags;             /**< various flags to clarify printing of the statement */
+    uint8_t flags;         /**< various flags to clarify printing of the statement */
 #define SUBST_FLAG_YIN 0x1 /**< has YIN element */
 #define SUBST_FLAG_ID 0x2  /**< the value is identifier -> no quotes */
 };
@@ -82,7 +82,7 @@
  * @param[in] options Schema output options (see @ref schemaprinterflags).
  * @return LY_ERR value, number of the printed bytes is updated in lyout::printed.
  */
-LY_ERR yang_print_parsed_module(struct ly_out *out, const struct lys_module *module, const struct lysp_module *modp, int options);
+LY_ERR yang_print_parsed_module(struct ly_out *out, const struct lys_module *module, const struct lysp_module *modp, uint32_t options);
 
 /**
  * @brief Helper macros for data printers
@@ -102,7 +102,7 @@
  * @param[in] options Schema output options (see @ref schemaprinterflags).
  * @return LY_ERR value, number of the printed bytes is updated in lyout::printed.
  */
-LY_ERR yang_print_parsed_submodule(struct ly_out *out, const struct lys_module *module, const struct lysp_submodule *submodp, int options);
+LY_ERR yang_print_parsed_submodule(struct ly_out *out, const struct lys_module *module, const struct lysp_submodule *submodp, uint32_t options);
 
 /**
  * @brief YANG printer of the compiled schemas.
@@ -116,7 +116,7 @@
  * @param[in] options Schema output options (see @ref schemaprinterflags).
  * @return LY_ERR value, number of the printed bytes is updated in lyout::printed.
  */
-LY_ERR yang_print_compiled(struct ly_out *out, const struct lys_module *module, int options);
+LY_ERR yang_print_compiled(struct ly_out *out, const struct lys_module *module, uint32_t options);
 
 /**
  * @brief YANG printer of the compiled schema node
@@ -130,7 +130,7 @@
  * @param[in] options Schema output options (see @ref schemaprinterflags).
  * @return LY_ERR value, number of the printed bytes is updated in lyout::printed.
  */
-LY_ERR yang_print_compiled_node(struct ly_out *out, const struct lysc_node *node, int options);
+LY_ERR yang_print_compiled_node(struct ly_out *out, const struct lysc_node *node, uint32_t options);
 
 /**
  * @brief YIN printer of the parsed module. Full YIN printer.
@@ -141,7 +141,7 @@
  * @param[in] options Schema output options (see @ref schemaprinterflags).
  * @return LY_ERR value, number of the printed bytes is updated in lyout::printed.
  */
-LY_ERR yin_print_parsed_module(struct ly_out *out, const struct lys_module *module, const struct lysp_module *modp, int options);
+LY_ERR yin_print_parsed_module(struct ly_out *out, const struct lys_module *module, const struct lysp_module *modp, uint32_t options);
 
 /**
  * @brief YIN printer of the parsed submodule. Full YIN printer.
@@ -152,7 +152,7 @@
  * @param[in] options Schema output options (see @ref schemaprinterflags).
  * @return LY_ERR value, number of the printed bytes is updated in lyout::printed.
  */
-LY_ERR yin_print_parsed_submodule(struct ly_out *out, const struct lys_module *module, const struct lysp_submodule *submodp, int options);
+LY_ERR yin_print_parsed_submodule(struct ly_out *out, const struct lys_module *module, const struct lysp_submodule *submodp, uint32_t options);
 
 /**
  * @brief XML printer of YANG data.
@@ -162,7 +162,7 @@
  * @param[in] options [Data printer flags](@ref dataprinterflags).
  * @return LY_ERR value, number of the printed bytes is updated in lyout::printed.
  */
-LY_ERR xml_print_data(struct ly_out *out, const struct lyd_node *root, int options);
+LY_ERR xml_print_data(struct ly_out *out, const struct lyd_node *root, uint32_t options);
 
 /**
  * @brief JSON printer of YANG data.
@@ -172,7 +172,7 @@
  * @param[in] options [Data printer flags](@ref dataprinterflags).
  * @return LY_ERR value, number of the printed bytes is updated in lyout::printed.
  */
-LY_ERR json_print_data(struct ly_out *out, const struct lyd_node *root, int options);
+LY_ERR json_print_data(struct ly_out *out, const struct lyd_node *root, uint32_t options);
 
 /**
  * @brief LYB printer of YANG data.
@@ -182,16 +182,16 @@
  * @param[in] options [Data printer flags](@ref dataprinterflags).
  * @return LY_ERR value, number of the printed bytes is updated in lyout::printed.
  */
-LY_ERR lyb_print_data(struct ly_out *out, const struct lyd_node *root, int options);
+LY_ERR lyb_print_data(struct ly_out *out, const struct lyd_node *root, uint32_t options);
 
 /**
  * @brief Check whether a node value equals to its default one.
  *
  * @param[in] node Term node to test.
  * @return 0 if no,
- * @return non-zero if yes.
+ * @return 1 if yes.
  */
-int ly_is_default(const struct lyd_node *node);
+uint8_t ly_is_default(const struct lyd_node *node);
 
 /**
  * @brief Check whether the node should even be printed.
@@ -199,9 +199,9 @@
  * @param[in] node Node to check.
  * @param[in] options Printer options.
  * @return 0 if no.
- * @return non-zero if yes.
+ * @return 1 if yes.
  */
-int ly_should_print(const struct lyd_node *node, int options);
+uint8_t ly_should_print(const struct lyd_node *node, uint32_t options);
 
 /**
  * @brief Generic printer of the given format string into the specified output.
diff --git a/src/printer_json.c b/src/printer_json.c
index e411ab6..a0285b2 100644
--- a/src/printer_json.c
+++ b/src/printer_json.c
@@ -32,12 +32,12 @@
  * @brief JSON printer context.
  */
 struct jsonpr_ctx {
-    struct ly_out *out;  /**< output specification */
-    unsigned int level; /**< current indentation level: 0 - no formatting, >= 1 indentation levels */
-    int options;        /**< [Data printer flags](@ref dataprinterflags) */
-    const struct ly_ctx *ctx; /**< libyang context */
+    struct ly_out *out;         /**< output specification */
+    uint16_t level;             /**< current indentation level: 0 - no formatting, >= 1 indentation levels */
+    uint32_t options;           /**< [Data printer flags](@ref dataprinterflags) */
+    const struct ly_ctx *ctx;   /**< libyang context */
 
-    unsigned int level_printed; /* level where some dara were already printed */
+    uint16_t level_printed;     /* level where some data were already printed */
     struct ly_set open; /* currently open array(s) */
     const struct lyd_node *print_sibling_metadata;
 };
@@ -218,7 +218,7 @@
 static LY_ERR
 json_print_string(struct ly_out *out, const char *text)
 {
-    unsigned int i, n;
+    uint64_t i, n;
 
     if (!text) {
         return LY_SUCCESS;
@@ -258,7 +258,7 @@
  * @return LY_ERR value.
  */
 static LY_ERR
-json_print_member(struct jsonpr_ctx *ctx, const struct lyd_node *node, int is_attr)
+json_print_member(struct jsonpr_ctx *ctx, const struct lyd_node *node, uint8_t is_attr)
 {
     PRINT_COMMA;
     if (LEVEL == 1 || json_nscmp(node, (const struct lyd_node *)node->parent)) {
@@ -285,7 +285,8 @@
  * @return LY_ERR value.
  */
 static LY_ERR
-json_print_member2(struct jsonpr_ctx *ctx, const struct lyd_node *parent, LYD_FORMAT format, const struct ly_prefix *prefix, const char *name, int is_attr)
+json_print_member2(struct jsonpr_ctx *ctx, const struct lyd_node *parent, LYD_FORMAT format,
+        const struct ly_prefix *prefix, const char *name, uint8_t is_attr)
 {
     const char *module_name = NULL;
 
@@ -332,7 +333,7 @@
 static LY_ERR
 json_print_value(struct jsonpr_ctx *ctx, const struct lyd_value *val)
 {
-    int dynamic = 0;
+    uint8_t dynamic = 0;
     const char *value = val->realtype->plugin->print(val, LY_PREF_JSON, NULL, &dynamic);
 
     /* leafref is not supported */
@@ -447,7 +448,7 @@
  * @return LY_ERR value.
  */
 static LY_ERR
-json_print_attributes(struct jsonpr_ctx *ctx, const struct lyd_node *node, int inner)
+json_print_attributes(struct jsonpr_ctx *ctx, const struct lyd_node *node, uint8_t inner)
 {
     const struct lys_module *wdmod = NULL;
 
@@ -519,7 +520,7 @@
 {
     LY_ERR ret = LY_SUCCESS;
     struct lyd_node *iter;
-    int prev_opts, prev_lo;
+    uint32_t prev_opts, prev_lo;
 
     if (!any->value.tree) {
         /* no content */
@@ -527,7 +528,7 @@
     }
 
     if (any->value_type == LYD_ANYDATA_LYB) {
-        int parser_options = LYD_PARSE_ONLY | LYD_PARSE_OPAQ | LYD_PARSE_STRICT;
+        uint32_t parser_options = LYD_PARSE_ONLY | LYD_PARSE_OPAQ | LYD_PARSE_STRICT;
 
         /* turn logging off */
         prev_lo = ly_log_options(0);
@@ -588,7 +589,7 @@
 {
     struct lyd_node *child;
     struct lyd_node *children = lyd_node_children(node, 0);
-    int has_content = 0;
+    uint8_t has_content = 0;
 
     if (node->meta || children) {
         has_content = 1;
@@ -748,7 +749,7 @@
 static LY_ERR
 json_print_opaq(struct jsonpr_ctx *ctx, const struct lyd_node_opaq *node)
 {
-    int first = 1, last = 1;
+    uint8_t first = 1, last = 1;
 
     if (node->hint & LYD_NODE_OPAQ_ISLIST) {
         const struct lyd_node_opaq *prev = (const struct lyd_node_opaq *)node->prev;
@@ -851,7 +852,7 @@
 }
 
 LY_ERR
-json_print_data(struct ly_out *out, const struct lyd_node *root, int options)
+json_print_data(struct ly_out *out, const struct lyd_node *root, uint32_t options)
 {
     const struct lyd_node *node;
     struct jsonpr_ctx ctx = {0};
diff --git a/src/printer_lyb.c b/src/printer_lyb.c
index e5c1a3c..1e4b145 100644
--- a/src/printer_lyb.c
+++ b/src/printer_lyb.c
@@ -39,8 +39,8 @@
 /**
  * @brief Hash table equal callback for checking hash equality only.
  */
-static int
-lyb_hash_equal_cb(void *UNUSED(val1_p), void *UNUSED(val2_p), int UNUSED(mod), void *UNUSED(cb_data))
+static uint8_t
+lyb_hash_equal_cb(void *UNUSED(val1_p), void *UNUSED(val2_p), uint8_t UNUSED(mod), void *UNUSED(cb_data))
 {
     /* for this purpose, if hash matches, the value does also, we do not want 2 values to have the same hash */
     return 1;
@@ -49,8 +49,8 @@
 /**
  * @brief Hash table equal callback for checking value pointer equality only.
  */
-static int
-lyb_ptr_equal_cb(void *val1_p, void *val2_p, int UNUSED(mod), void *UNUSED(cb_data))
+static uint8_t
+lyb_ptr_equal_cb(void *val1_p, void *val2_p, uint8_t UNUSED(mod), void *UNUSED(cb_data))
 {
     struct lysc_node *val1 = *(struct lysc_node **)val1_p;
     struct lysc_node *val2 = *(struct lysc_node **)val2_p;
@@ -72,9 +72,8 @@
  * @return LY_EEXIST when the whole hash sequence sollides.
  */
 static LY_ERR
-lyb_hash_sequence_check(struct hash_table *ht, struct lysc_node *sibling, int ht_col_id, int compare_col_id)
+lyb_hash_sequence_check(struct hash_table *ht, struct lysc_node *sibling, LYB_HASH ht_col_id, LYB_HASH compare_col_id)
 {
-    int j;
     struct lysc_node **col_node;
 
     /* get the first node inserted with last hash col ID ht_col_id */
@@ -85,7 +84,8 @@
 
     lyht_set_cb(ht, lyb_ptr_equal_cb);
     do {
-        for (j = compare_col_id; j > -1; --j) {
+        int64_t j;
+        for (j = (int64_t)compare_col_id; j > -1; --j) {
             if (lyb_hash(sibling, j) != lyb_hash(*col_node, j)) {
                 /* one non-colliding hash */
                 break;
@@ -117,7 +117,7 @@
     struct hash_table *ht;
     const struct lysc_node *parent;
     const struct lys_module *mod;
-    int i, j;
+    LYB_HASH i;
 
     ht = lyht_new(1, sizeof(struct lysc_node *), lyb_hash_equal_cb, NULL, 1);
     LY_CHECK_ERR_RET(!ht, LOGMEM(sibling->module->ctx), LY_EMEM);
@@ -131,8 +131,9 @@
         /* find the first non-colliding hash (or specifically non-colliding hash sequence) */
         for (i = 0; i < LYB_HASH_BITS; ++i) {
             /* check that we are not colliding with nodes inserted with a lower collision ID than ours */
-            for (j = i - 1; j > -1; --j) {
-                if (lyb_hash_sequence_check(ht, sibling, j, i)) {
+            int64_t j;
+            for (j = (int64_t)i - 1; j > -1; --j) {
+                if (lyb_hash_sequence_check(ht, sibling, (LYB_HASH)j, i)) {
                     break;
                 }
             }
@@ -378,7 +379,7 @@
  * @return LY_ERR value.
  */
 static LY_ERR
-lyb_write_string(const char *str, size_t str_len, int with_length, struct ly_out *out, struct lylyb_ctx *lybctx)
+lyb_write_string(const char *str, size_t str_len, uint8_t with_length, struct ly_out *out, struct lylyb_ctx *lybctx)
 {
     if (!str) {
         str = "";
@@ -413,7 +414,6 @@
 static LY_ERR
 lyb_print_model(struct ly_out *out, const struct lys_module *mod, struct lylyb_ctx *lybctx)
 {
-    int r;
     uint16_t revision;
 
     /* model name length and model name */
@@ -427,7 +427,7 @@
      *                   YYYY YYYM MMMD DDDD */
     revision = 0;
     if (mod && mod->revision) {
-        r = atoi(mod->revision);
+        int r = atoi(mod->revision);
         r -= 2000;
         r <<= 9;
 
@@ -934,7 +934,7 @@
 }
 
 LY_ERR
-lyb_print_data(struct ly_out *out, const struct lyd_node *root, int options)
+lyb_print_data(struct ly_out *out, const struct lyd_node *root, uint32_t options)
 {
     LY_ERR ret = LY_SUCCESS;
     uint8_t zero = 0;
diff --git a/src/printer_schema.c b/src/printer_schema.c
index f59676a..99a947a 100644
--- a/src/printer_schema.c
+++ b/src/printer_schema.c
@@ -25,8 +25,8 @@
 #include "tree_schema.h"
 
 API LY_ERR
-lys_print_module(struct ly_out *out, const struct lys_module *module, LYS_OUTFORMAT format, int UNUSED(line_length),
-        int options)
+lys_print_module(struct ly_out *out, const struct lys_module *module, LYS_OUTFORMAT format, size_t UNUSED(line_length),
+        uint32_t options)
 {
     LY_ERR ret;
 
@@ -82,7 +82,7 @@
 
 API LY_ERR
 lys_print_submodule(struct ly_out *out, const struct lys_module *module, const struct lysp_submodule *submodule,
-        LYS_OUTFORMAT format, int UNUSED(line_length), int options)
+        LYS_OUTFORMAT format, size_t UNUSED(line_length), uint32_t options)
 {
     LY_ERR ret;
 
@@ -116,7 +116,7 @@
 }
 
 static LY_ERR
-lys_print_(struct ly_out *out, const struct lys_module *module, LYS_OUTFORMAT format, int options)
+lys_print_(struct ly_out *out, const struct lys_module *module, LYS_OUTFORMAT format, uint32_t options)
 {
     LY_ERR ret;
 
@@ -129,7 +129,7 @@
 }
 
 API LY_ERR
-lys_print_mem(char **strp, const struct lys_module *module, LYS_OUTFORMAT format, int options)
+lys_print_mem(char **strp, const struct lys_module *module, LYS_OUTFORMAT format, uint32_t options)
 {
     struct ly_out *out;
 
@@ -143,7 +143,7 @@
 }
 
 API LY_ERR
-lys_print_fd(int fd, const struct lys_module *module, LYS_OUTFORMAT format, int options)
+lys_print_fd(int fd, const struct lys_module *module, LYS_OUTFORMAT format, uint32_t options)
 {
     struct ly_out *out;
 
@@ -154,7 +154,7 @@
 }
 
 API LY_ERR
-lys_print_file(FILE *f, const struct lys_module *module, LYS_OUTFORMAT format, int options)
+lys_print_file(FILE *f, const struct lys_module *module, LYS_OUTFORMAT format, uint32_t options)
 {
     struct ly_out *out;
 
@@ -165,7 +165,7 @@
 }
 
 API LY_ERR
-lys_print_path(const char *path, const struct lys_module *module, LYS_OUTFORMAT format, int options)
+lys_print_path(const char *path, const struct lys_module *module, LYS_OUTFORMAT format, uint32_t options)
 {
     struct ly_out *out;
 
@@ -176,7 +176,7 @@
 }
 
 API LY_ERR
-lys_print_clb(ly_write_clb writeclb, void *user_data, const struct lys_module *module, LYS_OUTFORMAT format, int options)
+lys_print_clb(ly_write_clb writeclb, void *user_data, const struct lys_module *module, LYS_OUTFORMAT format, uint32_t options)
 {
     struct ly_out *out;
 
@@ -187,7 +187,7 @@
 }
 
 API LY_ERR
-lys_print_node(struct ly_out *out, const struct lysc_node *node, LYS_OUTFORMAT format, int UNUSED(line_length), int options)
+lys_print_node(struct ly_out *out, const struct lysc_node *node, LYS_OUTFORMAT format, size_t UNUSED(line_length), uint32_t options)
 {
     LY_ERR ret;
 
diff --git a/src/printer_schema.h b/src/printer_schema.h
index 1a7dfc3..c58c37c 100644
--- a/src/printer_schema.h
+++ b/src/printer_schema.h
@@ -71,7 +71,7 @@
  * @param[in] options Schema output options (see @ref schemaprinterflags).
  * @return LY_ERR value.
  */
-LY_ERR lys_print_module(struct ly_out *out, const struct lys_module *module, LYS_OUTFORMAT format, int line_length, int options);
+LY_ERR lys_print_module(struct ly_out *out, const struct lys_module *module, LYS_OUTFORMAT format, size_t line_length, uint32_t options);
 
 /**
  * @brief Schema submodule printer.
@@ -85,7 +85,7 @@
  * @return LY_ERR value.
  */
 LY_ERR lys_print_submodule(struct ly_out *out, const struct lys_module *module, const struct lysp_submodule *submodule,
-        LYS_OUTFORMAT format, int line_length, int options);
+        LYS_OUTFORMAT format, size_t line_length, uint32_t options);
 
 /**
  * @brief Print schema tree in the specified format into a memory block.
@@ -100,7 +100,7 @@
  * @param[in] options Schema output options (see @ref schemaprinterflags).
  * @return LY_ERR value.
  */
-LY_ERR lys_print_mem(char **strp, const struct lys_module *module, LYS_OUTFORMAT format, int options);
+LY_ERR lys_print_mem(char **strp, const struct lys_module *module, LYS_OUTFORMAT format, uint32_t options);
 
 /**
  * @brief Print schema tree in the specified format into a file descriptor.
@@ -114,7 +114,7 @@
  * @param[in] options Schema output options (see @ref schemaprinterflags).
  * @return LY_ERR value.
  */
-LY_ERR lys_print_fd(int fd, const struct lys_module *module, LYS_OUTFORMAT format, int options);
+LY_ERR lys_print_fd(int fd, const struct lys_module *module, LYS_OUTFORMAT format, uint32_t options);
 
 /**
  * @brief Print schema tree in the specified format into a file stream.
@@ -128,7 +128,7 @@
  * @param[in] options Schema output options (see @ref schemaprinterflags).
  * @return LY_ERR value.
  */
-LY_ERR lys_print_file(FILE *f, const struct lys_module *module, LYS_OUTFORMAT format, int options);
+LY_ERR lys_print_file(FILE *f, const struct lys_module *module, LYS_OUTFORMAT format, uint32_t options);
 
 /**
  * @brief Print schema tree in the specified format into a file.
@@ -142,7 +142,7 @@
  * @param[in] options Schema output options (see @ref schemaprinterflags).
  * @return LY_ERR value.
  */
-LY_ERR lys_print_path(const char *path, const struct lys_module *module, LYS_OUTFORMAT format, int options);
+LY_ERR lys_print_path(const char *path, const struct lys_module *module, LYS_OUTFORMAT format, uint32_t options);
 
 /**
  * @brief Print schema tree in the specified format using a provided callback.
@@ -158,7 +158,7 @@
  * @return LY_ERR value.
  */
 LY_ERR lys_print_clb(ly_write_clb writeclb, void *user_data,
-        const struct lys_module *module, LYS_OUTFORMAT format, int options);
+        const struct lys_module *module, LYS_OUTFORMAT format, uint32_t options);
 
 /**
  * @brief Schema node printer.
@@ -170,7 +170,7 @@
  * @param[in] options Schema output options (see @ref schemaprinterflags).
  * @return LY_ERR value.
  */
-LY_ERR lys_print_node(struct ly_out *out, const struct lysc_node *node, LYS_OUTFORMAT format, int line_length, int options);
+LY_ERR lys_print_node(struct ly_out *out, const struct lysc_node *node, LYS_OUTFORMAT format, size_t line_length, uint32_t options);
 
 /** @} schematree */
 
diff --git a/src/printer_xml.c b/src/printer_xml.c
index ad878e7..7ac4a1f 100644
--- a/src/printer_xml.c
+++ b/src/printer_xml.c
@@ -36,12 +36,12 @@
  * @brief XML printer context.
  */
 struct xmlpr_ctx {
-    struct ly_out *out;  /**< output specification */
-    unsigned int level; /**< current indentation level: 0 - no formatting, >= 1 indentation levels */
-    int options;        /**< [Data printer flags](@ref dataprinterflags) */
+    struct ly_out *out;       /**< output specification */
+    uint16_t level;           /**< current indentation level: 0 - no formatting, >= 1 indentation levels */
+    uint32_t options;         /**< [Data printer flags](@ref dataprinterflags) */
     const struct ly_ctx *ctx; /**< libyang context */
-    struct ly_set prefix;   /**< printed namespace prefixes */
-    struct ly_set ns;   /**< printed namespaces */
+    struct ly_set prefix;     /**< printed namespace prefixes */
+    struct ly_set ns;         /**< printed namespaces */
 };
 
 #define LYXML_PREFIX_REQUIRED 0x01  /**< The prefix is not just a suggestion but a requirement. */
@@ -57,11 +57,11 @@
  * @return Printed prefix of the namespace to use.
  */
 static const char *
-xml_print_ns(struct xmlpr_ctx *ctx, const char *ns, const char *new_prefix, int prefix_opts)
+xml_print_ns(struct xmlpr_ctx *ctx, const char *ns, const char *new_prefix, uint32_t prefix_opts)
 {
-    int i;
+    int64_t i;
 
-    for (i = ctx->ns.count - 1; i > -1; --i) {
+    for (i = (int64_t)ctx->ns.count - 1; i > -1; --i) {
         if (!new_prefix) {
             /* find default namespace */
             if (!ctx->prefix.objs[i]) {
@@ -104,7 +104,7 @@
 }
 
 static const char *
-xml_print_ns_opaq(struct xmlpr_ctx *ctx, LYD_FORMAT format, const struct ly_prefix *prefix, int prefix_opts)
+xml_print_ns_opaq(struct xmlpr_ctx *ctx, LYD_FORMAT format, const struct ly_prefix *prefix, uint32_t prefix_opts)
 {
 
     switch (format) {
@@ -141,12 +141,11 @@
     const char **prefs, **nss;
     const char *xml_expr = NULL, *mod_name;
     uint32_t ns_count, i;
-    int rpc_filter = 0;
+    uint8_t rpc_filter = 0;
     char *p;
     size_t len;
 #endif
-    int dynamic;
-    unsigned int u;
+    uint8_t dynamic;
 
     /* with-defaults */
     if (node->schema->nodetype & LYD_NODE_TERM) {
@@ -170,7 +169,7 @@
         const char *value = meta->value.realtype->plugin->print(&meta->value, LY_PREF_XML, &ns_list, &dynamic);
 
         /* print namespaces connected with the value's prefixes */
-        for (u = 0; u < ns_list.count; ++u) {
+        for (uint32_t u = 0; u < ns_list.count; ++u) {
             mod = (const struct lys_module *)ns_list.objs[u];
             xml_print_ns(ctx, mod->ns, mod->prefix, 1);
         }
@@ -290,15 +289,14 @@
 xml_print_term(struct xmlpr_ctx *ctx, const struct lyd_node_term *node)
 {
     struct ly_set ns_list = {0};
-    unsigned int u;
-    int dynamic;
+    uint8_t dynamic;
     const char *value;
 
     xml_print_node_open(ctx, (struct lyd_node *)node);
     value = ((struct lysc_node_leaf *)node->schema)->type->plugin->print(&node->value, LY_PREF_XML, &ns_list, &dynamic);
 
     /* print namespaces connected with the values's prefixes */
-    for (u = 0; u < ns_list.count; ++u) {
+    for (uint32_t u = 0; u < ns_list.count; ++u) {
         const struct lys_module *mod = (const struct lys_module *)ns_list.objs[u];
         ly_print_(ctx->out, " xmlns:%s=\"%s\"", mod->prefix, mod->ns);
     }
@@ -356,7 +354,7 @@
 {
     struct lyd_node_any *any = (struct lyd_node_any *)node;
     struct lyd_node *iter;
-    int prev_opts, prev_lo;
+    uint32_t prev_opts, prev_lo;
     LY_ERR ret;
 
     xml_print_node_open(ctx, (struct lyd_node *)node);
@@ -535,7 +533,7 @@
 }
 
 LY_ERR
-xml_print_data(struct ly_out *out, const struct lyd_node *root, int options)
+xml_print_data(struct ly_out *out, const struct lyd_node *root, uint32_t options)
 {
     const struct lyd_node *node;
     struct xmlpr_ctx ctx = {0};
diff --git a/src/printer_yang.c b/src/printer_yang.c
index 77deb2b..a13b3d8 100644
--- a/src/printer_yang.c
+++ b/src/printer_yang.c
@@ -45,11 +45,11 @@
  * @brief YANG printer context.
  */
 struct ypr_ctx {
-    struct ly_out *out;               /**< output specification */
-    unsigned int level;              /**< current indentation level: 0 - no formatting, >= 1 indentation levels */
+    struct ly_out *out;              /**< output specification */
+    uint16_t level;                  /**< current indentation level: 0 - no formatting, >= 1 indentation levels */
+    uint32_t options;                /**< Schema output options (see @ref schemaprinterflags). */
     const struct lys_module *module; /**< schema to print */
     enum schema_type schema;         /**< type of the schema to print */
-    int options;                     /**< Schema output options (see @ref schemaprinterflags). */
 };
 
 /**
@@ -65,9 +65,9 @@
  * the @p text is printed completely as a NULL-terminated string.
  */
 static void
-ypr_encode(struct ly_out *out, const char *text, int len)
+ypr_encode(struct ly_out *out, const char *text, ssize_t len)
 {
-    int i, start_len;
+    size_t i, start_len;
     const char *start;
     char special = 0;
 
@@ -81,7 +81,7 @@
 
     start = text;
     start_len = 0;
-    for (i = 0; i < len; ++i) {
+    for (i = 0; i < (size_t)len; ++i) {
         switch (text[i]) {
         case '\n':
         case '\t':
@@ -122,7 +122,7 @@
 }
 
 static void
-ypr_open(struct ly_out *out, int *flag)
+ypr_open(struct ly_out *out, uint8_t *flag)
 {
     if (flag && !*flag) {
         *flag = 1;
@@ -131,7 +131,7 @@
 }
 
 static void
-ypr_close(struct ypr_ctx *ctx, int flag)
+ypr_close(struct ypr_ctx *ctx, uint8_t flag)
 {
     if (flag) {
         ly_print_(ctx->out, "%*s}\n", INDENT);
@@ -141,7 +141,7 @@
 }
 
 static void
-ypr_text(struct ypr_ctx *ctx, const char *name, const char *text, int singleline, int closed)
+ypr_text(struct ypr_ctx *ctx, const char *name, const char *text, uint8_t singleline, uint8_t closed)
 {
     const char *s, *t;
 
@@ -219,11 +219,11 @@
  */
 static void
 yprp_extension_instances(struct ypr_ctx *ctx, LYEXT_SUBSTMT substmt, uint8_t substmt_index,
-        struct lysp_ext_instance *ext, int *flag, LY_ARRAY_COUNT_TYPE count)
+        struct lysp_ext_instance *ext, uint8_t *flag, LY_ARRAY_COUNT_TYPE count)
 {
     LY_ARRAY_COUNT_TYPE u;
     struct lysp_stmt *stmt;
-    int child_presence;
+    uint8_t child_presence;
     const char *argument;
 
     if (!count && ext) {
@@ -285,7 +285,7 @@
  */
 static void
 yprc_extension_instances(struct ypr_ctx *ctx, LYEXT_SUBSTMT substmt, uint8_t substmt_index,
-        struct lysc_ext_instance *ext, int *flag, LY_ARRAY_COUNT_TYPE count)
+        struct lysc_ext_instance *ext, uint8_t *flag, LY_ARRAY_COUNT_TYPE count)
 {
     LY_ARRAY_COUNT_TYPE u;
 
@@ -310,7 +310,7 @@
 ypr_substmt(struct ypr_ctx *ctx, LYEXT_SUBSTMT substmt, uint8_t substmt_index, const char *text, void *ext)
 {
     LY_ARRAY_COUNT_TYPE u;
-    int extflag = 0;
+    uint8_t extflag = 0;
 
     if (!text) {
         /* nothing to print */
@@ -340,11 +340,11 @@
 }
 
 static void
-ypr_unsigned(struct ypr_ctx *ctx, LYEXT_SUBSTMT substmt, uint8_t substmt_index, void *exts, unsigned int attr_value, int *flag)
+ypr_unsigned(struct ypr_ctx *ctx, LYEXT_SUBSTMT substmt, uint8_t substmt_index, void *exts, unsigned long int attr_value, uint8_t *flag)
 {
     char *str;
 
-    if (asprintf(&str, "%u", attr_value) == -1) {
+    if (asprintf(&str, "%lu", attr_value) == -1) {
         LOGMEM(ctx->module->ctx);
         return;
     }
@@ -354,11 +354,11 @@
 }
 
 static void
-ypr_signed(struct ypr_ctx *ctx, LYEXT_SUBSTMT substmt, uint8_t substmt_index, void *exts, signed int attr_value, int *flag)
+ypr_signed(struct ypr_ctx *ctx, LYEXT_SUBSTMT substmt, uint8_t substmt_index, void *exts, signed long int attr_value, uint8_t *flag)
 {
     char *str;
 
-    if (asprintf(&str, "%d", attr_value) == -1) {
+    if (asprintf(&str, "%ld", attr_value) == -1) {
         LOGMEM(ctx->module->ctx);
         return;
     }
@@ -384,7 +384,7 @@
 }
 
 static void
-ypr_mandatory(struct ypr_ctx *ctx, uint16_t flags, void *exts, int *flag)
+ypr_mandatory(struct ypr_ctx *ctx, uint16_t flags, void *exts, uint8_t *flag)
 {
     if (flags & LYS_MAND_MASK) {
         ypr_open(ctx->out, flag);
@@ -393,7 +393,7 @@
 }
 
 static void
-ypr_config(struct ypr_ctx *ctx, uint16_t flags, void *exts, int *flag)
+ypr_config(struct ypr_ctx *ctx, uint16_t flags, void *exts, uint8_t *flag)
 {
     if (flags & LYS_CONFIG_MASK) {
         ypr_open(ctx->out, flag);
@@ -402,7 +402,7 @@
 }
 
 static void
-ypr_status(struct ypr_ctx *ctx, uint16_t flags, void *exts, int *flag)
+ypr_status(struct ypr_ctx *ctx, uint16_t flags, void *exts, uint8_t *flag)
 {
     const char *status = NULL;
 
@@ -421,7 +421,7 @@
 }
 
 static void
-ypr_description(struct ypr_ctx *ctx, const char *dsc, void *exts, int *flag)
+ypr_description(struct ypr_ctx *ctx, const char *dsc, void *exts, uint8_t *flag)
 {
     if (dsc) {
         ypr_open(ctx->out, flag);
@@ -430,7 +430,7 @@
 }
 
 static void
-ypr_reference(struct ypr_ctx *ctx, const char *ref, void *exts, int *flag)
+ypr_reference(struct ypr_ctx *ctx, const char *ref, void *exts, uint8_t *flag)
 {
     if (ref) {
         ypr_open(ctx->out, flag);
@@ -439,10 +439,10 @@
 }
 
 static void
-yprp_iffeatures(struct ypr_ctx *ctx, const char **iff, struct lysp_ext_instance *exts, int *flag)
+yprp_iffeatures(struct ypr_ctx *ctx, const char **iff, struct lysp_ext_instance *exts, uint8_t *flag)
 {
     LY_ARRAY_COUNT_TYPE u;
-    int extflag;
+    uint8_t extflag;
 
     LY_ARRAY_FOR(iff, u) {
         ypr_open(ctx->out, flag);
@@ -464,9 +464,9 @@
 }
 
 static void
-yprc_iffeature(struct ypr_ctx *ctx, struct lysc_iffeature *feat, int *index_e, int *index_f)
+yprc_iffeature(struct ypr_ctx *ctx, struct lysc_iffeature *feat, size_t *index_e, size_t *index_f)
 {
-    int brackets_flag = *index_e;
+    uint8_t brackets_flag = *index_e ? 1 : 0;
     uint8_t op;
 
     op = lysc_iff_getop(feat->expr, *index_e);
@@ -507,13 +507,13 @@
 }
 
 static void
-yprc_iffeatures(struct ypr_ctx *ctx, struct lysc_iffeature *iff, struct lysc_ext_instance *exts, int *flag)
+yprc_iffeatures(struct ypr_ctx *ctx, struct lysc_iffeature *iff, struct lysc_ext_instance *exts, uint8_t *flag)
 {
     LY_ARRAY_COUNT_TYPE u, v;
-    int extflag;
+    uint8_t extflag;
 
     LY_ARRAY_FOR(iff, u) {
-        int index_e = 0, index_f = 0;
+        size_t index_e = 0, index_f = 0;
 
         ypr_open(ctx->out, flag);
         extflag = 0;
@@ -538,7 +538,7 @@
 static void
 yprp_extension(struct ypr_ctx *ctx, const struct lysp_ext *ext)
 {
-    int flag = 0, flag2 = 0;
+    uint8_t flag = 0, flag2 = 0;
     LY_ARRAY_COUNT_TYPE u;
 
     ly_print_(ctx->out, "%*sextension %s", INDENT, ext->name);
@@ -578,7 +578,7 @@
 static void
 yprp_feature(struct ypr_ctx *ctx, const struct lysp_feature *feat)
 {
-    int flag = 0;
+    uint8_t flag = 0;
 
     ly_print_(ctx->out, "\n%*sfeature %s", INDENT, feat->name);
     LEVEL++;
@@ -594,7 +594,7 @@
 static void
 yprc_feature(struct ypr_ctx *ctx, const struct lysc_feature *feat)
 {
-    int flag = 0;
+    uint8_t flag = 0;
 
     ly_print_(ctx->out, "\n%*sfeature %s", INDENT, feat->name);
     LEVEL++;
@@ -610,7 +610,7 @@
 static void
 yprp_identity(struct ypr_ctx *ctx, const struct lysp_ident *ident)
 {
-    int flag = 0;
+    uint8_t flag = 0;
     LY_ARRAY_COUNT_TYPE u;
 
     ly_print_(ctx->out, "\n%*sidentity %s", INDENT, ident->name);
@@ -635,7 +635,7 @@
 static void
 yprc_identity(struct ypr_ctx *ctx, const struct lysc_ident *ident)
 {
-    int flag = 0;
+    uint8_t flag = 0;
     LY_ARRAY_COUNT_TYPE u;
 
     ly_print_(ctx->out, "\n%*sidentity %s", INDENT, ident->name);
@@ -662,9 +662,9 @@
 }
 
 static void
-yprp_restr(struct ypr_ctx *ctx, const struct lysp_restr *restr, const char *name, int *flag)
+yprp_restr(struct ypr_ctx *ctx, const struct lysp_restr *restr, const char *name, uint8_t *flag)
 {
-    int inner_flag = 0;
+    uint8_t inner_flag = 0;
 
     if (!restr) {
         return;
@@ -698,9 +698,9 @@
 }
 
 static void
-yprc_must(struct ypr_ctx *ctx, const struct lysc_must *must, int *flag)
+yprc_must(struct ypr_ctx *ctx, const struct lysc_must *must, uint8_t *flag)
 {
-    int inner_flag = 0;
+    uint8_t inner_flag = 0;
 
     ypr_open(ctx->out, flag);
     ly_print_(ctx->out, "%*smust \"", INDENT);
@@ -725,9 +725,9 @@
 }
 
 static void
-yprc_range(struct ypr_ctx *ctx, const struct lysc_range *range, LY_DATA_TYPE basetype, int *flag)
+yprc_range(struct ypr_ctx *ctx, const struct lysc_range *range, LY_DATA_TYPE basetype, uint8_t *flag)
 {
-    int inner_flag = 0;
+    uint8_t inner_flag = 0;
     LY_ARRAY_COUNT_TYPE u;
 
     if (!range) {
@@ -774,9 +774,9 @@
 }
 
 static void
-yprc_pattern(struct ypr_ctx *ctx, const struct lysc_pattern *pattern, int *flag)
+yprc_pattern(struct ypr_ctx *ctx, const struct lysc_pattern *pattern, uint8_t *flag)
 {
-    int inner_flag = 0;
+    uint8_t inner_flag = 0;
 
     ypr_open(ctx->out, flag);
     ly_print_(ctx->out, "%*spattern \"", INDENT);
@@ -806,9 +806,9 @@
 }
 
 static void
-yprp_when(struct ypr_ctx *ctx, struct lysp_when *when, int *flag)
+yprp_when(struct ypr_ctx *ctx, struct lysp_when *when, uint8_t *flag)
 {
-    int inner_flag = 0;
+    uint8_t inner_flag = 0;
 
     if (!when) {
         return;
@@ -828,9 +828,9 @@
 }
 
 static void
-yprc_when(struct ypr_ctx *ctx, struct lysc_when *when, int *flag)
+yprc_when(struct ypr_ctx *ctx, struct lysc_when *when, uint8_t *flag)
 {
-    int inner_flag = 0;
+    uint8_t inner_flag = 0;
 
     if (!when) {
         return;
@@ -850,10 +850,10 @@
 }
 
 static void
-yprp_enum(struct ypr_ctx *ctx, const struct lysp_type_enum *items, LY_DATA_TYPE type, int *flag)
+yprp_enum(struct ypr_ctx *ctx, const struct lysp_type_enum *items, LY_DATA_TYPE type, uint8_t *flag)
 {
     LY_ARRAY_COUNT_TYPE u;
-    int inner_flag;
+    uint8_t inner_flag;
 
     LY_ARRAY_FOR(items, u) {
         ypr_open(ctx->out, flag);
@@ -887,7 +887,7 @@
 yprp_type(struct ypr_ctx *ctx, const struct lysp_type *type)
 {
     LY_ARRAY_COUNT_TYPE u;
-    int flag = 0;
+    uint8_t flag = 0;
 
     ly_print_(ctx->out, "%*stype %s", INDENT, type->name);
     LEVEL++;
@@ -929,7 +929,7 @@
 static void
 yprc_dflt_value(struct ypr_ctx *ctx, const struct lyd_value *value, struct lysc_ext_instance *exts)
 {
-    int dynamic;
+    uint8_t dynamic;
     const char *str;
 
     str = value->realtype->plugin->print(value, LY_PREF_JSON, NULL, &dynamic);
@@ -943,7 +943,7 @@
 yprc_type(struct ypr_ctx *ctx, const struct lysc_type *type)
 {
     LY_ARRAY_COUNT_TYPE u;
-    int flag = 0;
+    uint8_t flag = 0;
 
     ly_print_(ctx->out, "%*stype %s", INDENT, lys_datatype2str(type->basetype));
     LEVEL++;
@@ -982,7 +982,7 @@
         struct lysc_type_bits *bits = (struct lysc_type_bits *)type;
         LY_ARRAY_FOR(bits->bits, u) {
             struct lysc_type_bitenum_item *item = &bits->bits[u];
-            int inner_flag = 0;
+            uint8_t inner_flag = 0;
 
             ypr_open(ctx->out, &flag);
             ly_print_(ctx->out, "%*s%s \"", INDENT, type->basetype == LY_TYPE_BITS ? "bit" : "enum");
@@ -1086,7 +1086,7 @@
 yprp_grouping(struct ypr_ctx *ctx, const struct lysp_grp *grp)
 {
     LY_ARRAY_COUNT_TYPE u;
-    int flag = 0;
+    uint8_t flag = 0;
     struct lysp_node *data;
 
     ly_print_(ctx->out, "\n%*sgrouping %s", INDENT, grp->name);
@@ -1121,7 +1121,7 @@
 }
 
 static void
-yprp_inout(struct ypr_ctx *ctx, const struct lysp_action_inout *inout, int *flag)
+yprp_inout(struct ypr_ctx *ctx, const struct lysp_action_inout *inout, uint8_t *flag)
 {
     LY_ARRAY_COUNT_TYPE u;
     struct lysp_node *data;
@@ -1155,7 +1155,7 @@
 }
 
 static void
-yprc_inout(struct ypr_ctx *ctx, const struct lysc_action *action, const struct lysc_action_inout *inout, int *flag)
+yprc_inout(struct ypr_ctx *ctx, const struct lysc_action *action, const struct lysc_action_inout *inout, uint8_t *flag)
 {
     LY_ARRAY_COUNT_TYPE u;
     struct lysc_node *data;
@@ -1188,7 +1188,7 @@
 yprp_notification(struct ypr_ctx *ctx, const struct lysp_notif *notif)
 {
     LY_ARRAY_COUNT_TYPE u;
-    int flag = 0;
+    uint8_t flag = 0;
     struct lysp_node *data;
 
     ly_print_(ctx->out, "%*snotification %s", INDENT, notif->name);
@@ -1227,7 +1227,7 @@
 yprc_notification(struct ypr_ctx *ctx, const struct lysc_notif *notif)
 {
     LY_ARRAY_COUNT_TYPE u;
-    int flag = 0;
+    uint8_t flag = 0;
     struct lysc_node *data;
 
     ly_print_(ctx->out, "%*snotification %s", INDENT, notif->name);
@@ -1258,7 +1258,7 @@
 yprp_action(struct ypr_ctx *ctx, const struct lysp_action *action)
 {
     LY_ARRAY_COUNT_TYPE u;
-    int flag = 0;
+    uint8_t flag = 0;
 
     ly_print_(ctx->out, "%*s%s %s", INDENT, action->parent ? "action" : "rpc", action->name);
 
@@ -1289,7 +1289,7 @@
 static void
 yprc_action(struct ypr_ctx *ctx, const struct lysc_action *action)
 {
-    int flag = 0;
+    uint8_t flag = 0;
 
     ly_print_(ctx->out, "%*s%s %s", INDENT, action->parent ? "action" : "rpc", action->name);
 
@@ -1308,7 +1308,7 @@
 }
 
 static void
-yprp_node_common1(struct ypr_ctx *ctx, const struct lysp_node *node, int *flag)
+yprp_node_common1(struct ypr_ctx *ctx, const struct lysp_node *node, uint8_t *flag)
 {
     ly_print_(ctx->out, "%*s%s %s%s", INDENT, lys_nodetype2str(node->nodetype), node->name, flag ? "" : " {\n");
     LEVEL++;
@@ -1319,7 +1319,7 @@
 }
 
 static void
-yprc_node_common1(struct ypr_ctx *ctx, const struct lysc_node *node, int *flag)
+yprc_node_common1(struct ypr_ctx *ctx, const struct lysc_node *node, uint8_t *flag)
 {
     LY_ARRAY_COUNT_TYPE u;
 
@@ -1344,13 +1344,13 @@
     ypr_reference(ctx, node->ref, node->exts, flag)
 
 static void
-yprp_node_common2(struct ypr_ctx *ctx, const struct lysp_node *node, int *flag)
+yprp_node_common2(struct ypr_ctx *ctx, const struct lysp_node *node, uint8_t *flag)
 {
     YPR_NODE_COMMON2;
 }
 
 static void
-yprc_node_common2(struct ypr_ctx *ctx, const struct lysc_node *node, int *flag)
+yprc_node_common2(struct ypr_ctx *ctx, const struct lysc_node *node, uint8_t *flag)
 {
     YPR_NODE_COMMON2;
 }
@@ -1361,7 +1361,7 @@
 yprp_container(struct ypr_ctx *ctx, const struct lysp_node *node)
 {
     LY_ARRAY_COUNT_TYPE u;
-    int flag = 0;
+    uint8_t flag = 0;
     struct lysp_node *child;
     struct lysp_node_container *cont = (struct lysp_node_container *)node;
 
@@ -1410,7 +1410,7 @@
 yprc_container(struct ypr_ctx *ctx, const struct lysc_node *node)
 {
     LY_ARRAY_COUNT_TYPE u;
-    int flag = 0;
+    uint8_t flag = 0;
     struct lysc_node *child;
     struct lysc_node_container *cont = (struct lysc_node_container *)node;
 
@@ -1450,7 +1450,7 @@
 static void
 yprp_case(struct ypr_ctx *ctx, const struct lysp_node *node)
 {
-    int flag = 0;
+    uint8_t flag = 0;
     struct lysp_node *child;
     struct lysp_node_case *cas = (struct lysp_node_case *)node;
 
@@ -1469,7 +1469,7 @@
 static void
 yprc_case(struct ypr_ctx *ctx, const struct lysc_node_case *cs)
 {
-    int flag = 0;
+    uint8_t flag = 0;
     struct lysc_node *child;
 
     yprc_node_common1(ctx, (struct lysc_node *)cs, &flag);
@@ -1489,7 +1489,7 @@
 static void
 yprp_choice(struct ypr_ctx *ctx, const struct lysp_node *node)
 {
-    int flag = 0;
+    uint8_t flag = 0;
     struct lysp_node *child;
     struct lysp_node_choice *choice = (struct lysp_node_choice *)node;
 
@@ -1514,7 +1514,7 @@
 static void
 yprc_choice(struct ypr_ctx *ctx, const struct lysc_node *node)
 {
-    int flag = 0;
+    uint8_t flag = 0;
     struct lysc_node_case *cs;
     struct lysc_node_choice *choice = (struct lysc_node_choice *)node;
 
@@ -1663,7 +1663,7 @@
 yprp_list(struct ypr_ctx *ctx, const struct lysp_node *node)
 {
     LY_ARRAY_COUNT_TYPE u;
-    int flag = 0;
+    uint8_t flag = 0;
     struct lysp_node *child;
     struct lysp_node_list *list = (struct lysp_node_list *)node;
 
@@ -1735,7 +1735,7 @@
 yprc_list(struct ypr_ctx *ctx, const struct lysc_node *node)
 {
     LY_ARRAY_COUNT_TYPE u, v;
-    int flag = 0;
+    uint8_t flag = 0;
     struct lysc_node *child;
     struct lysc_node_list *list = (struct lysc_node_list *)node;
 
@@ -1801,7 +1801,7 @@
 yprp_refine(struct ypr_ctx *ctx, struct lysp_refine *refine)
 {
     LY_ARRAY_COUNT_TYPE u;
-    int flag = 0;
+    uint8_t flag = 0;
 
     ly_print_(ctx->out, "%*srefine \"%s\"", INDENT, refine->nodeid);
     LEVEL++;
@@ -1883,7 +1883,7 @@
 yprp_uses(struct ypr_ctx *ctx, const struct lysp_node *node)
 {
     LY_ARRAY_COUNT_TYPE u;
-    int flag = 0;
+    uint8_t flag = 0;
     struct lysp_node_uses *uses = (struct lysp_node_uses *)node;
 
     yprp_node_common1(ctx, node, &flag);
@@ -1907,7 +1907,7 @@
 yprp_anydata(struct ypr_ctx *ctx, const struct lysp_node *node)
 {
     LY_ARRAY_COUNT_TYPE u;
-    int flag = 0;
+    uint8_t flag = 0;
     struct lysp_node_anydata *any = (struct lysp_node_anydata *)node;
 
     yprp_node_common1(ctx, node, &flag);
@@ -1927,7 +1927,7 @@
 yprc_anydata(struct ypr_ctx *ctx, const struct lysc_node *node)
 {
     LY_ARRAY_COUNT_TYPE u;
-    int flag = 0;
+    uint8_t flag = 0;
     struct lysc_node_anydata *any = (struct lysc_node_anydata *)node;
 
     yprc_node_common1(ctx, node, &flag);
@@ -2199,7 +2199,7 @@
 }
 
 LY_ERR
-yang_print_parsed_module(struct ly_out *out, const struct lys_module *module, const struct lysp_module *modp, int options)
+yang_print_parsed_module(struct ly_out *out, const struct lys_module *module, const struct lysp_module *modp, uint32_t options)
 {
     LY_ARRAY_COUNT_TYPE u;
     struct ypr_ctx ctx_ = {.out = out, .level = 0, .module = module, .schema = YPR_PARSED, .options = options | LYD_PRINT_FORMAT}, *ctx = &ctx_;
@@ -2256,7 +2256,7 @@
 }
 
 LY_ERR
-yang_print_parsed_submodule(struct ly_out *out, const struct lys_module *module, const struct lysp_submodule *submodp, int options)
+yang_print_parsed_submodule(struct ly_out *out, const struct lys_module *module, const struct lysp_submodule *submodp, uint32_t options)
 {
     LY_ARRAY_COUNT_TYPE u;
     struct ypr_ctx ctx_ = {.out = out, .level = 0, .module = module, .schema = YPR_PARSED, .options = options | LYD_PRINT_FORMAT}, *ctx = &ctx_;
@@ -2301,7 +2301,7 @@
 }
 
 LY_ERR
-yang_print_compiled_node(struct ly_out *out, const struct lysc_node *node, int options)
+yang_print_compiled_node(struct ly_out *out, const struct lysc_node *node, uint32_t options)
 {
     struct ypr_ctx ctx_ = {.out = out, .level = 0, .module = node->module, .options = options | LYD_PRINT_FORMAT}, *ctx = &ctx_;
 
@@ -2312,7 +2312,7 @@
 }
 
 LY_ERR
-yang_print_compiled(struct ly_out *out, const struct lys_module *module, int options)
+yang_print_compiled(struct ly_out *out, const struct lys_module *module, uint32_t options)
 {
     LY_ARRAY_COUNT_TYPE u;
     struct lysc_node *data;
diff --git a/src/printer_yin.c b/src/printer_yin.c
index bef314a..7a42cb0 100644
--- a/src/printer_yin.c
+++ b/src/printer_yin.c
@@ -33,17 +33,17 @@
  * @brief YIN printer context.
  */
 struct ypr_ctx {
-    struct ly_out *out;               /**< output specification */
-    unsigned int level;              /**< current indentation level: 0 - no formatting, >= 1 indentation levels */
+    struct ly_out *out;              /**< output specification */
+    uint16_t level;                  /**< current indentation level: 0 - no formatting, >= 1 indentation levels */
+    uint32_t options;                /**< Schema output options (see @ref schemaprinterflags). */
     const struct lys_module *module; /**< schema to print */
-    int options;                     /**< Schema output options (see @ref schemaprinterflags). */
 };
 
 static void yprp_extension_instances(struct ypr_ctx *ctx, LYEXT_SUBSTMT substmt, uint8_t substmt_index,
-        struct lysp_ext_instance *ext, int *flag, LY_ARRAY_COUNT_TYPE count);
+        struct lysp_ext_instance *ext, int8_t *flag, LY_ARRAY_COUNT_TYPE count);
 
 static void
-ypr_open(struct ypr_ctx *ctx, const char *elem_name, const char *attr_name, const char *attr_value, int flag)
+ypr_open(struct ypr_ctx *ctx, const char *elem_name, const char *attr_name, const char *attr_value, int8_t flag)
 {
     ly_print_(ctx->out, "%*s<%s", INDENT, elem_name);
 
@@ -57,7 +57,7 @@
 }
 
 static void
-ypr_close(struct ypr_ctx *ctx, const char *elem_name, int flag)
+ypr_close(struct ypr_ctx *ctx, const char *elem_name, int8_t flag)
 {
     if (flag) {
         ly_print_(ctx->out, "%*s</%s>\n", INDENT, elem_name);
@@ -72,7 +72,7 @@
  * 1 or NULL - parent already closed, do nothing
  */
 static void
-ypr_close_parent(struct ypr_ctx *ctx, int *par_close_flag)
+ypr_close_parent(struct ypr_ctx *ctx, int8_t *par_close_flag)
 {
     if (par_close_flag && !(*par_close_flag)) {
         (*par_close_flag) = 1;
@@ -92,7 +92,7 @@
 ypr_substmt(struct ypr_ctx *ctx, LYEXT_SUBSTMT substmt, uint8_t substmt_index, const char *text, void *ext)
 {
     LY_ARRAY_COUNT_TYPE u;
-    int extflag = 0;
+    int8_t extflag = 0;
 
     if (!text) {
         /* nothing to print */
@@ -124,10 +124,10 @@
 }
 
 static void
-ypr_unsigned(struct ypr_ctx *ctx, LYEXT_SUBSTMT substmt, uint8_t substmt_index, void *exts, unsigned int attr_value)
+ypr_unsigned(struct ypr_ctx *ctx, LYEXT_SUBSTMT substmt, uint8_t substmt_index, void *exts, unsigned long int attr_value)
 {
     char *str;
-    if (asprintf(&str, "%u", attr_value) == -1) {
+    if (asprintf(&str, "%lu", attr_value) == -1) {
         LOGMEM(ctx->module->ctx);
         return;
     }
@@ -136,11 +136,11 @@
 }
 
 static void
-ypr_signed(struct ypr_ctx *ctx, LYEXT_SUBSTMT substmt, uint8_t substmt_index, void *exts, signed int attr_value)
+ypr_signed(struct ypr_ctx *ctx, LYEXT_SUBSTMT substmt, uint8_t substmt_index, void *exts, signed long int attr_value)
 {
     char *str;
 
-    if (asprintf(&str, "%d", attr_value) == -1) {
+    if (asprintf(&str, "%ld", attr_value) == -1) {
         LOGMEM(ctx->module->ctx);
         return;
     }
@@ -165,7 +165,7 @@
 }
 
 static void
-ypr_mandatory(struct ypr_ctx *ctx, uint16_t flags, void *exts, int *flag)
+ypr_mandatory(struct ypr_ctx *ctx, uint16_t flags, void *exts, int8_t *flag)
 {
     if (flags & LYS_MAND_MASK) {
         ypr_close_parent(ctx, flag);
@@ -174,7 +174,7 @@
 }
 
 static void
-ypr_config(struct ypr_ctx *ctx, uint16_t flags, void *exts, int *flag)
+ypr_config(struct ypr_ctx *ctx, uint16_t flags, void *exts, int8_t *flag)
 {
     if (flags & LYS_CONFIG_MASK) {
         ypr_close_parent(ctx, flag);
@@ -183,7 +183,7 @@
 }
 
 static void
-ypr_status(struct ypr_ctx *ctx, uint16_t flags, void *exts, int *flag)
+ypr_status(struct ypr_ctx *ctx, uint16_t flags, void *exts, int8_t *flag)
 {
     const char *status = NULL;
 
@@ -202,7 +202,7 @@
 }
 
 static void
-ypr_description(struct ypr_ctx *ctx, const char *dsc, void *exts, int *flag)
+ypr_description(struct ypr_ctx *ctx, const char *dsc, void *exts, int8_t *flag)
 {
     if (dsc) {
         ypr_close_parent(ctx, flag);
@@ -211,7 +211,7 @@
 }
 
 static void
-ypr_reference(struct ypr_ctx *ctx, const char *ref, void *exts, int *flag)
+ypr_reference(struct ypr_ctx *ctx, const char *ref, void *exts, int8_t *flag)
 {
     if (ref) {
         ypr_close_parent(ctx, flag);
@@ -220,10 +220,10 @@
 }
 
 static void
-yprp_iffeatures(struct ypr_ctx *ctx, const char **iff, struct lysp_ext_instance *exts, int *flag)
+yprp_iffeatures(struct ypr_ctx *ctx, const char **iff, struct lysp_ext_instance *exts, int8_t *flag)
 {
     LY_ARRAY_COUNT_TYPE u;
-    int extflag;
+    int8_t extflag;
 
     LY_ARRAY_FOR(iff, u) {
         ypr_close_parent(ctx, flag);
@@ -247,7 +247,7 @@
 static void
 yprp_extension(struct ypr_ctx *ctx, const struct lysp_ext *ext)
 {
-    int flag = 0, flag2 = 0;
+    int8_t flag = 0, flag2 = 0;
     LY_ARRAY_COUNT_TYPE u;
 
     ypr_open(ctx, "extension", "name", ext->name, flag);
@@ -290,7 +290,7 @@
 static void
 yprp_feature(struct ypr_ctx *ctx, const struct lysp_feature *feat)
 {
-    int flag = 0;
+    int8_t flag = 0;
 
     ypr_open(ctx, "feature", "name", feat->name, flag);
     LEVEL++;
@@ -306,7 +306,7 @@
 static void
 yprp_identity(struct ypr_ctx *ctx, const struct lysp_ident *ident)
 {
-    int flag = 0;
+    int8_t flag = 0;
     LY_ARRAY_COUNT_TYPE u;
 
     ypr_open(ctx, "identity", "name", ident->name, flag);
@@ -329,10 +329,10 @@
 }
 
 static void
-yprp_restr(struct ypr_ctx *ctx, const struct lysp_restr *restr, const char *name, const char *attr, int *flag)
+yprp_restr(struct ypr_ctx *ctx, const struct lysp_restr *restr, const char *name, const char *attr, int8_t *flag)
 {
     (void)flag;
-    int inner_flag = 0;
+    int8_t inner_flag = 0;
 
     if (!restr) {
         return;
@@ -365,9 +365,9 @@
 }
 
 static void
-yprp_when(struct ypr_ctx *ctx, struct lysp_when *when, int *flag)
+yprp_when(struct ypr_ctx *ctx, struct lysp_when *when, int8_t *flag)
 {
-    int inner_flag = 0;
+    int8_t inner_flag = 0;
     (void)flag;
 
     if (!when) {
@@ -387,10 +387,10 @@
 }
 
 static void
-yprp_enum(struct ypr_ctx *ctx, const struct lysp_type_enum *items, LY_DATA_TYPE type, int *flag)
+yprp_enum(struct ypr_ctx *ctx, const struct lysp_type_enum *items, LY_DATA_TYPE type, int8_t *flag)
 {
     LY_ARRAY_COUNT_TYPE u;
-    int inner_flag;
+    int8_t inner_flag;
     (void)flag;
 
     LY_ARRAY_FOR(items, u) {
@@ -428,7 +428,7 @@
 yprp_type(struct ypr_ctx *ctx, const struct lysp_type *type)
 {
     LY_ARRAY_COUNT_TYPE u;
-    int flag = 0;
+    int8_t flag = 0;
 
     if (!ctx || !type) {
         return;
@@ -507,7 +507,7 @@
 yprp_grouping(struct ypr_ctx *ctx, const struct lysp_grp *grp)
 {
     LY_ARRAY_COUNT_TYPE u;
-    int flag = 0;
+    int8_t flag = 0;
     struct lysp_node *data;
 
     ypr_open(ctx, "grouping", "name", grp->name, flag);
@@ -543,7 +543,7 @@
 }
 
 static void
-yprp_inout(struct ypr_ctx *ctx, const struct lysp_action_inout *inout, int *flag)
+yprp_inout(struct ypr_ctx *ctx, const struct lysp_action_inout *inout, int8_t *flag)
 {
     LY_ARRAY_COUNT_TYPE u;
     struct lysp_node *data;
@@ -580,7 +580,7 @@
 yprp_notification(struct ypr_ctx *ctx, const struct lysp_notif *notif)
 {
     LY_ARRAY_COUNT_TYPE u;
-    int flag = 0;
+    int8_t flag = 0;
     struct lysp_node *data;
 
     ypr_open(ctx, "notification", "name", notif->name, flag);
@@ -620,7 +620,7 @@
 yprp_action(struct ypr_ctx *ctx, const struct lysp_action *action)
 {
     LY_ARRAY_COUNT_TYPE u;
-    int flag = 0;
+    int8_t flag = 0;
 
     ypr_open(ctx, action->parent ? "action" : "rpc", "name", action->name, flag);
 
@@ -649,7 +649,7 @@
 }
 
 static void
-yprp_node_common1(struct ypr_ctx *ctx, const struct lysp_node *node, int *flag)
+yprp_node_common1(struct ypr_ctx *ctx, const struct lysp_node *node, int8_t *flag)
 {
     ypr_open(ctx, lys_nodetype2str(node->nodetype), "name", node->name, *flag);
     LEVEL++;
@@ -660,7 +660,7 @@
 }
 
 static void
-yprp_node_common2(struct ypr_ctx *ctx, const struct lysp_node *node, int *flag)
+yprp_node_common2(struct ypr_ctx *ctx, const struct lysp_node *node, int8_t *flag)
 {
     ypr_config(ctx, node->flags, node->exts, flag);
     if (node->nodetype & (LYS_CHOICE | LYS_LEAF | LYS_ANYDATA)) {
@@ -675,7 +675,7 @@
 yprp_container(struct ypr_ctx *ctx, const struct lysp_node *node)
 {
     LY_ARRAY_COUNT_TYPE u;
-    int flag = 0;
+    int8_t flag = 0;
     struct lysp_node *child;
     struct lysp_node_container *cont = (struct lysp_node_container *)node;
 
@@ -724,7 +724,7 @@
 static void
 yprp_case(struct ypr_ctx *ctx, const struct lysp_node *node)
 {
-    int flag = 0;
+    int8_t flag = 0;
     struct lysp_node *child;
     struct lysp_node_case *cas = (struct lysp_node_case *)node;
 
@@ -743,7 +743,7 @@
 static void
 yprp_choice(struct ypr_ctx *ctx, const struct lysp_node *node)
 {
-    int flag = 0;
+    int8_t flag = 0;
     struct lysp_node *child;
     struct lysp_node_choice *choice = (struct lysp_node_choice *)node;
 
@@ -771,7 +771,7 @@
     LY_ARRAY_COUNT_TYPE u;
     struct lysp_node_leaf *leaf = (struct lysp_node_leaf *)node;
 
-    int flag = 1;
+    int8_t flag = 1;
     yprp_node_common1(ctx, node, &flag);
 
     yprp_type(ctx, &leaf->type);
@@ -792,7 +792,7 @@
 {
     LY_ARRAY_COUNT_TYPE u;
     struct lysp_node_leaflist *llist = (struct lysp_node_leaflist *)node;
-    int flag = 1;
+    int8_t flag = 1;
 
     yprp_node_common1(ctx, node, &flag);
 
@@ -834,7 +834,7 @@
 yprp_list(struct ypr_ctx *ctx, const struct lysp_node *node)
 {
     LY_ARRAY_COUNT_TYPE u;
-    int flag = 0;
+    int8_t flag = 0;
     struct lysp_node *child;
     struct lysp_node_list *list = (struct lysp_node_list *)node;
 
@@ -908,7 +908,7 @@
 yprp_refine(struct ypr_ctx *ctx, struct lysp_refine *refine)
 {
     LY_ARRAY_COUNT_TYPE u;
-    int flag = 0;
+    int8_t flag = 0;
 
     ypr_open(ctx, "refine", "target-node", refine->nodeid, flag);
     LEVEL++;
@@ -990,7 +990,7 @@
 yprp_uses(struct ypr_ctx *ctx, const struct lysp_node *node)
 {
     LY_ARRAY_COUNT_TYPE u;
-    int flag = 0;
+    int8_t flag = 0;
     struct lysp_node_uses *uses = (struct lysp_node_uses *)node;
 
     yprp_node_common1(ctx, node, &flag);
@@ -1014,7 +1014,7 @@
 yprp_anydata(struct ypr_ctx *ctx, const struct lysp_node *node)
 {
     LY_ARRAY_COUNT_TYPE u;
-    int flag = 0;
+    int8_t flag = 0;
     struct lysp_node_anydata *any = (struct lysp_node_anydata *)node;
 
     yprp_node_common1(ctx, node, &flag);
@@ -1170,14 +1170,14 @@
 }
 
 static void
-ypr_xmlns(struct ypr_ctx *ctx, const struct lys_module *module, unsigned int indent)
+ypr_xmlns(struct ypr_ctx *ctx, const struct lys_module *module, uint16_t indent)
 {
     ly_print_(ctx->out, "%*sxmlns=\"%s\"", indent + INDENT, YIN_NS_URI);
     ly_print_(ctx->out, "\n%*sxmlns:%s=\"%s\"", indent + INDENT, module->prefix, module->ns);
 }
 
 static void
-ypr_import_xmlns(struct ypr_ctx *ctx, const struct lysp_module *modp, unsigned int indent)
+ypr_import_xmlns(struct ypr_ctx *ctx, const struct lysp_module *modp, uint16_t indent)
 {
     LY_ARRAY_COUNT_TYPE u;
 
@@ -1268,7 +1268,7 @@
 yprp_stmt(struct ypr_ctx *ctx, struct lysp_stmt *stmt)
 {
     struct lysp_stmt *childstmt;
-    int flag = stmt->child ? 1 : -1;
+    int8_t flag = stmt->child ? 1 : -1;
 
     /* TODO:
              the extension instance substatements in extension instances (LY_STMT_EXTENSION_INSTANCE)
@@ -1298,13 +1298,14 @@
  */
 static void
 yprp_extension_instances(struct ypr_ctx *ctx, LYEXT_SUBSTMT substmt, uint8_t substmt_index,
-        struct lysp_ext_instance *ext, int *flag, LY_ARRAY_COUNT_TYPE count)
+        struct lysp_ext_instance *ext, int8_t *flag, LY_ARRAY_COUNT_TYPE count)
 {
     LY_ARRAY_COUNT_TYPE u;
     char *str;
     struct lysp_stmt *stmt;
     const char *argument;
     const char *ext_argument;
+    int8_t inner_flag = 0;
 
     if (!count && ext) {
         count = LY_ARRAY_COUNT(ext);
@@ -1325,7 +1326,7 @@
         }
 
         ypr_close_parent(ctx, flag);
-        int inner_flag = 0;
+        inner_flag = 0;
         argument = NULL;
         ext_argument = NULL;
 
@@ -1451,7 +1452,7 @@
 }
 
 LY_ERR
-yin_print_parsed_module(struct ly_out *out, const struct lys_module *module, const struct lysp_module *modp, int options)
+yin_print_parsed_module(struct ly_out *out, const struct lys_module *module, const struct lysp_module *modp, uint32_t options)
 {
     LY_ARRAY_COUNT_TYPE u;
     struct ypr_ctx ctx_ = {.out = out, .level = 0, .module = module, .options = options | LYD_PRINT_FORMAT}, *ctx = &ctx_;
@@ -1513,7 +1514,7 @@
 }
 
 LY_ERR
-yin_print_parsed_submodule(struct ly_out *out, const struct lys_module *module, const struct lysp_submodule *submodp, int options)
+yin_print_parsed_submodule(struct ly_out *out, const struct lys_module *module, const struct lysp_submodule *submodp, uint32_t options)
 {
     LY_ARRAY_COUNT_TYPE u;
     struct ypr_ctx ctx_ = {.out = out, .level = 0, .module = module, .options = options | LYD_PRINT_FORMAT}, *ctx = &ctx_;
diff --git a/src/set.c b/src/set.c
index 931e4e7..6c82710 100644
--- a/src/set.c
+++ b/src/set.c
@@ -118,7 +118,7 @@
 }
 
 API int
-ly_set_add(struct ly_set *set, void *object, int options)
+ly_set_add(struct ly_set *set, void *object, uint32_t options)
 {
     uint32_t i;
     void **new;
@@ -148,7 +148,7 @@
 }
 
 API int
-ly_set_merge(struct ly_set *trg, struct ly_set *src, int options, void *(*duplicator)(void *obj))
+ly_set_merge(struct ly_set *trg, struct ly_set *src, uint32_t options, void *(*duplicator)(void *obj))
 {
     uint32_t u, c, ret = 0;
     int i;
diff --git a/src/set.h b/src/set.h
index 1074e1f..1afec5a 100644
--- a/src/set.h
+++ b/src/set.h
@@ -91,7 +91,7 @@
  * - #LY_SET_OPT_USEASLIST - do not check for duplicities
  * @return -1 on failure, index of the \p node in the set on success
  */
-int ly_set_add(struct ly_set *set, void *object, int options);
+int ly_set_add(struct ly_set *set, void *object, uint32_t options);
 
 /**
  * @brief Add all objects from \p src to \p trg.
@@ -107,7 +107,7 @@
  * objects as the \p src set.
  * @return -1 on failure, number of objects added into \p trg on success.
  */
-int ly_set_merge(struct ly_set *trg, struct ly_set *src, int options, void *(*duplicator)(void *obj));
+int ly_set_merge(struct ly_set *trg, struct ly_set *src, uint32_t options, void *(*duplicator)(void *obj));
 
 /**
  * @brief Learn whether the set contains the specified object.
diff --git a/src/tree_data.c b/src/tree_data.c
index e2b6efb..a4c4903 100644
--- a/src/tree_data.c
+++ b/src/tree_data.c
@@ -54,14 +54,14 @@
         struct lyd_node **match);
 
 LY_ERR
-lyd_value_parse(struct lyd_node_term *node, const char *value, size_t value_len, int *dynamic, int second, int value_hint,
-        LY_PREFIX_FORMAT format, void *prefix_data, const struct lyd_node *tree)
+lyd_value_parse(struct lyd_node_term *node, const char *value, size_t value_len, uint8_t *dynamic, uint8_t second,
+        uint32_t value_hint, LY_PREFIX_FORMAT format, void *prefix_data, const struct lyd_node *tree)
 {
     LY_ERR ret = LY_SUCCESS;
     struct ly_err_item *err = NULL;
     struct ly_ctx *ctx;
     struct lysc_type *type;
-    int options = value_hint | (second ? LY_TYPE_OPTS_SECOND_CALL : 0) |
+    uint32_t options = value_hint | (second ? LY_TYPE_OPTS_SECOND_CALL : 0) |
             (dynamic && *dynamic ? LY_TYPE_OPTS_DYNAMIC : 0) | (tree ? 0 : LY_TYPE_OPTS_INCOMPLETE_DATA);
     assert(node);
 
@@ -91,14 +91,14 @@
 
 /* similar to lyd_value_parse except can be used just to store the value, hence also does not support a second call */
 LY_ERR
-lyd_value_store(struct lyd_value *val, const struct lysc_node *schema, const char *value, size_t value_len, int *dynamic,
+lyd_value_store(struct lyd_value *val, const struct lysc_node *schema, const char *value, size_t value_len, uint8_t *dynamic,
         LY_PREFIX_FORMAT format, void *prefix_data)
 {
     LY_ERR ret = LY_SUCCESS;
     struct ly_err_item *err = NULL;
     struct ly_ctx *ctx;
     struct lysc_type *type;
-    int options = LY_TYPE_OPTS_INCOMPLETE_DATA | (dynamic && *dynamic ? LY_TYPE_OPTS_DYNAMIC : 0);
+    uint32_t options = LY_TYPE_OPTS_INCOMPLETE_DATA | (dynamic && *dynamic ? LY_TYPE_OPTS_DYNAMIC : 0);
 
     assert(val && schema && (schema->nodetype & LYD_NODE_TERM));
 
@@ -122,14 +122,14 @@
 }
 
 LY_ERR
-lyd_value_parse_meta(const struct ly_ctx *ctx, struct lyd_meta *meta, const char *value, size_t value_len, int *dynamic,
-        int second, int value_hint, LY_PREFIX_FORMAT format, void *prefix_data, const struct lysc_node *ctx_snode,
+lyd_value_parse_meta(const struct ly_ctx *ctx, struct lyd_meta *meta, const char *value, size_t value_len, uint8_t *dynamic,
+        uint8_t second, uint32_t value_hint, LY_PREFIX_FORMAT format, void *prefix_data, const struct lysc_node *ctx_snode,
         const struct lyd_node *tree)
 {
     LY_ERR ret = LY_SUCCESS;
     struct ly_err_item *err = NULL;
     struct lyext_metadata *ant;
-    int options = value_hint | (second ? LY_TYPE_OPTS_SECOND_CALL : 0) |
+    uint32_t options = value_hint | (second ? LY_TYPE_OPTS_SECOND_CALL : 0) |
             (dynamic && *dynamic ? LY_TYPE_OPTS_DYNAMIC : 0) | (tree ? 0 : LY_TYPE_OPTS_INCOMPLETE_DATA);
 
     assert(ctx && meta && ((tree && meta->parent) || ctx_snode));
@@ -205,7 +205,7 @@
     struct ly_err_item *err = NULL;
     struct lysc_type *type;
     struct lyd_value val = {0};
-    int options = (tree ? 0 : LY_TYPE_OPTS_INCOMPLETE_DATA);
+    uint32_t options = (tree ? 0 : LY_TYPE_OPTS_INCOMPLETE_DATA);
 
     LY_CHECK_ARG_RET(ctx, node, value, LY_EINVAL);
 
@@ -241,7 +241,7 @@
     struct ly_ctx *ctx;
     struct lysc_type *type;
     struct lyd_value data = {0};
-    int options = (tree ? 0 : LY_TYPE_OPTS_INCOMPLETE_DATA);
+    uint32_t options = (tree ? 0 : LY_TYPE_OPTS_INCOMPLETE_DATA);
 
     LY_CHECK_ARG_RET(node ? node->schema->module->ctx : NULL, node, value, LY_EINVAL);
 
@@ -298,7 +298,7 @@
 }
 
 API LY_ERR
-lyd_parse_data(const struct ly_ctx *ctx, struct ly_in *in, LYD_FORMAT format, int parse_options, int validate_options,
+lyd_parse_data(const struct ly_ctx *ctx, struct ly_in *in, LYD_FORMAT format, uint32_t parse_options, uint32_t validate_options,
         struct lyd_node **tree)
 {
     LY_ERR ret = LY_SUCCESS;
@@ -392,7 +392,7 @@
 }
 
 API LY_ERR
-lyd_parse_data_mem(const struct ly_ctx *ctx, const char *data, LYD_FORMAT format, int parse_options, int validate_options,
+lyd_parse_data_mem(const struct ly_ctx *ctx, const char *data, LYD_FORMAT format, uint32_t parse_options, uint32_t validate_options,
         struct lyd_node **tree)
 {
     LY_ERR ret;
@@ -406,7 +406,7 @@
 }
 
 API LY_ERR
-lyd_parse_data_fd(const struct ly_ctx *ctx, int fd, LYD_FORMAT format, int parse_options, int validate_options,
+lyd_parse_data_fd(const struct ly_ctx *ctx, int fd, LYD_FORMAT format, uint32_t parse_options, uint32_t validate_options,
         struct lyd_node **tree)
 {
     LY_ERR ret;
@@ -420,8 +420,8 @@
 }
 
 API LY_ERR
-lyd_parse_data_path(const struct ly_ctx *ctx, const char *path, LYD_FORMAT format, int parse_options,
-        int validate_options, struct lyd_node **tree)
+lyd_parse_data_path(const struct ly_ctx *ctx, const char *path, LYD_FORMAT format, uint32_t parse_options,
+        uint32_t validate_options, struct lyd_node **tree)
 {
     LY_ERR ret;
     struct ly_in *in;
@@ -533,7 +533,7 @@
 }
 
 LY_ERR
-lyd_create_term(const struct lysc_node *schema, const char *value, size_t value_len, int *dynamic, int value_hint,
+lyd_create_term(const struct lysc_node *schema, const char *value, size_t value_len, uint8_t *dynamic, uint32_t value_hint,
         LY_PREFIX_FORMAT format, void *prefix_data, struct lyd_node **node)
 {
     LY_ERR ret;
@@ -693,7 +693,7 @@
 
 LY_ERR
 lyd_create_opaq(const struct ly_ctx *ctx, const char *name, size_t name_len, const char *value, size_t value_len,
-        int *dynamic, int value_hint, LYD_FORMAT format, struct ly_prefix *val_prefs, const char *prefix, size_t pref_len,
+        uint8_t *dynamic, uint32_t value_hint, LYD_FORMAT format, struct ly_prefix *val_prefs, const char *prefix, size_t pref_len,
         const char *module_key, size_t module_key_len, struct lyd_node **node)
 {
     struct lyd_node_opaq *opaq;
@@ -1087,7 +1087,7 @@
     struct lyd_node_term *t;
     struct lyd_node *parent;
     struct lyd_value val = {0};
-    int dflt_change, val_change;
+    uint8_t dflt_change, val_change;
 
     LY_CHECK_ARG_RET(NULL, term, term->schema, term->schema->nodetype & LYD_NODE_TERM, LY_EINVAL);
 
@@ -1163,7 +1163,7 @@
     LY_ERR ret = LY_SUCCESS;
     struct lyd_meta *m2;
     struct lyd_value val;
-    int val_change;
+    uint8_t val_change;
 
     LY_CHECK_ARG_RET(NULL, meta, LY_EINVAL);
 
@@ -1197,7 +1197,7 @@
 }
 
 API LY_ERR
-lyd_new_path(struct lyd_node *parent, const struct ly_ctx *ctx, const char *path, const char *value, int options,
+lyd_new_path(struct lyd_node *parent, const struct ly_ctx *ctx, const char *path, const char *value, uint32_t options,
         struct lyd_node **node)
 {
     return lyd_new_path2(parent, ctx, path, value, 0, options, node, NULL);
@@ -1205,7 +1205,7 @@
 
 API LY_ERR
 lyd_new_path2(struct lyd_node *parent, const struct ly_ctx *ctx, const char *path, const void *value,
-        LYD_ANYDATA_VALUETYPE value_type, int options, struct lyd_node **new_parent, struct lyd_node **new_node)
+        LYD_ANYDATA_VALUETYPE value_type, uint32_t options, struct lyd_node **new_parent, struct lyd_node **new_node)
 {
     LY_ERR ret = LY_SUCCESS, r;
     struct lyxp_expr *exp = NULL;
@@ -1381,7 +1381,7 @@
 
 LY_ERR
 lyd_new_implicit_r(struct lyd_node *parent, struct lyd_node **first, const struct lysc_node *sparent,
-        const struct lys_module *mod, struct ly_set *node_types, struct ly_set *node_when, int impl_opts,
+        const struct lys_module *mod, struct ly_set *node_types, struct ly_set *node_when, uint32_t impl_opts,
         struct lyd_node **diff)
 {
     LY_ERR ret;
@@ -1491,7 +1491,7 @@
 }
 
 API LY_ERR
-lyd_new_implicit_tree(struct lyd_node *tree, int implicit_options, struct lyd_node **diff)
+lyd_new_implicit_tree(struct lyd_node *tree, uint32_t implicit_options, struct lyd_node **diff)
 {
     struct lyd_node *node;
     LY_ERR ret = LY_SUCCESS;
@@ -1521,7 +1521,7 @@
 }
 
 API LY_ERR
-lyd_new_implicit_all(struct lyd_node **tree, const struct ly_ctx *ctx, int implicit_options, struct lyd_node **diff)
+lyd_new_implicit_all(struct lyd_node **tree, const struct ly_ctx *ctx, uint32_t implicit_options, struct lyd_node **diff)
 {
     const struct lys_module *mod;
     struct lyd_node *d = NULL;
@@ -1560,7 +1560,7 @@
 }
 
 API LY_ERR
-lyd_new_implicit_module(struct lyd_node **tree, const struct lys_module *module, int implicit_options, struct lyd_node **diff)
+lyd_new_implicit_module(struct lyd_node **tree, const struct lys_module *module, uint32_t implicit_options, struct lyd_node **diff)
 {
     struct lyd_node *root, *d = NULL;
     LY_ERR ret = LY_SUCCESS;
@@ -1601,7 +1601,7 @@
 {
     const struct lysc_node *schema, *sparent;
     struct lyd_node *match = NULL;
-    int found;
+    uint8_t found;
 
     assert(new_node);
 
@@ -2118,7 +2118,7 @@
 
 LY_ERR
 lyd_create_meta(struct lyd_node *parent, struct lyd_meta **meta, const struct lys_module *mod, const char *name,
-        size_t name_len, const char *value, size_t value_len, int *dynamic, int value_hint, LY_PREFIX_FORMAT format,
+        size_t name_len, const char *value, size_t value_len, uint8_t *dynamic, uint32_t value_hint, LY_PREFIX_FORMAT format,
         void *prefix_data, const struct lysc_node *ctx_snode)
 {
     LY_ERR ret;
@@ -2196,7 +2196,7 @@
 
 LY_ERR
 lyd_create_attr(struct lyd_node *parent, struct lyd_attr **attr, const struct ly_ctx *ctx, const char *name,
-        size_t name_len, const char *value, size_t value_len, int *dynamic, int value_hint, LYD_FORMAT format,
+        size_t name_len, const char *value, size_t value_len, uint8_t *dynamic, uint32_t value_hint, LYD_FORMAT format,
         struct ly_prefix *val_prefs, const char *prefix, size_t prefix_len, const char *module_key, size_t module_key_len)
 {
     struct lyd_attr *at, *last;
@@ -2256,7 +2256,7 @@
 }
 
 API LY_ERR
-lyd_compare_single(const struct lyd_node *node1, const struct lyd_node *node2, int options)
+lyd_compare_single(const struct lyd_node *node1, const struct lyd_node *node2, uint32_t options)
 {
     const struct lyd_node *iter1, *iter2;
     struct lyd_node_term *term1, *term2;
@@ -2427,7 +2427,7 @@
 }
 
 API LY_ERR
-lyd_compare_siblings(const struct lyd_node *node1, const struct lyd_node *node2, int options)
+lyd_compare_siblings(const struct lyd_node *node1, const struct lyd_node *node2, uint32_t options)
 {
     for ( ; node1 && node2; node1 = node1->next, node2 = node2->next) {
         LY_CHECK_RET(lyd_compare_single(node1, node2, options));
@@ -2474,7 +2474,7 @@
  * @return LY_ERR value
  */
 static LY_ERR
-lyd_dup_r(const struct lyd_node *node, struct lyd_node *parent, struct lyd_node **first, int options,
+lyd_dup_r(const struct lyd_node *node, struct lyd_node *parent, struct lyd_node **first, uint32_t options,
         struct lyd_node **dup_p)
 {
     LY_ERR ret;
@@ -2614,7 +2614,7 @@
         struct lyd_node_inner **local_parent)
 {
     const struct lyd_node_inner *orig_parent, *iter;
-    int repeat = 1;
+    uint8_t repeat = 1;
 
     *dup_parent = NULL;
     *local_parent = NULL;
@@ -2660,7 +2660,7 @@
 }
 
 static LY_ERR
-lyd_dup(const struct lyd_node *node, struct lyd_node_inner *parent, int options, int nosiblings, struct lyd_node **dup)
+lyd_dup(const struct lyd_node *node, struct lyd_node_inner *parent, uint32_t options, uint8_t  nosiblings, struct lyd_node **dup)
 {
     LY_ERR rc;
     const struct lyd_node *orig;          /* original node to be duplicated */
@@ -2706,13 +2706,13 @@
 }
 
 API LY_ERR
-lyd_dup_single(const struct lyd_node *node, struct lyd_node_inner *parent, int options, struct lyd_node **dup)
+lyd_dup_single(const struct lyd_node *node, struct lyd_node_inner *parent, uint32_t options, struct lyd_node **dup)
 {
     return lyd_dup(node, parent, options, 1, dup);
 }
 
 API LY_ERR
-lyd_dup_siblings(const struct lyd_node *node, struct lyd_node_inner *parent, int options, struct lyd_node **dup)
+lyd_dup_siblings(const struct lyd_node *node, struct lyd_node_inner *parent, uint32_t options, struct lyd_node **dup)
 {
     return lyd_dup(node, parent, options, 0, dup);
 }
@@ -2759,7 +2759,7 @@
  */
 static LY_ERR
 lyd_merge_sibling_r(struct lyd_node **first_trg, struct lyd_node *parent_trg, const struct lyd_node **sibling_src_p,
-        int options)
+        uint16_t options)
 {
     LY_ERR ret;
     const struct lyd_node *child_src, *tmp, *sibling_src;
@@ -2828,10 +2828,10 @@
 }
 
 static LY_ERR
-lyd_merge(struct lyd_node **target, const struct lyd_node *source, int options, int nosiblings)
+lyd_merge(struct lyd_node **target, const struct lyd_node *source, uint16_t options, uint8_t nosiblings)
 {
     const struct lyd_node *sibling_src, *tmp;
-    int first;
+    uint8_t first;
 
     LY_CHECK_ARG_RET(NULL, target, LY_EINVAL);
 
@@ -2867,19 +2867,19 @@
 }
 
 API LY_ERR
-lyd_merge_tree(struct lyd_node **target, const struct lyd_node *source, int options)
+lyd_merge_tree(struct lyd_node **target, const struct lyd_node *source, uint16_t options)
 {
     return lyd_merge(target, source, options, 1);
 }
 
 API LY_ERR
-lyd_merge_siblings(struct lyd_node **target, const struct lyd_node *source, int options)
+lyd_merge_siblings(struct lyd_node **target, const struct lyd_node *source, uint16_t options)
 {
     return lyd_merge(target, source, options, 0);
 }
 
 static LY_ERR
-lyd_path_str_enlarge(char **buffer, size_t *buflen, size_t reqlen, int is_static)
+lyd_path_str_enlarge(char **buffer, size_t *buflen, size_t reqlen, uint8_t is_static)
 {
     /* ending \0 */
     ++reqlen;
@@ -2901,7 +2901,7 @@
 }
 
 LY_ERR
-lyd_path_list_predicate(const struct lyd_node *node, char **buffer, size_t *buflen, size_t *bufused, int is_static)
+lyd_path_list_predicate(const struct lyd_node *node, char **buffer, size_t *buflen, size_t *bufused, uint8_t is_static)
 {
     const struct lyd_node *key;
     size_t len;
@@ -2934,7 +2934,7 @@
  * @return LY_ERR
  */
 static LY_ERR
-lyd_path_leaflist_predicate(const struct lyd_node *node, char **buffer, size_t *buflen, size_t *bufused, int is_static)
+lyd_path_leaflist_predicate(const struct lyd_node *node, char **buffer, size_t *buflen, size_t *bufused, uint8_t is_static)
 {
     size_t len;
     const char *val;
@@ -2964,11 +2964,11 @@
  * @return LY_ERR
  */
 static LY_ERR
-lyd_path_position_predicate(const struct lyd_node *node, char **buffer, size_t *buflen, size_t *bufused, int is_static)
+lyd_path_position_predicate(const struct lyd_node *node, char **buffer, size_t *buflen, size_t *bufused, uint8_t is_static)
 {
     const struct lyd_node *first, *iter;
     size_t len;
-    int pos;
+    uint64_t pos;
     char *val = NULL;
     LY_ERR rc;
 
@@ -2983,7 +2983,7 @@
             ++pos;
         }
     }
-    if (asprintf(&val, "%d", pos) == -1) {
+    if (asprintf(&val, "%" PRIu64, pos) == -1) {
         return LY_EMEM;
     }
 
@@ -3003,7 +3003,8 @@
 API char *
 lyd_path(const struct lyd_node *node, LYD_PATH_TYPE pathtype, char *buffer, size_t buflen)
 {
-    int is_static = 0, i, depth;
+    uint8_t is_static = 0;
+    uint32_t i, depth;
     size_t bufused = 0, len;
     const struct lyd_node *iter;
     const struct lys_module *mod;
@@ -3191,8 +3192,8 @@
     return LY_SUCCESS;
 }
 
-static int
-lyd_hash_table_schema_val_equal(void *val1_p, void *val2_p, int UNUSED(mod), void *UNUSED(cb_data))
+static uint8_t
+lyd_hash_table_schema_val_equal(void *val1_p, void *val2_p, uint8_t UNUSED(mod), void *UNUSED(cb_data))
 {
     struct lysc_node *val1;
     struct lyd_node *val2;
diff --git a/src/tree_data.h b/src/tree_data.h
index c72ce2e..e5d75d3 100644
--- a/src/tree_data.h
+++ b/src/tree_data.h
@@ -89,7 +89,7 @@
  * @param ELEM Iterator intended for use in the block.
  */
 #define LYD_TREE_DFS_BEGIN(START, ELEM) \
-    { int LYD_TREE_DFS_continue = 0; struct lyd_node *LYD_TREE_DFS_next; \
+    { uint8_t LYD_TREE_DFS_continue = 0; struct lyd_node *LYD_TREE_DFS_next; \
     for ((ELEM) = (LYD_TREE_DFS_next) = (struct lyd_node *)(START); \
          (ELEM); \
          (ELEM) = (LYD_TREE_DFS_next), LYD_TREE_DFS_continue = 0)
@@ -195,7 +195,7 @@
                                       whether a value is valid for the specific format or not on later validations
                                       (instance-identifier in XML looks different than in JSON). */
     void *prefix_data;           /**< Format-specific data for prefix resolution (see ::ly_resolve_prefix) */
-    int parser_hint;             /**< Hint options from the parser */
+    uint32_t parser_hint;        /**< Hint options from the parser */
 };
 
 /**
@@ -285,7 +285,7 @@
     const char *value;
 
     LYD_FORMAT format;              /**< format of the prefixes, only LYD_XML and LYD_JSON values can appear at this place */
-    int hint;                       /**< additional information about from the data source, see the [hints list](@ref lydopaqhints) */
+    uint32_t hint;                  /**< additional information about from the data source, see the [hints list](@ref lydopaqhints) */
     struct ly_prefix prefix;        /**< name prefix, it is stored because they are a real pain to generate properly */
 
 };
@@ -470,7 +470,7 @@
     struct ly_prefix prefix;        /**< name prefix */
     struct ly_prefix *val_prefs;    /**< list of prefixes in the value ([sized array](@ref sizedarrays)) */
     const char *value;              /**< original value */
-    int hint;                       /**< additional information about from the data source, see the [hints list](@ref lydopaqhints) */
+    uint32_t hint;                  /**< additional information about from the data source, see the [hints list](@ref lydopaqhints) */
     const struct ly_ctx *ctx;       /**< libyang context */
 };
 
@@ -491,7 +491,7 @@
  * @param[in] options Bitmask of options, see @ref
  * @return Pointer to the first child node (if any) of the \p node.
  */
-struct lyd_node *lyd_node_children(const struct lyd_node *node, int options);
+struct lyd_node *lyd_node_children(const struct lyd_node *node, uint32_t options);
 
 /**
  * @brief Get the owner module of the data node. It is the module of the top-level schema node. Generally,
@@ -673,7 +673,7 @@
  * @return LY_ERR value.
  */
 LY_ERR lyd_new_path(struct lyd_node *parent, const struct ly_ctx *ctx, const char *path, const char *value,
-        int options, struct lyd_node **node);
+        uint32_t options, struct lyd_node **node);
 
 /**
  * @brief Create a new node in the data tree based on a path. All node types can be created.
@@ -692,7 +692,7 @@
  * @return LY_ERR value.
  */
 LY_ERR lyd_new_path_any(struct lyd_node *parent, const struct ly_ctx *ctx, const char *path, const void *value,
-        LYD_ANYDATA_VALUETYPE value_type, int options, struct lyd_node **node);
+        LYD_ANYDATA_VALUETYPE value_type, uint32_t options, struct lyd_node **node);
 
 /**
  * @brief Create a new node in the data tree based on a path. All node types can be created.
@@ -712,7 +712,7 @@
  * @return LY_ERR value.
  */
 LY_ERR lyd_new_path2(struct lyd_node *parent, const struct ly_ctx *ctx, const char *path, const void *value,
-        LYD_ANYDATA_VALUETYPE value_type, int options, struct lyd_node **new_parent, struct lyd_node **new_node);
+        LYD_ANYDATA_VALUETYPE value_type, uint32_t options, struct lyd_node **new_parent, struct lyd_node **new_node);
 
 /**
  * @defgroup implicitoptions Implicit node creation options
@@ -741,7 +741,7 @@
  * @param[out] diff Optional diff with any created nodes.
  * @return LY_ERR value.
  */
-LY_ERR lyd_new_implicit_tree(struct lyd_node *tree, int implicit_options, struct lyd_node **diff);
+LY_ERR lyd_new_implicit_tree(struct lyd_node *tree, uint32_t implicit_options, struct lyd_node **diff);
 
 /**
  * @brief Add any missing implicit nodes.
@@ -752,7 +752,7 @@
  * @param[out] diff Optional diff with any created nodes.
  * @return LY_ERR value.
  */
-LY_ERR lyd_new_implicit_all(struct lyd_node **tree, const struct ly_ctx *ctx, int implicit_options, struct lyd_node **diff);
+LY_ERR lyd_new_implicit_all(struct lyd_node **tree, const struct ly_ctx *ctx, uint32_t implicit_options, struct lyd_node **diff);
 
 /**
  * @brief Add any missing implicit nodes of one module.
@@ -763,7 +763,7 @@
  * @param[out] diff Optional diff with any created nodes.
  * @return LY_ERR value.
  */
-LY_ERR lyd_new_implicit_module(struct lyd_node **tree, const struct lys_module *module, int implicit_options,
+LY_ERR lyd_new_implicit_module(struct lyd_node **tree, const struct lys_module *module, uint32_t implicit_options,
         struct lyd_node **diff);
 
 /**
@@ -969,7 +969,7 @@
  * @return LY_SUCCESS if the nodes are equivalent.
  * @return LY_ENOT if the nodes are not equivalent.
  */
-LY_ERR lyd_compare_single(const struct lyd_node *node1, const struct lyd_node *node2, int options);
+LY_ERR lyd_compare_single(const struct lyd_node *node1, const struct lyd_node *node2, uint32_t options);
 
 /**
  * @brief Compare 2 lists of siblings if they are equivalent.
@@ -980,7 +980,7 @@
  * @return LY_SUCCESS if all the siblings are equivalent.
  * @return LY_ENOT if the siblings are not equivalent.
  */
-LY_ERR lyd_compare_siblings(const struct lyd_node *node1, const struct lyd_node *node2, int options);
+LY_ERR lyd_compare_siblings(const struct lyd_node *node1, const struct lyd_node *node2, uint32_t options);
 
 /**
  * @brief Compare 2 metadata.
@@ -1026,7 +1026,7 @@
  * node(s) (when LYD_DUP_WITH_PARENTS used), the first duplicated node is still returned.
  * @return LY_ERR value.
  */
-LY_ERR lyd_dup_single(const struct lyd_node *node, struct lyd_node_inner *parent, int options, struct lyd_node **dup);
+LY_ERR lyd_dup_single(const struct lyd_node *node, struct lyd_node_inner *parent, uint32_t options, struct lyd_node **dup);
 
 /**
  * @brief Create a copy of the specified data tree \p node with any following siblings. Schema references are kept the same.
@@ -1040,7 +1040,7 @@
  * node(s) (when LYD_DUP_WITH_PARENTS used), the first duplicated node is still returned.
  * @return LY_ERR value.
  */
-LY_ERR lyd_dup_siblings(const struct lyd_node *node, struct lyd_node_inner *parent, int options, struct lyd_node **dup);
+LY_ERR lyd_dup_siblings(const struct lyd_node *node, struct lyd_node_inner *parent, uint32_t options, struct lyd_node **dup);
 
 /**
  * @brief Create a copy of the metadata.
@@ -1079,7 +1079,7 @@
  * @return LY_SUCCESS on success,
  * @return LY_ERR value on error.
  */
-LY_ERR lyd_merge_tree(struct lyd_node **target, const struct lyd_node *source, int options);
+LY_ERR lyd_merge_tree(struct lyd_node **target, const struct lyd_node *source, uint16_t options);
 
 /**
  * @brief Merge the source data tree with any following siblings into the target data tree. Merge may not be
@@ -1092,7 +1092,7 @@
  * @return LY_SUCCESS on success,
  * @return LY_ERR value on error.
  */
-LY_ERR lyd_merge_siblings(struct lyd_node **target, const struct lyd_node *source, int options);
+LY_ERR lyd_merge_siblings(struct lyd_node **target, const struct lyd_node *source, uint16_t options);
 
 /**
  * @defgroup diffoptions Data diff options.
@@ -1136,7 +1136,7 @@
  * @return LY_SUCCESS on success,
  * @return LY_ERR on error.
  */
-LY_ERR lyd_diff_tree(const struct lyd_node *first, const struct lyd_node *second, int options, struct lyd_node **diff);
+LY_ERR lyd_diff_tree(const struct lyd_node *first, const struct lyd_node *second, uint16_t options, struct lyd_node **diff);
 
 /**
  * @brief Learn the differences between 2 data trees including all the following siblings.
@@ -1148,7 +1148,7 @@
  * @return LY_SUCCESS on success,
  * @return LY_ERR on error.
  */
-LY_ERR lyd_diff_siblings(const struct lyd_node *first, const struct lyd_node *second, int options, struct lyd_node **diff);
+LY_ERR lyd_diff_siblings(const struct lyd_node *first, const struct lyd_node *second, uint16_t options, struct lyd_node **diff);
 
 /**
  * @brief Callback for diff nodes.
diff --git a/src/tree_data_free.c b/src/tree_data_free.c
index 388271b..7c0a52a 100644
--- a/src/tree_data_free.c
+++ b/src/tree_data_free.c
@@ -23,7 +23,7 @@
 #include "plugins_types.h"
 
 static void
-lyd_free_meta(struct lyd_meta *meta, int siblings)
+lyd_free_meta(struct lyd_meta *meta, uint8_t siblings)
 {
     struct lyd_meta *iter;
 
@@ -77,7 +77,7 @@
 }
 
 static void
-ly_free_attr(const struct ly_ctx *ctx, struct lyd_attr *attr, int siblings)
+ly_free_attr(const struct ly_ctx *ctx, struct lyd_attr *attr, uint8_t siblings)
 {
     struct lyd_attr *iter;
     LY_ARRAY_COUNT_TYPE u;
@@ -157,7 +157,7 @@
  * @param[in] top Recursion flag to unlink the root of the subtree being freed.
  */
 static void
-lyd_free_subtree(struct lyd_node *node, int top)
+lyd_free_subtree(struct lyd_node *node, uint8_t top)
 {
     struct lyd_node *iter, *next;
     struct lyd_node *children;
@@ -222,7 +222,7 @@
 }
 
 static void
-lyd_free_(struct lyd_node *node, int top)
+lyd_free_(struct lyd_node *node, uint8_t top)
 {
     struct lyd_node *iter, *next;
 
diff --git a/src/tree_data_hash.c b/src/tree_data_hash.c
index e299b7d..177a394 100644
--- a/src/tree_data_hash.c
+++ b/src/tree_data_hash.c
@@ -83,8 +83,8 @@
     return LY_SUCCESS;
 }
 
-static int
-lyd_hash_table_val_equal(void *val1_p, void *val2_p, int mod, void *UNUSED(cb_data))
+static uint8_t
+lyd_hash_table_val_equal(void *val1_p, void *val2_p, uint8_t mod, void *UNUSED(cb_data))
 {
     struct lyd_node *val1, *val2;
 
@@ -120,7 +120,7 @@
  * @return LY_ERR value.
  */
 static LY_ERR
-lyd_insert_hash_add(struct hash_table *ht, struct lyd_node *node, int empty_ht)
+lyd_insert_hash_add(struct hash_table *ht, struct lyd_node *node, uint8_t empty_ht)
 {
     uint32_t hash;
 
diff --git a/src/tree_data_helpers.c b/src/tree_data_helpers.c
index faf1263..86b0c64 100644
--- a/src/tree_data_helpers.c
+++ b/src/tree_data_helpers.c
@@ -83,7 +83,7 @@
 }
 
 API struct lyd_node *
-lyd_node_children(const struct lyd_node *node, int options)
+lyd_node_children(const struct lyd_node *node, uint32_t options)
 {
     struct lyd_node **children, *child;
 
@@ -199,7 +199,7 @@
 }
 
 void
-lyd_parse_set_data_flags(struct lyd_node *node, struct ly_set *when_check, struct lyd_meta **meta, int options)
+lyd_parse_set_data_flags(struct lyd_node *node, struct ly_set *when_check, struct lyd_meta **meta, uint32_t options)
 {
     struct lyd_meta *meta2, *prev_meta = NULL;
 
@@ -242,7 +242,6 @@
 lyd_any_copy_value(struct lyd_node *trg, const union lyd_any_value *value, LYD_ANYDATA_VALUETYPE value_type)
 {
     struct lyd_node_any *t;
-    int len;
 
     assert(trg->schema->nodetype & LYS_ANYDATA);
 
@@ -286,7 +285,7 @@
         break;
     case LYD_ANYDATA_LYB:
         if (value->mem) {
-            len = lyd_lyb_data_length(value->mem);
+            int len = lyd_lyb_data_length(value->mem);
             LY_CHECK_RET(len == -1, LY_EINVAL);
             t->value.mem = malloc(len);
             LY_CHECK_ERR_RET(!t->value.mem, LOGMEM(LYD_CTX(trg)), LY_EMEM);
@@ -302,7 +301,6 @@
 lyb_hash(struct lysc_node *sibling, uint8_t collision_id)
 {
     const struct lys_module *mod;
-    int ext_len;
     uint32_t full_hash;
     LYB_HASH hash;
 
@@ -315,6 +313,8 @@
     full_hash = dict_hash_multi(0, mod->name, strlen(mod->name));
     full_hash = dict_hash_multi(full_hash, sibling->name, strlen(sibling->name));
     if (collision_id) {
+        size_t ext_len;
+
         if (collision_id > strlen(mod->name)) {
             /* fine, we will not hash more bytes, just use more bits from the hash than previously */
             ext_len = strlen(mod->name);
@@ -339,7 +339,7 @@
     return hash;
 }
 
-int
+uint8_t
 lyb_has_schema_model(const struct lysc_node *sibling, const struct lys_module **models)
 {
     LY_ARRAY_COUNT_TYPE u;
diff --git a/src/tree_data_internal.h b/src/tree_data_internal.h
index f7c0540..07c4134 100644
--- a/src/tree_data_internal.h
+++ b/src/tree_data_internal.h
@@ -48,8 +48,9 @@
  * @param[in] models Modules in a sized array.
  * @return non-zero if the module was found,
  * @return 0 if not found.
+ * @return 1 if found.
  */
-int lyb_has_schema_model(const struct lysc_node *sibling, const struct lys_module **models);
+uint8_t lyb_has_schema_model(const struct lysc_node *sibling, const struct lys_module **models);
 
 /**
  * @brief Check whether a node to be deleted is the first top-level sibling.
@@ -102,7 +103,7 @@
  * @return LY_EINCOMPLETE in case data tree is needed to finish the validation.
  * @return LY_ERR value if an error occurred.
  */
-LY_ERR lyd_create_term(const struct lysc_node *schema, const char *value, size_t value_len, int *dynamic, int value_hint,
+LY_ERR lyd_create_term(const struct lysc_node *schema, const char *value, size_t value_len, uint8_t *dynamic, uint32_t value_hint,
         LY_PREFIX_FORMAT format, void *prefix_data, struct lyd_node **node);
 
 /**
@@ -181,7 +182,7 @@
  * @return LY_ERR value if an error occurred.
  */
 LY_ERR lyd_create_opaq(const struct ly_ctx *ctx, const char *name, size_t name_len, const char *value, size_t value_len,
-        int *dynamic, int value_hint, LYD_FORMAT format, struct ly_prefix *val_prefs, const char *prefix,
+        uint8_t *dynamic, uint32_t value_hint, LYD_FORMAT format, struct ly_prefix *val_prefs, const char *prefix,
         size_t pref_len, const char *module_key, size_t module_key_len, struct lyd_node **node);
 
 /**
@@ -199,7 +200,7 @@
  */
 LY_ERR lyd_new_implicit_r(struct lyd_node *parent, struct lyd_node **first, const struct lysc_node *sparent,
         const struct lys_module *mod, struct ly_set *node_types, struct ly_set *node_when,
-        int impl_opts, struct lyd_node **diff);
+        uint32_t impl_opts, struct lyd_node **diff);
 
 /**
  * @brief Find the next node, before which to insert the new node.
@@ -248,7 +249,7 @@
  * @return LY_ERR value if an error occurred.
  */
 LY_ERR lyd_create_meta(struct lyd_node *parent, struct lyd_meta **meta, const struct lys_module *mod, const char *name,
-        size_t name_len, const char *value, size_t value_len, int *dynamic, int value_hint,
+        size_t name_len, const char *value, size_t value_len, uint8_t *dynamic, uint32_t value_hint,
         LY_PREFIX_FORMAT format, void *prefix_data, const struct lysc_node *ctx_snode);
 
 /**
@@ -281,7 +282,7 @@
  * @return LY_ERR value if an error occurred.
  */
 LY_ERR lyd_create_attr(struct lyd_node *parent, struct lyd_attr **attr, const struct ly_ctx *ctx, const char *name,
-        size_t name_len, const char *value, size_t value_len, int *dynamic, int value_hint, LYD_FORMAT format,
+        size_t name_len, const char *value, size_t value_len, uint8_t *dynamic, uint32_t value_hint, LYD_FORMAT format,
         struct ly_prefix *val_prefs, const char *prefix, size_t prefix_len, const char *module_key, size_t module_key_len);
 
 /**
@@ -315,12 +316,12 @@
  * @return LY_EINCOMPLETE in case the @p trees is not provided and it was needed to finish the validation.
  * @return LY_ERR value if an error occurred.
  */
-LY_ERR lyd_value_parse(struct lyd_node_term *node, const char *value, size_t value_len, int *dynamic, int second, int value_hint,
-        LY_PREFIX_FORMAT format, void *prefix_data, const struct lyd_node *tree);
+LY_ERR lyd_value_parse(struct lyd_node_term *node, const char *value, size_t value_len, uint8_t *dynamic, uint8_t second,
+        uint32_t value_hint, LY_PREFIX_FORMAT format, void *prefix_data, const struct lyd_node *tree);
 
 /* similar to lyd_value_parse except can be used just to store the value, hence does also not support a second call */
 LY_ERR lyd_value_store(struct lyd_value *val, const struct lysc_node *schema, const char *value, size_t value_len,
-        int *dynamic, LY_PREFIX_FORMAT format, void *prefix_data);
+        uint8_t *dynamic, LY_PREFIX_FORMAT format, void *prefix_data);
 
 /**
  * @brief Validate, canonize and store the given @p value into the metadata according to the annotation type's rules.
@@ -343,7 +344,7 @@
  * @return LY_ERR value if an error occurred.
  */
 LY_ERR lyd_value_parse_meta(const struct ly_ctx *ctx, struct lyd_meta *meta, const char *value, size_t value_len,
-        int *dynamic, int second, int value_hint, LY_PREFIX_FORMAT format, void *prefix_data,
+        uint8_t *dynamic, uint8_t second, uint32_t value_hint, LY_PREFIX_FORMAT format, void *prefix_data,
         const struct lysc_node *ctx_snode, const struct lyd_node *tree);
 
 /* generic function lys_value_validate */
@@ -361,7 +362,7 @@
  * @param[out] lydctx_p Data parser context to finish validation.
  * @return LY_ERR value.
  */
-LY_ERR lyd_parse_xml_data(const struct ly_ctx *ctx, struct ly_in *in, int parse_options, int validate_options,
+LY_ERR lyd_parse_xml_data(const struct ly_ctx *ctx, struct ly_in *in, uint32_t parse_options, uint32_t validate_options,
         struct lyd_node **tree_p, struct lyd_ctx **lydctx_p);
 
 /**
@@ -418,7 +419,7 @@
  * @param[out] lydctx_p Data parser context to finish validation.
  * @return LY_ERR value.
  */
-LY_ERR lyd_parse_json_data(const struct ly_ctx *ctx, struct ly_in *in, int parse_options, int validate_options,
+LY_ERR lyd_parse_json_data(const struct ly_ctx *ctx, struct ly_in *in, uint32_t parse_options, uint32_t validate_options,
         struct lyd_node **tree_p, struct lyd_ctx **lydctx_p);
 
 /**
@@ -474,7 +475,7 @@
  * @param[out] lydctx_p Data parser context to finish validation.
  * @return LY_ERR value.
  */
-LY_ERR lyd_parse_lyb_data(const struct ly_ctx *ctx, struct ly_in *in, int parse_options, int validate_options,
+LY_ERR lyd_parse_lyb_data(const struct ly_ctx *ctx, struct ly_in *in, uint32_t parse_options, uint32_t validate_options,
         struct lyd_node **tree_p, struct lyd_ctx **lydctx_p);
 
 /**
@@ -583,7 +584,7 @@
  * @param[in,out] meta Node metadata, may be removed from.
  * @param[in] options Parse options.
  */
-void lyd_parse_set_data_flags(struct lyd_node *node, struct ly_set *when_check, struct lyd_meta **meta, int options);
+void lyd_parse_set_data_flags(struct lyd_node *node, struct ly_set *when_check, struct lyd_meta **meta, uint32_t options);
 
 /**
  * @brief Free value prefixes.
@@ -603,6 +604,6 @@
  * @param[in] is_static Whether buffer is static or can be reallocated.
  * @return LY_ERR
  */
-LY_ERR lyd_path_list_predicate(const struct lyd_node *node, char **buffer, size_t *buflen, size_t *bufused, int is_static);
+LY_ERR lyd_path_list_predicate(const struct lyd_node *node, char **buffer, size_t *buflen, size_t *bufused, uint8_t is_static);
 
 #endif /* LY_TREE_DATA_INTERNAL_H_ */
diff --git a/src/tree_schema.c b/src/tree_schema.c
index 2f4df6e..64d445e 100644
--- a/src/tree_schema.c
+++ b/src/tree_schema.c
@@ -40,11 +40,11 @@
 #include "xpath.h"
 
 API const struct lysc_node *
-lys_getnext(const struct lysc_node *last, const struct lysc_node *parent, const struct lysc_module *module, int options)
+lys_getnext(const struct lysc_node *last, const struct lysc_node *parent, const struct lysc_module *module, uint32_t options)
 {
     const struct lysc_node *next = NULL;
     struct lysc_node **snode;
-    int action_flag = 0, notif_flag = 0;
+    uint8_t action_flag = 0, notif_flag = 0;
     const struct lysc_action *actions;
     const struct lysc_notif *notifs;
     LY_ARRAY_COUNT_TYPE u;
@@ -196,7 +196,6 @@
     const char *id = qpath;
     const char *prefix, *name;
     size_t prefix_len, name_len;
-    unsigned int u;
     const struct lysc_node *node = context_node;
     struct lys_module *mod = NULL;
 
@@ -224,7 +223,7 @@
             if (context_node) {
                 mod = lys_module_find_prefix(context_node->module, prefix, prefix_len);
             } else {
-                for (u = 0; u < ctx->list.count; ++u) {
+                for (uint32_t u = 0; u < ctx->list.count; ++u) {
                     if (!ly_strncmp(((struct lys_module *)ctx->list.objs[u])->name, prefix, prefix_len)) {
                         struct lys_module *m = (struct lys_module *)ctx->list.objs[u];
                         if (mod) {
@@ -259,7 +258,7 @@
 
 API const struct lysc_node *
 lys_find_child(const struct lysc_node *parent, const struct lys_module *module, const char *name, size_t name_len,
-        uint16_t nodetype, int options)
+        uint16_t nodetype, uint32_t options)
 {
     const struct lysc_node *node = NULL;
 
@@ -290,7 +289,7 @@
 }
 
 API LY_ERR
-lys_atomize_xpath(const struct lysc_node *ctx_node, const char *xpath, int options, struct ly_set **set)
+lys_atomize_xpath(const struct lysc_node *ctx_node, const char *xpath, uint32_t options, struct ly_set **set)
 {
     LY_ERR ret = LY_SUCCESS;
     struct lyxp_set xp_set;
@@ -334,7 +333,7 @@
 }
 
 API LY_ERR
-lys_find_xpath(const struct lysc_node *ctx_node, const char *xpath, int options, struct ly_set **set)
+lys_find_xpath(const struct lysc_node *ctx_node, const char *xpath, uint32_t options, struct ly_set **set)
 {
     LY_ERR ret = LY_SUCCESS;
     struct lyxp_set xp_set;
@@ -467,20 +466,18 @@
 }
 
 uint8_t
-lysc_iff_getop(uint8_t *list, int pos)
+lysc_iff_getop(uint8_t *list, size_t pos)
 {
     uint8_t *item;
     uint8_t mask = 3, result;
 
-    assert(pos >= 0);
-
     item = &list[pos / 4];
     result = (*item) & (mask << 2 * (pos % 4));
     return result >> 2 * (pos % 4);
 }
 
 static LY_ERR
-lysc_iffeature_value_(const struct lysc_iffeature *iff, int *index_e, int *index_f)
+lysc_iffeature_value_(const struct lysc_iffeature *iff, size_t *index_e, size_t *index_f)
 {
     uint8_t op;
     LY_ERR a, b;
@@ -520,7 +517,7 @@
 API LY_ERR
 lysc_iffeature_value(const struct lysc_iffeature *iff)
 {
-    int index_e = 0, index_f = 0;
+    size_t index_e = 0, index_f = 0;
 
     LY_CHECK_ARG_RET(NULL, iff, -1);
 
@@ -545,9 +542,9 @@
  * @return LY_ERR value.
  */
 static LY_ERR
-lys_feature_change(const struct lys_module *mod, const char *name, int value, int skip_checks)
+lys_feature_change(const struct lys_module *mod, const char *name, uint8_t value, uint8_t skip_checks)
 {
-    int all = 0;
+    uint8_t all = 0;
     LY_ARRAY_COUNT_TYPE u, disabled_count;
     uint32_t changed_count;
     struct lysc_feature *f, **df;
@@ -764,7 +761,7 @@
 }
 
 API const struct lysc_node *
-lysc_node_is_disabled(const struct lysc_node *node, int recursive)
+lysc_node_is_disabled(const struct lysc_node *node, uint8_t recursive)
 {
     LY_ARRAY_COUNT_TYPE u;
 
@@ -962,10 +959,9 @@
 }
 
 LY_ERR
-lys_parse_mem_module(struct ly_ctx *ctx, struct ly_in *in, LYS_INFORMAT format, int implement,
-        LY_ERR (*custom_check)(const struct ly_ctx *ctx, struct lysp_module *mod,
-                                            struct lysp_submodule *submod, void *data), void *check_data,
-        struct lys_module **module)
+lys_parse_mem_module(struct ly_ctx *ctx, struct ly_in *in, LYS_INFORMAT format, uint8_t implement,
+        LY_ERR (*custom_check)(const struct ly_ctx *ctx, struct lysp_module *mod, struct lysp_submodule *submod, void *data),
+        void *check_data, struct lys_module **module)
 {
     struct lys_module *mod = NULL, *latest, *mod_dup;
     LY_ERR ret;
@@ -1230,11 +1226,12 @@
 }
 
 API LY_ERR
-lys_search_localfile(const char * const *searchpaths, int cwd, const char *name, const char *revision,
+lys_search_localfile(const char * const *searchpaths, uint8_t cwd, const char *name, const char *revision,
         char **localfile, LYS_INFORMAT *format)
 {
+    LY_ERR ret = LY_EMEM;
     size_t len, flen, match_len = 0, dir_len;
-    int i, implicit_cwd = 0, ret = EXIT_FAILURE;
+    uint8_t implicit_cwd = 0;
     char *wd, *wn = NULL;
     DIR *dir = NULL;
     struct dirent *file;
@@ -1249,8 +1246,7 @@
      * and the current working directory */
     dirs = ly_set_new();
     if (!dirs) {
-        LOGMEM(NULL);
-        return EXIT_FAILURE;
+        LOGMEM_RET(NULL);
     }
 
     len = strlen(name);
@@ -1269,7 +1265,7 @@
         }
     }
     if (searchpaths) {
-        for (i = 0; searchpaths[i]; i++) {
+        for (uint64_t i = 0; searchpaths[i]; i++) {
             /* check for duplicities with the implicit current working directory */
             if (implicit_cwd && !strcmp(dirs->objs[0], searchpaths[i])) {
                 implicit_cwd = 0;
@@ -1407,7 +1403,7 @@
     if (format) {
         (*format) = match_format;
     }
-    ret = EXIT_SUCCESS;
+    ret = LY_SUCCESS;
 
 cleanup:
     free(wn);
diff --git a/src/tree_schema.h b/src/tree_schema.h
index 9d6b36a..58fc6cd 100644
--- a/src/tree_schema.h
+++ b/src/tree_schema.h
@@ -69,7 +69,7 @@
  * @param ELEM Iterator intended for use in the block.
  */
 #define LYSC_TREE_DFS_BEGIN(START, ELEM) \
-    { int LYSC_TREE_DFS_continue = 0; struct lysc_node *LYSC_TREE_DFS_next; \
+    { uint8_t LYSC_TREE_DFS_continue = 0; struct lysc_node *LYSC_TREE_DFS_next; \
     for ((ELEM) = (LYSC_TREE_DFS_next) = (struct lysc_node*)(START); \
          (ELEM); \
          (ELEM) = (LYSC_TREE_DFS_next), LYSC_TREE_DFS_continue = 0)
@@ -1725,8 +1725,9 @@
  * @param[in] node Node to examine.
  * @return non-zero if it is,
  * @return 0 if not.
+ * @return 1 if the @p node is user-ordered
  */
-int lysc_is_userordered(const struct lysc_node *schema);
+uint8_t lysc_is_userordered(const struct lysc_node *schema);
 
 /**
  * @brief Set a schema private pointer to a user pointer.
@@ -1774,7 +1775,7 @@
  * @return LY_SUCCESS on success, @p set is returned.
  * @return LY_ERR value if an error occurred.
  */
-LY_ERR lys_atomize_xpath(const struct lysc_node *ctx_node, const char *xpath, int options, struct ly_set **set);
+LY_ERR lys_atomize_xpath(const struct lysc_node *ctx_node, const char *xpath, uint32_t options, struct ly_set **set);
 
 /**
  * @brief Evaluate an \p xpath expression on schema nodes.
@@ -1787,7 +1788,7 @@
  * @return LY_SUCCESS on success, @p set is returned.
  * @return LY_ERR value if an error occurred.
  */
-LY_ERR lys_find_xpath(const struct lysc_node *ctx_node, const char *xpath, int options, struct ly_set **set);
+LY_ERR lys_find_xpath(const struct lysc_node *ctx_node, const char *xpath, uint32_t options, struct ly_set **set);
 
 /**
  * @brief Types of the different schema paths.
@@ -1945,7 +1946,7 @@
  * @return Next schema tree node that can be instantiated in a data tree, NULL in case there is no such element.
  */
 const struct lysc_node *lys_getnext(const struct lysc_node *last, const struct lysc_node *parent,
-        const struct lysc_module *module, int options);
+        const struct lysc_module *module, uint32_t options);
 
 /**
  * @defgroup sgetnextflags lys_getnext() flags
@@ -1974,7 +1975,7 @@
  * @return Found node if any.
  */
 const struct lysc_node *lys_find_child(const struct lysc_node *parent, const struct lys_module *module,
-        const char *name, size_t name_len, uint16_t nodetype, int options);
+        const char *name, size_t name_len, uint16_t nodetype, uint32_t options);
 
 /**
  * @brief Get schema node specified by the schema path.
@@ -2015,7 +2016,7 @@
  * @return NULL if enabled,
  * @return pointer to the node with the unsatisfied (disabled) if-feature expression.
  */
-const struct lysc_node *lysc_node_is_disabled(const struct lysc_node *node, int recursive);
+const struct lysc_node *lysc_node_is_disabled(const struct lysc_node *node, uint8_t recursive);
 
 /**
  * @brief Set a schema private pointer to a user pointer.
diff --git a/src/tree_schema_compile.c b/src/tree_schema_compile.c
index cae0cd0..397c372 100644
--- a/src/tree_schema_compile.c
+++ b/src/tree_schema_compile.c
@@ -238,7 +238,7 @@
 lysc_update_path(struct lysc_ctx *ctx, struct lysc_node *parent, const char *name)
 {
     int len;
-    int nextlevel = 0; /* 0 - no starttag, 1 - '/' starttag, 2 - '=' starttag + '}' endtag */
+    uint8_t nextlevel = 0; /* 0 - no starttag, 1 - '/' starttag, 2 - '=' starttag + '}' endtag */
 
     if (!name) {
         /* removing last path segment */
@@ -282,7 +282,7 @@
         } else {
             len = snprintf(&ctx->path[ctx->path_len], LYSC_CTX_BUFSIZE - ctx->path_len, "='%s'}", name);
         }
-        if (len >= LYSC_CTX_BUFSIZE - ctx->path_len) {
+        if (len >= LYSC_CTX_BUFSIZE - (int)ctx->path_len) {
             /* output truncated */
             ctx->path_len = LYSC_CTX_BUFSIZE - 1;
         } else {
@@ -370,9 +370,9 @@
  * @brief Stack for processing if-feature expressions.
  */
 struct iff_stack {
-    int size;      /**< number of items in the stack */
-    int index;     /**< first empty item */
-    uint8_t *stack;/**< stack - array of @ref ifftokens to create the if-feature expression in prefix format */
+    size_t size;    /**< number of items in the stack */
+    size_t index;   /**< first empty item */
+    uint8_t *stack; /**< stack - array of @ref ifftokens to create the if-feature expression in prefix format */
 };
 
 /**
@@ -427,12 +427,11 @@
  * @param[in] pos Position (0-based) where to store the given @p op.
  */
 static void
-iff_setop(uint8_t *list, uint8_t op, int pos)
+iff_setop(uint8_t *list, uint8_t op, size_t pos)
 {
     uint8_t *item;
     uint8_t mask = 3;
 
-    assert(pos >= 0);
     assert(op <= 3); /* max 2 bits */
 
     item = &list[pos / 4];
@@ -695,10 +694,11 @@
 static LY_ERR
 lys_compile_iffeature(struct lysc_ctx *ctx, const char **value, struct lysc_iffeature *iff)
 {
+    LY_ERR rc = LY_SUCCESS;
     const char *c = *value;
-    int r, rc = EXIT_FAILURE;
-    int i, j, last_not, checkversion = 0;
-    unsigned int f_size = 0, expr_size = 0, f_exp = 1;
+    int64_t i, j;
+    int8_t op_len, last_not = 0, checkversion = 0;
+    LY_ARRAY_COUNT_TYPE f_size = 0, expr_size = 0, f_exp = 1;
     uint8_t op;
     struct iff_stack stack = {0, 0, NULL};
     struct lysc_feature *f;
@@ -706,7 +706,7 @@
     assert(c);
 
     /* pre-parse the expression to get sizes for arrays, also do some syntax checks of the expression */
-    for (i = j = last_not = 0; c[i]; i++) {
+    for (i = j = 0; c[i]; i++) {
         if (c[i] == '(') {
             j++;
             checkversion = 1;
@@ -719,14 +719,14 @@
             continue;
         }
 
-        if (!strncmp(&c[i], "not", r = 3) || !strncmp(&c[i], "and", r = 3) || !strncmp(&c[i], "or", r = 2)) {
-            int sp;
-            for (sp = 0; c[i + r + sp] && isspace(c[i + r + sp]); sp++);
-            if (c[i + r + sp] == '\0') {
+        if (!strncmp(&c[i], "not", op_len = 3) || !strncmp(&c[i], "and", op_len = 3) || !strncmp(&c[i], "or", op_len = 2)) {
+            uint64_t spaces;
+            for (spaces = 0; c[i + op_len + spaces] && isspace(c[i + op_len + spaces]); spaces++);
+            if (c[i + op_len + spaces] == '\0') {
                 LOGVAL(ctx->ctx, LY_VLOG_STR, ctx->path, LYVE_SYNTAX_YANG,
                        "Invalid value \"%s\" of if-feature - unexpected end of expression.", *value);
                 return LY_EVALID;
-            } else if (!isspace(c[i + r])) {
+            } else if (!isspace(c[i + op_len])) {
                 /* feature name starting with the not/and/or */
                 last_not = 0;
                 f_size++;
@@ -741,7 +741,7 @@
             } else { /* and, or */
                 if (f_exp != f_size) {
                     LOGVAL(ctx->ctx, LY_VLOG_STR, ctx->path, LYVE_SYNTAX_YANG,
-                           "Invalid value \"%s\" of if-feature - missing feature/expression before \"%.*s\" operation.", *value, r, &c[i]);
+                           "Invalid value \"%s\" of if-feature - missing feature/expression before \"%.*s\" operation.", *value, op_len, &c[i]);
                     return LY_EVALID;
                 }
                 f_exp++;
@@ -749,7 +749,7 @@
                 /* not a not operation */
                 last_not = 0;
             }
-            i += r;
+            i += op_len;
         } else {
             f_size++;
             last_not = 0;
@@ -791,7 +791,7 @@
     LY_ARRAY_CREATE_RET(ctx->ctx, iff->features, f_size, LY_EMEM);
     iff->expr = calloc((j = (expr_size / 4) + ((expr_size % 4) ? 1 : 0)), sizeof *iff->expr);
     stack.stack = malloc(expr_size * sizeof *stack.stack);
-    LY_CHECK_ERR_GOTO(!stack.stack || !iff->expr, LOGMEM(ctx->ctx), error);
+    LY_CHECK_ERR_GOTO(!stack.stack || !iff->expr, LOGMEM(ctx->ctx); rc = LY_EMEM, error);
 
     stack.size = expr_size;
     f_size--; expr_size--; /* used as indexes from now */
@@ -1494,7 +1494,7 @@
  * @return LY_SUCCESS or LY_EEXIST for invalid order.
  */
 static LY_ERR
-range_part_check_ascendancy(int unsigned_value, int max, int64_t value, int64_t prev_value)
+range_part_check_ascendancy(uint8_t unsigned_value, uint8_t max, int64_t value, int64_t prev_value)
 {
     if (unsigned_value) {
         if ((max && (uint64_t)prev_value > (uint64_t)value) || (!max && (uint64_t)prev_value >= (uint64_t)value)) {
@@ -1525,8 +1525,8 @@
  * frdigits value), LY_EMEM.
  */
 static LY_ERR
-range_part_minmax(struct lysc_ctx *ctx, struct lysc_range_part *part, int max, int64_t prev, LY_DATA_TYPE basetype,
-        int first, int length_restr, uint8_t frdigits, struct lysc_range *base_range, const char **value)
+range_part_minmax(struct lysc_ctx *ctx, struct lysc_range_part *part, uint8_t max, int64_t prev, LY_DATA_TYPE basetype,
+        uint8_t first, uint8_t length_restr, uint8_t frdigits, struct lysc_range *base_range, const char **value)
 {
     LY_ERR ret = LY_SUCCESS;
     char *valcopy = NULL;
@@ -1688,13 +1688,13 @@
  * @return LY_ERR value.
  */
 static LY_ERR
-lys_compile_type_range(struct lysc_ctx *ctx, struct lysp_restr *range_p, LY_DATA_TYPE basetype, int length_restr,
+lys_compile_type_range(struct lysc_ctx *ctx, struct lysp_restr *range_p, LY_DATA_TYPE basetype, uint8_t length_restr,
         uint8_t frdigits, struct lysc_range *base_range, struct lysc_range **range)
 {
     LY_ERR ret = LY_EVALID;
     const char *expr;
     struct lysc_range_part *parts = NULL, *part;
-    int range_expected = 0, uns;
+    uint8_t range_expected = 0, uns;
     LY_ARRAY_COUNT_TYPE parts_done = 0, u, v;
 
     assert(range);
@@ -1927,7 +1927,7 @@
 LY_ERR
 lys_compile_type_pattern_check(struct ly_ctx *ctx, const char *log_path, const char *pattern, pcre2_code **code)
 {
-    int idx, idx2, start, end, size, brack;
+    size_t idx, idx2, start, end, size, brack;
     char *perl_regex, *ptr;
     int err_code;
     const char *orig_ptr;
@@ -2395,9 +2395,9 @@
  */
 LY_ERR
 lys_path_token(const char **path, const char **prefix, size_t *prefix_len, const char **name, size_t *name_len,
-        int *parent_times, int *has_predicate)
+        int32_t *parent_times, uint8_t *has_predicate)
 {
-    int par_times = 0;
+    int32_t par_times = 0;
 
     assert(path && *path);
     assert(parent_times);
@@ -2467,7 +2467,8 @@
 {
     LY_ERR ret = LY_EVALID;
     const struct lysc_node *iter;
-    LY_ARRAY_COUNT_TYPE u, v, count;
+    LY_ARRAY_COUNT_TYPE u, v;
+    uint32_t count;
     struct ly_set features = {0};
 
     for (iter = refnode; iter; iter = iter->parent) {
@@ -2489,7 +2490,7 @@
         if (iter->iffeatures) {
             LY_ARRAY_FOR(iter->iffeatures, u) {
                 LY_ARRAY_FOR(iter->iffeatures[u].features, v) {
-                    if ((unsigned int)ly_set_add(&features, iter->iffeatures[u].features[v], 0) >= count) {
+                    if ((uint32_t)ly_set_add(&features, iter->iffeatures[u].features[v], 0) >= count) {
                         /* new feature was added (or LY_EMEM) */
                         goto cleanup;
                     }
@@ -2917,8 +2918,7 @@
         struct lysc_type **type, const char **units, const char **dflt, struct lys_module **dflt_mod)
 {
     LY_ERR ret = LY_SUCCESS;
-    unsigned int u;
-    int dummyloops = 0;
+    uint8_t dummyloops = 0;
     struct type_context {
         const struct lysp_tpdf *tpdf;
         struct lysp_node *node;
@@ -2981,7 +2981,7 @@
         }
 
         /* circular typedef reference detection */
-        for (u = 0; u < tpdf_chain.count; u++) {
+        for (uint32_t u = 0; u < tpdf_chain.count; u++) {
             /* local part */
             tctx_iter = (struct type_context *)tpdf_chain.objs[u];
             if (tctx_iter->mod == tctx->mod && tctx_iter->node == tctx->node && tctx_iter->tpdf == tctx->tpdf) {
@@ -2992,7 +2992,7 @@
                 goto cleanup;
             }
         }
-        for (u = 0; u < ctx->tpdf_chain.count; u++) {
+        for (uint32_t u = 0; u < ctx->tpdf_chain.count; u++) {
             /* global part for unions corner case */
             tctx_iter = (struct type_context *)ctx->tpdf_chain.objs[u];
             if (tctx_iter->mod == tctx->mod && tctx_iter->node == tctx->node && tctx_iter->tpdf == tctx->tpdf) {
@@ -3075,7 +3075,7 @@
     }
 
     /* get restrictions from the referred typedefs */
-    for (u = tpdf_chain.count - 1; u + 1 > 0; --u) {
+    for (uint32_t u = tpdf_chain.count - 1; u + 1 > 0; --u) {
         tctx = (struct type_context *)tpdf_chain.objs[u];
 
         /* remember the typedef context for circular check */
@@ -3249,8 +3249,8 @@
 {
     LY_ERR ret = LY_SUCCESS;
     struct lysp_node *child_p;
-    unsigned int u;
-    int opt_prev = ctx->options;
+    LY_ARRAY_COUNT_TYPE u;
+    uint32_t opt_prev = ctx->options;
 
     lysc_update_path(ctx, parent, action_p->name);
 
@@ -3334,8 +3334,8 @@
 {
     LY_ERR ret = LY_SUCCESS;
     struct lysp_node *child_p;
-    unsigned int u;
-    int opt_prev = ctx->options;
+    LY_ARRAY_COUNT_TYPE u;
+    uint32_t opt_prev = ctx->options;
 
     lysc_update_path(ctx, parent, notif_p->name);
 
@@ -3597,7 +3597,7 @@
     const char *keystr, *delim;
     size_t len;
     LY_ARRAY_COUNT_TYPE v;
-    int config;
+    int8_t config; /* -1 - not yet seen; 0 - LYS_CONFIG_R; 1 - LYS_CONFIG_W */
     uint16_t flags;
 
     for (v = 0; v < LY_ARRAY_COUNT(uniques); ++v) {
@@ -3685,7 +3685,7 @@
     struct lysp_node *child_p;
     struct lysc_node_leaf *key, *prev_key = NULL;
     size_t len;
-    unsigned int u;
+    LY_ARRAY_COUNT_TYPE u;
     const char *keystr, *delim;
     LY_ERR ret = LY_SUCCESS;
 
@@ -3998,7 +3998,7 @@
 {
     struct lysp_node_anydata *any_p = (struct lysp_node_anydata *)node_p;
     struct lysc_node_anydata *any = (struct lysc_node_anydata *)node;
-    unsigned int u;
+    LY_ARRAY_COUNT_TYPE u;
     LY_ERR ret = LY_SUCCESS;
 
     COMPILE_ARRAY_GOTO(ctx, any_p->musts, any->musts, u, lys_compile_must, ret, done);
@@ -4103,7 +4103,7 @@
     struct lysc_node *iter;
     struct lysc_node_case *cs = NULL;
     struct lysc_when **when;
-    unsigned int u;
+    LY_ARRAY_COUNT_TYPE u;
     LY_ERR ret;
 
 #define UNIQUE_CHECK(NAME, MOD) \
@@ -4184,7 +4184,7 @@
  */
 static LY_ERR
 lys_compile_change_config(struct lysc_ctx *ctx, struct lysc_node *node, uint16_t config_flag,
-        int inheriting, int refine_flag)
+        uint8_t inheriting, uint8_t refine_flag)
 {
     struct lysc_node *child;
     uint16_t config = config_flag & LYS_CONFIG_MASK;
@@ -4238,8 +4238,8 @@
  * @param[in] add Flag to distinguish adding the mandatory flag (new mandatory children appeared) or removing the flag
  * (mandatory children was removed).
  */
-void
-lys_compile_mandatory_parents(struct lysc_node *parent, int add)
+static void
+lys_compile_mandatory_parents(struct lysc_node *parent, uint8_t add)
 {
     struct lysc_node *iter;
 
@@ -4364,10 +4364,10 @@
     struct lysc_node *node;
     struct lysc_when **when, *when_shared;
     struct lys_module **aug_mod;
-    int allow_mandatory = 0;
+    uint8_t allow_mandatory = 0;
     uint16_t flags = 0;
     LY_ARRAY_COUNT_TYPE u, v;
-    int opt_prev = ctx->options;
+    uint32_t opt_prev = ctx->options;
 
     lysc_update_path(ctx, NULL, "{augment}");
     lysc_update_path(ctx, NULL, aug_p->nodeid);
@@ -4531,7 +4531,7 @@
  * @return LY_ERR value.
  */
 static LY_ERR
-lys_compile_change_mandatory(struct lysc_ctx *ctx, struct lysc_node *node, uint16_t mandatory_flag, int refine_flag)
+lys_compile_change_mandatory(struct lysc_ctx *ctx, struct lysc_node *node, uint16_t mandatory_flag, uint8_t refine_flag)
 {
     if (!(node->nodetype & (LYS_LEAF | LYS_ANYDATA | LYS_ANYXML | LYS_CHOICE))) {
         LOGVAL(ctx->ctx, LY_VLOG_STR, ctx->path, LYVE_SEMANTICS,
@@ -4601,7 +4601,7 @@
     struct lysp_grp *grp = NULL;
     LY_ARRAY_COUNT_TYPE u, v;
     uint32_t grp_stack_count;
-    int found;
+    uint8_t found = 0;
     const char *id, *name, *prefix;
     size_t prefix_len, name_len;
     struct lys_module *mod, *mod_old;
@@ -4617,7 +4617,6 @@
     struct lysc_action **actions = NULL;
 
     /* search for the grouping definition */
-    found = 0;
     id = uses_p->name;
     LY_CHECK_RET(ly_parse_nodeid(&id, &prefix, &prefix_len, &name, &name_len), LY_EVALID);
     if (prefix) {
@@ -5120,7 +5119,7 @@
         return LY_EMEM;
     }
     strncpy(ctx->path, path, LYSC_CTX_BUFSIZE - 1);
-    ctx->path_len = (uint16_t)len;
+    ctx->path_len = (uint32_t)len;
     free(path);
 
     lysc_update_path(ctx, NULL, "{grouping}");
@@ -5156,7 +5155,7 @@
     struct lysc_node *node = NULL;
     struct lysc_node_case *cs = NULL;
     struct lysc_when **when;
-    unsigned int u;
+    LY_ARRAY_COUNT_TYPE u;
     LY_ERR (*node_compile_spec)(struct lysc_ctx *, struct lysp_node *, struct lysc_node *);
 
     if (node_p->nodetype != LYS_USES) {
@@ -5354,7 +5353,7 @@
     struct lysc_node *parent, *child, *prev = NULL, *next;
     struct lysc_node_case *cs = NULL;
     struct lysc_module *modc = node->module->compiled;
-    int remove_cs = 0;
+    uint8_t remove_cs = 0;
 
     parent = node->parent;
 
@@ -5485,7 +5484,7 @@
  * @return LY_ERR value.
  */
 static LY_ERR
-lys_apply_deviate_add(struct lysc_ctx *ctx, struct lysc_node *target, int dev_flags, struct lysp_deviate_add *d)
+lys_apply_deviate_add(struct lysc_ctx *ctx, struct lysc_node *target, uint32_t dev_flags, struct lysp_deviate_add *d)
 {
     LY_ERR ret = LY_EVALID;
     struct lysc_node_leaf *leaf = (struct lysc_node_leaf *)target;
@@ -5502,7 +5501,7 @@
 
 #define DEV_CHECK_NONPRESENCE_VALUE(TYPE, COND, MEMBER, PROPERTY, VALUEMEMBER) \
     if (((TYPE)target)->MEMBER && (COND)) { \
-        int dynamic_ = 0; const char *val_; \
+        uint8_t dynamic_ = 0; const char *val_; \
         val_ = ((TYPE)target)->VALUEMEMBER->realtype->plugin->print(((TYPE)target)->VALUEMEMBER, LY_PREF_SCHEMA, \
                                                                              ctx->mod_def, &dynamic_); \
         LOGVAL(ctx->ctx, LY_VLOG_STR, ctx->path, LYVE_REFERENCE, \
@@ -5700,7 +5699,7 @@
 lys_apply_deviate_delete_leaf_dflt(struct lysc_ctx *ctx, struct lysc_node *target, const char *dflt)
 {
     struct lysc_node_leaf *leaf = (struct lysc_node_leaf *)target;
-    int dyn = 0;
+    uint8_t dyn = 0;
     const char *orig_dflt;
     uint32_t i;
 
@@ -5763,7 +5762,7 @@
 lys_apply_deviate_delete_llist_dflts(struct lysc_ctx *ctx, struct lysc_node *target, const char **dflts)
 {
     struct lysc_node_leaflist *llist = (struct lysc_node_leaflist *)target;
-    int dyn = 0, found;
+    uint8_t dyn = 0, found;
     const char *orig_dflt, **orig_dflts;
     uint32_t i;
     LY_ARRAY_COUNT_TYPE x, y;
@@ -5864,7 +5863,7 @@
  * @return LY_ERR value.
  */
 static LY_ERR
-lys_apply_deviate_delete(struct lysc_ctx *ctx, struct lysc_node *target, int dev_flags, struct lysp_deviate_del *d)
+lys_apply_deviate_delete(struct lysc_ctx *ctx, struct lysc_node *target, uint32_t dev_flags, struct lysp_deviate_del *d)
 {
     LY_ERR ret = LY_EVALID;
     struct lysc_node_list *list = (struct lysc_node_list *)target;
@@ -6049,7 +6048,7 @@
     struct ly_err_item *err = NULL;
     LY_ARRAY_COUNT_TYPE x;
     const char *dflt;
-    int dyn;
+    uint8_t dyn;
 
     if (target->module != ctx->mod) {
         /* foreign deviation */
@@ -6475,6 +6474,7 @@
         }
         /* insert into the set of targets with duplicity detection */
         i = ly_set_add(&targets, target, 0);
+        LY_CHECK_ERR_GOTO(i < 0, ret = LY_EMEM, cleanup);
         if (!devs[i]) {
             /* new record */
             devs[i] = calloc(1, sizeof **devs);
@@ -6549,7 +6549,7 @@
 LY_ERR
 lys_compile_submodule(struct lysc_ctx *ctx, struct lysp_include *inc)
 {
-    unsigned int u;
+    LY_ARRAY_COUNT_TYPE u;
     LY_ERR ret = LY_SUCCESS;
     /* shortcuts */
     struct lysp_submodule *submod = inc->submodule;
@@ -6585,7 +6585,7 @@
 static void *
 lys_compile_extension_instance_storage(enum ly_stmt stmt, struct lysc_ext_substmt *substmts)
 {
-    for (unsigned int u = 0; substmts[u].stmt; ++u) {
+    for (LY_ARRAY_COUNT_TYPE u = 0; substmts[u].stmt; ++u) {
         if (substmts[u].stmt == stmt) {
             return substmts[u].storage;
         }
@@ -6597,7 +6597,7 @@
 lys_compile_extension_instance(struct lysc_ctx *ctx, const struct lysp_ext_instance *ext, struct lysc_ext_substmt *substmts)
 {
     LY_ERR ret = LY_EVALID, r;
-    unsigned int u;
+    LY_ARRAY_COUNT_TYPE u;
     struct lysp_stmt *stmt;
     void *parsed = NULL, **compiled = NULL;
 
@@ -6623,7 +6623,7 @@
     /* keep order of the processing the same as the order in the defined substmts,
      * the order is important for some of the statements depending on others (e.g. type needs status and units) */
     for (u = 0; substmts[u].stmt; ++u) {
-        int stmt_present = 0;
+        uint8_t stmt_present = 0;
 
         for (stmt = ext->child; stmt; stmt = stmt->next) {
             if (substmts[u].stmt != stmt->kw) {
@@ -6735,7 +6735,6 @@
     struct lyxp_set_scnode *xp_scnode;
     uint32_t i, j;
     LY_ARRAY_COUNT_TYPE u;
-    int idx;
     struct lysc_when *when;
     LY_ERR ret = LY_SUCCESS;
 
@@ -6780,7 +6779,7 @@
                     /* skip roots'n'stuff */
                     if (tmp_set.val.scnodes[j].type == LYXP_NODE_ELEM) {
                         /* try to find this node in our set */
-                        idx = lyxp_set_scnode_dup_node_check(set, tmp_set.val.scnodes[j].scnode, LYXP_NODE_ELEM, -1);
+                        int idx = lyxp_set_scnode_dup_node_check(set, tmp_set.val.scnodes[j].scnode, LYXP_NODE_ELEM, -1);
                         if ((idx > -1) && (set->val.scnodes[idx].in_ctx == -1)) {
                             LOGVAL(set->ctx, LY_VLOG_LYSC, node, LY_VCODE_CIRC_WHEN, node->name, set->val.scnodes[idx].scnode->name);
                             ret = LY_EVALID;
@@ -6824,7 +6823,8 @@
     struct lyxp_set tmp_set;
     uint32_t i;
     LY_ARRAY_COUNT_TYPE u;
-    int opts, input_done = 0;
+    uint32_t opts;
+    uint8_t input_done = 0;
     struct lysc_when **when = NULL;
     struct lysc_must *musts = NULL;
     LY_ERR ret = LY_SUCCESS;
@@ -7157,7 +7157,7 @@
         for (u = orig_count; u < LY_ARRAY_COUNT(llist->dflts); ++u) {
             for (v = 0; v < u; ++v) {
                 if (!llist->dflts[u]->realtype->plugin->compare(llist->dflts[u], llist->dflts[v])) {
-                    int dynamic = 0;
+                    uint8_t dynamic = 0;
                     const char *val = llist->type->plugin->print(llist->dflts[u], LY_PREF_SCHEMA, (void *)dflt_mod, &dynamic);
 
                     lysc_update_path(ctx, llist->parent, llist->name);
@@ -7242,7 +7242,7 @@
 }
 
 LY_ERR
-lys_compile(struct lys_module **mod, int options)
+lys_compile(struct lys_module **mod, uint32_t options)
 {
     struct lysc_ctx ctx = {0};
     struct lysc_module *mod_c;
diff --git a/src/tree_schema_free.c b/src/tree_schema_free.c
index 3259bd6..062b993 100644
--- a/src/tree_schema_free.c
+++ b/src/tree_schema_free.c
@@ -880,7 +880,7 @@
 API void
 lysc_extension_instance_free(struct ly_ctx *ctx, struct lysc_ext_substmt *substmts)
 {
-    for (unsigned int u = 0; substmts[u].stmt; ++u) {
+    for (LY_ARRAY_COUNT_TYPE u = 0; substmts[u].stmt; ++u) {
         if (!substmts[u].storage) {
             continue;
         }
diff --git a/src/tree_schema_helpers.c b/src/tree_schema_helpers.c
index 4fbf992..260921a 100644
--- a/src/tree_schema_helpers.c
+++ b/src/tree_schema_helpers.c
@@ -36,7 +36,7 @@
 
 LY_ERR
 lysc_resolve_schema_nodeid(struct lysc_ctx *ctx, const char *nodeid, size_t nodeid_len, const struct lysc_node *context_node,
-        const struct lys_module *context_module, int nodetype, int implement,
+        const struct lys_module *context_module, uint16_t nodetype, uint8_t implement,
         const struct lysc_node **target, uint16_t *result_flag)
 {
     LY_ERR ret = LY_EVALID;
@@ -44,8 +44,8 @@
     size_t name_len, prefix_len;
     const struct lys_module *mod;
     const char *nodeid_type;
-    int getnext_extra_flag = 0;
-    int current_nodetype = 0;
+    uint32_t getnext_extra_flag = 0;
+    uint16_t current_nodetype = 0;
 
     assert(nodeid);
     assert(target);
@@ -193,9 +193,8 @@
 }
 
 LY_ERR
-lysp_check_date(struct lys_parser_ctx *ctx, const char *date, int date_len, const char *stmt)
+lysp_check_date(struct lys_parser_ctx *ctx, const char *date, uint8_t date_len, const char *stmt)
 {
-    int i;
     struct tm tm, tm_;
     char *r;
 
@@ -203,7 +202,7 @@
     LY_CHECK_ERR_RET(date_len != LY_REV_SIZE - 1, LOGARG(ctx ? PARSER_CTX(ctx) : NULL, date_len), LY_EINVAL);
 
     /* check format */
-    for (i = 0; i < date_len; i++) {
+    for (uint8_t i = 0; i < date_len; i++) {
         if (i == 4 || i == 7) {
             if (date[i] != '-') {
                 goto error;
@@ -524,10 +523,10 @@
     return LY_SUCCESS;
 }
 
-static int
-lysp_id_cmp(void *val1, void *val2, int UNUSED(mod), void *UNUSED(cb_data))
+static uint8_t
+lysp_id_cmp(void *val1, void *val2, uint8_t UNUSED(mod), void *UNUSED(cb_data))
 {
-    return !strcmp(val1, val2);
+    return strcmp(val1, val2) == 0 ? 1 : 0;
 }
 
 LY_ERR
@@ -745,8 +744,8 @@
 }
 
 LY_ERR
-lys_module_localfile(struct ly_ctx *ctx, const char *name, const char *revision, int implement,
-        struct lys_parser_ctx *main_ctx, const char *main_name, int required, void **result)
+lys_module_localfile(struct ly_ctx *ctx, const char *name, const char *revision, uint8_t implement,
+        struct lys_parser_ctx *main_ctx, const char *main_name, uint8_t required, void **result)
 {
     struct ly_in *in;
     char *filepath = NULL;
@@ -804,7 +803,7 @@
 }
 
 LY_ERR
-lysp_load_module(struct ly_ctx *ctx, const char *name, const char *revision, int implement, int require_parsed,
+lysp_load_module(struct ly_ctx *ctx, const char *name, const char *revision, uint8_t implement, uint8_t require_parsed,
         struct lys_module **mod)
 {
     const char *module_data = NULL;
@@ -930,7 +929,7 @@
 }
 
 LY_ERR
-lysp_check_stringchar(struct lys_parser_ctx *ctx, unsigned int c)
+lysp_check_stringchar(struct lys_parser_ctx *ctx, uint32_t c)
 {
     if (!is_yangutf8char(c)) {
         LOGVAL_PARSER(ctx, LY_VCODE_INCHAR, c);
@@ -940,11 +939,11 @@
 }
 
 LY_ERR
-lysp_check_identifierchar(struct lys_parser_ctx *ctx, unsigned int c, int first, int *prefix)
+lysp_check_identifierchar(struct lys_parser_ctx *ctx, uint32_t c, uint8_t first, uint8_t *prefix)
 {
     if (first || (prefix && (*prefix) == 1)) {
         if (!is_yangidentstartchar(c)) {
-            LOGVAL_PARSER(ctx, LYVE_SYNTAX_YANG, "Invalid identifier first character '%c'.", c);
+            LOGVAL_PARSER(ctx, LYVE_SYNTAX_YANG, "Invalid identifier first character '%c' (0x%04x).", (char)c, c);
             return LY_EVALID;
         }
         if (prefix) {
@@ -957,7 +956,7 @@
     } else if (c == ':' && prefix && (*prefix) == 0) {
         (*prefix) = 1;
     } else if (!is_yangidentchar(c)) {
-        LOGVAL_PARSER(ctx, LYVE_SYNTAX_YANG, "Invalid identifier character '%c'.", c);
+        LOGVAL_PARSER(ctx, LYVE_SYNTAX_YANG, "Invalid identifier character '%c' (0x%04x).", (char)c, c);
         return LY_EVALID;
     }
 
@@ -1403,9 +1402,7 @@
 struct lys_module *
 lysp_find_module(struct ly_ctx *ctx, const struct lysp_module *mod)
 {
-    unsigned int u;
-
-    for (u = 0; u < ctx->list.count; ++u) {
+    for (uint32_t u = 0; u < ctx->list.count; ++u) {
         if (((struct lys_module *)ctx->list.objs[u])->parsed == mod) {
             return ((struct lys_module *)ctx->list.objs[u]);
         }
@@ -1651,7 +1648,7 @@
     return parent;
 }
 
-int
+uint8_t
 lysc_is_output(const struct lysc_node *schema)
 {
     const struct lysc_node *parent;
@@ -1665,7 +1662,7 @@
     return 0;
 }
 
-API int
+API uint8_t
 lysc_is_userordered(const struct lysc_node *schema)
 {
     if (!schema || !(schema->nodetype & (LYS_LEAFLIST | LYS_LIST)) || !(schema->flags & LYS_ORDBY_USER)) {
diff --git a/src/tree_schema_internal.h b/src/tree_schema_internal.h
index 4e16e0c..e0b46b3 100644
--- a/src/tree_schema_internal.h
+++ b/src/tree_schema_internal.h
@@ -184,8 +184,8 @@
     struct ly_set leafrefs;     /**< when/must to check */
     struct ly_set dflts;        /**< set of incomplete default values */
     struct ly_set tpdf_chain;
-    uint16_t path_len;
-    int options;                /**< various @ref scflags. */
+    uint32_t path_len;
+    uint32_t options;           /**< various @ref scflags. */
 #define LYSC_CTX_BUFSIZE 4078
     char path[LYSC_CTX_BUFSIZE];
 };
@@ -197,7 +197,7 @@
  * @param[in] c UTF8 code point of a character to check.
  * @return LY_ERR values.
  */
-LY_ERR lysp_check_stringchar(struct lys_parser_ctx *ctx, unsigned int c);
+LY_ERR lysp_check_stringchar(struct lys_parser_ctx *ctx, uint32_t c);
 
 /**
  * @brief Check that \p c is valid UTF8 code point for YANG identifier.
@@ -213,7 +213,7 @@
  * If the identifier cannot be prefixed, NULL is expected.
  * @return LY_ERR values.
  */
-LY_ERR lysp_check_identifierchar(struct lys_parser_ctx *ctx, unsigned int c, int first, int *prefix);
+LY_ERR lysp_check_identifierchar(struct lys_parser_ctx *ctx, uint32_t c, uint8_t first, uint8_t *prefix);
 
 /**
  * @brief Check the currently present prefixes in the module for collision with the new one.
@@ -235,7 +235,7 @@
  * @param[in] stmt Statement name for error message.
  * @return LY_ERR value.
  */
-LY_ERR lysp_check_date(struct lys_parser_ctx *ctx, const char *date, int date_len, const char *stmt);
+LY_ERR lysp_check_date(struct lys_parser_ctx *ctx, const char *date, uint8_t date_len, const char *stmt);
 
 /**
  * @brief Check names of typedefs in the parsed module to detect collisions.
@@ -304,7 +304,7 @@
  * @param[out] mod Parsed module structure.
  * @return LY_ERR value.
  */
-LY_ERR lysp_load_module(struct ly_ctx *ctx, const char *name, const char *revision, int implement, int require_parsed, struct lys_module **mod);
+LY_ERR lysp_load_module(struct ly_ctx *ctx, const char *name, const char *revision, uint8_t implement, uint8_t require_parsed, struct lys_module **mod);
 
 /**
  * @brief Parse included submodule into the simply parsed YANG module.
@@ -325,7 +325,7 @@
  * @param[in] options Various options to modify compiler behavior, see [compile flags](@ref scflags).
  * @return LY_ERR value - LY_SUCCESS or LY_EVALID.
  */
-LY_ERR lys_compile(struct lys_module **mod, int options);
+LY_ERR lys_compile(struct lys_module **mod, uint32_t options);
 
 /**
  * @brief Get address of a node's actions list if any.
@@ -443,7 +443,7 @@
  * @return LY_ERR values - LY_ENOTFOUND, LY_EVALID, LY_EDENIED or LY_SUCCESS.
  */
 LY_ERR lysc_resolve_schema_nodeid(struct lysc_ctx *ctx, const char *nodeid, size_t nodeid_len, const struct lysc_node *context_node,
-        const struct lys_module *context_module, int nodetype, int implement,
+        const struct lys_module *context_module, uint16_t nodetype, uint8_t implement,
         const struct lysc_node **target, uint16_t *result_flag);
 
 /**
@@ -496,7 +496,7 @@
  * @param[out] module Parsed module.
  * @return LY_ERR value.
  */
-LY_ERR lys_parse_mem_module(struct ly_ctx *ctx, struct ly_in *in, LYS_INFORMAT format, int implement,
+LY_ERR lys_parse_mem_module(struct ly_ctx *ctx, struct ly_in *in, LYS_INFORMAT format, uint8_t implement,
         lys_custom_check custom_check, void *check_data, struct lys_module **module);
 
 /**
@@ -545,8 +545,8 @@
  * If it is a module, it is already in the context!
  * @return LY_ERR value, in case of LY_SUCCESS, the \arg result is always provided.
  */
-LY_ERR lys_module_localfile(struct ly_ctx *ctx, const char *name, const char *revision, int implement,
-        struct lys_parser_ctx *main_ctx, const char *main_name, int required, void **result);
+LY_ERR lys_module_localfile(struct ly_ctx *ctx, const char *name, const char *revision, uint8_t implement,
+        struct lys_parser_ctx *main_ctx, const char *main_name, uint8_t required, void **result);
 
 /**
  * @brief Compile information from the identity statement
@@ -595,7 +595,7 @@
  * @param[in] list The 2bits array with the compiled if-feature expression.
  * @param[in] pos Position (0-based) to specify from which position get the operator.
  */
-uint8_t lysc_iff_getop(uint8_t *list, int pos);
+uint8_t lysc_iff_getop(uint8_t *list, size_t pos);
 
 /**
  * @brief Checks pattern syntax.
@@ -781,12 +781,12 @@
 const struct lysc_node *lysc_data_parent(const struct lysc_node *schema);
 
 /**
- * @brief Learn whether a node is in an operation output.
+ * @brief Learn whether a node is inside an operation output.
  *
  * @param[in] schema Schema node to examine.
- * @return non-zero is the node is in output,
  * @return 0 if it is not.
+ * @return 1 if the node is under an operation output
  */
-int lysc_is_output(const struct lysc_node *schema);
+uint8_t lysc_is_output(const struct lysc_node *schema);
 
 #endif /* LY_TREE_SCHEMA_INTERNAL_H_ */
diff --git a/src/validation.c b/src/validation.c
index 3bf851d..1a9dcee 100644
--- a/src/validation.c
+++ b/src/validation.c
@@ -126,7 +126,7 @@
                 /* evaluate all when expressions that affect this node's existence */
                 struct lyd_node *node = (struct lyd_node *)node_when->objs[i];
                 const struct lysc_node *schema = node->schema;
-                int unres_when = 0;
+                uint8_t unres_when = 0;
 
                 do {
                     LY_ARRAY_COUNT_TYPE u;
@@ -213,7 +213,7 @@
 lyd_validate_duplicates(const struct lyd_node *first, const struct lyd_node *node)
 {
     struct lyd_node **match_p;
-    int fail = 0;
+    uint8_t fail = 0;
 
     if ((node->schema->nodetype & (LYS_LIST | LYS_LEAFLIST)) && (node->schema->flags & LYS_CONFIG_R)) {
         /* duplicate instances allowed */
@@ -263,7 +263,7 @@
 {
     const struct lysc_node *scase, *iter, *old_case = NULL, *new_case = NULL;
     struct lyd_node *match, *to_del;
-    int found;
+    uint8_t found;
 
     LY_LIST_FOR((struct lysc_node *)choic->cases, scase) {
         found = 0;
@@ -565,8 +565,8 @@
  *
  * @param[in] cb_data 0 to compare all uniques, n to compare only n-th unique.
  */
-static int
-lyd_val_uniq_list_equal(void *val1_p, void *val2_p, int UNUSED(mod), void *cb_data)
+static uint8_t
+lyd_val_uniq_list_equal(void *val1_p, void *val2_p, uint8_t UNUSED(mod), void *cb_data)
 {
     struct ly_ctx *ctx;
     struct lysc_node_list *slist;
@@ -677,7 +677,7 @@
     LY_ARRAY_COUNT_TYPE u, v, x = 0;
     LY_ERR ret = LY_SUCCESS;
     uint32_t hash, i, size = 0;
-    int dynamic;
+    uint8_t dynamic;
     const char *str;
     struct hash_table **uniqtables = NULL;
     struct lyd_value *val;
@@ -792,12 +792,12 @@
  */
 static LY_ERR
 lyd_validate_siblings_schema_r(const struct lyd_node *first, const struct lysc_node *sparent,
-        const struct lysc_module *mod, int val_opts, LYD_VALIDATE_OP op)
+        const struct lysc_module *mod, uint32_t val_opts, LYD_VALIDATE_OP op)
 {
     const struct lysc_node *snode = NULL;
     struct lysc_node_list *slist;
     struct lysc_node_leaflist *sllist;
-    int getnext_opts;
+    uint32_t getnext_opts;
 
     getnext_opts = LYS_GETNEXT_WITHCHOICE | LYS_GETNEXT_WITHCASE | (op == LYD_VALIDATE_OP_REPLY ? LYS_GETNEXT_OUTPUT : 0);
 
@@ -943,7 +943,7 @@
 }
 
 LY_ERR
-lyd_validate_final_r(struct lyd_node *first, const struct lysc_node *sparent, const struct lys_module *mod, int val_opts,
+lyd_validate_final_r(struct lyd_node *first, const struct lysc_node *sparent, const struct lys_module *mod, uint32_t val_opts,
         LYD_VALIDATE_OP op)
 {
     struct lyd_node *next = NULL, *node;
@@ -1026,7 +1026,7 @@
  */
 static LY_ERR
 lyd_validate_subtree(struct lyd_node *root, struct ly_set *type_check, struct ly_set *type_meta_check,
-        struct ly_set *when_check, int val_opts, struct lyd_node **diff)
+        struct ly_set *when_check, uint32_t val_opts, struct lyd_node **diff)
 {
     const struct lyd_meta *meta;
     struct lyd_node *node;
@@ -1076,7 +1076,7 @@
  * @return LY_ERR value.
  */
 static LY_ERR
-lyd_validate(struct lyd_node **tree, const struct lys_module *module, const struct ly_ctx *ctx, int val_opts,
+lyd_validate(struct lyd_node **tree, const struct lys_module *module, const struct ly_ctx *ctx, uint32_t val_opts,
         struct lyd_node **diff)
 {
     LY_ERR ret = LY_SUCCESS;
@@ -1139,13 +1139,13 @@
 }
 
 API LY_ERR
-lyd_validate_all(struct lyd_node **tree, const struct ly_ctx *ctx, int val_opts, struct lyd_node **diff)
+lyd_validate_all(struct lyd_node **tree, const struct ly_ctx *ctx, uint32_t val_opts, struct lyd_node **diff)
 {
     return lyd_validate(tree, NULL, ctx, val_opts, diff);
 }
 
 API LY_ERR
-lyd_validate_module(struct lyd_node **tree, const struct lys_module *module, int val_opts, struct lyd_node **diff)
+lyd_validate_module(struct lyd_node **tree, const struct lys_module *module, uint32_t val_opts, struct lyd_node **diff)
 {
     return lyd_validate(tree, module, NULL, val_opts, diff);
 }
diff --git a/src/validation.h b/src/validation.h
index 4cdf277..1a1a00a 100644
--- a/src/validation.h
+++ b/src/validation.h
@@ -74,6 +74,6 @@
  * @return LY_ERR value.
  */
 LY_ERR lyd_validate_final_r(struct lyd_node *first, const struct lysc_node *sparent, const struct lys_module *mod,
-        int val_opts, LYD_VALIDATE_OP op);
+        uint32_t val_opts, LYD_VALIDATE_OP op);
 
 #endif /* LY_VALIDATION_H_ */
diff --git a/src/xml.c b/src/xml.c
index 933fa52..ad4f54e 100644
--- a/src/xml.c
+++ b/src/xml.c
@@ -38,16 +38,16 @@
 /* Ignore whitespaces in the input string p */
 #define ign_xmlws(c) while (is_xmlws(*(c)->in->current)) {if (*(c)->in->current == '\n') {++c->line;} ly_in_skip(c->in, 1);}
 
-static LY_ERR lyxml_next_attr_content(struct lyxml_ctx *xmlctx, const char **value, size_t *value_len, int *ws_only,
-        int *dynamic);
+static LY_ERR lyxml_next_attr_content(struct lyxml_ctx *xmlctx, const char **value, size_t *value_len, uint8_t *ws_only,
+        uint8_t *dynamic);
 
 /**
  * @brief Ignore any characters until the delim of the size delim_len is read
  *
  * Detects number of read new lines.
- * Returns 0 if delim was found, non-zero if was not.
+ * Returns 0 if delim was found, 1 if was not.
  */
-static int
+static uint8_t
 ign_todelim(register const char *input, const char *delim, size_t delim_len, size_t *newlines, size_t *parsed)
 {
     size_t i;
@@ -76,7 +76,7 @@
     }
 
     /* delim not found */
-    return -1;
+    return 1;
 }
 
 /**
@@ -176,9 +176,7 @@
 void
 lyxml_ns_rm(struct lyxml_ctx *xmlctx)
 {
-    unsigned int u;
-
-    for (u = xmlctx->ns.count - 1; u + 1 > 0; --u) {
+    for (uint32_t u = xmlctx->ns.count - 1; u + 1 > 0; --u) {
         if (((struct lyxml_ns *)xmlctx->ns.objs[u])->depth != xmlctx->elements.count + 1) {
             /* we are done, the namespaces from a single element are supposed to be together */
             break;
@@ -199,10 +197,9 @@
 const struct lyxml_ns *
 lyxml_ns_get(const struct ly_set *ns_set, const char *prefix, size_t prefix_len)
 {
-    unsigned int u;
     struct lyxml_ns *ns;
 
-    for (u = ns_set->count - 1; u + 1 > 0; --u) {
+    for (uint32_t u = ns_set->count - 1; u + 1 > 0; --u) {
         ns = (struct lyxml_ns *)ns_set->objs[u];
         if (prefix && prefix_len) {
             if (ns->prefix && !ly_strncmp(ns->prefix, prefix, prefix_len)) {
@@ -230,7 +227,7 @@
     const struct ly_ctx *ctx = xmlctx->ctx; /* shortcut */
     const char *endtag, *sectname;
     size_t endtag_len, newlines, parsed;
-    int rc;
+    uint8_t rc;
 
     while (1) {
         ign_xmlws(xmlctx);
@@ -336,7 +333,7 @@
  * @return LY_ERR value.
  */
 static LY_ERR
-lyxml_parse_value(struct lyxml_ctx *xmlctx, char endchar, char **value, size_t *length, int *ws_only, int *dynamic)
+lyxml_parse_value(struct lyxml_ctx *xmlctx, char endchar, char **value, size_t *length, uint8_t *ws_only, uint8_t *dynamic)
 {
 #define BUFSIZE 24
 #define BUFSIZE_STEP 128
@@ -350,7 +347,7 @@
     void *p;
     uint32_t n;
     size_t u;
-    int ws = 1;
+    uint8_t ws = 1;
 
     assert(xmlctx);
 
@@ -519,7 +516,7 @@
  */
 static LY_ERR
 lyxml_close_element(struct lyxml_ctx *xmlctx, const char *prefix, size_t prefix_len, const char *name, size_t name_len,
-        int empty)
+        uint8_t empty)
 {
     struct lyxml_elem *e;
 
@@ -585,7 +582,7 @@
     const char *prev_input;
     char *value;
     size_t parsed, value_len;
-    int ws_only, dynamic, is_ns;
+    uint8_t ws_only, dynamic, is_ns;
     uint32_t c;
 
     /* store element opening tag information */
@@ -652,7 +649,7 @@
  * @return LY_ERR value.
  */
 static LY_ERR
-lyxml_next_attr_content(struct lyxml_ctx *xmlctx, const char **value, size_t *value_len, int *ws_only, int *dynamic)
+lyxml_next_attr_content(struct lyxml_ctx *xmlctx, const char **value, size_t *value_len, uint8_t *ws_only, uint8_t *dynamic)
 {
     char quot;
 
@@ -713,7 +710,7 @@
     char *value;
     uint32_t c;
     size_t parsed, value_len;
-    int ws_only, dynamic;
+    uint8_t ws_only, dynamic;
 
     /* skip WS */
     ign_xmlws(xmlctx);
@@ -759,11 +756,12 @@
  * @param[out] prefix_len Length of @p prefix.
  * @param[out] name Parse element name.
  * @param[out] name_len Length of @p name.
+ * @param[out] closing Flag if the element is closing (includes '/').
  * @return LY_ERR value.
  */
 static LY_ERR
 lyxml_next_element(struct lyxml_ctx *xmlctx, const char **prefix, size_t *prefix_len, const char **name, size_t *name_len,
-        int *closing)
+        uint8_t *closing)
 {
     /* skip WS until EOF or after opening tag '<' */
     LY_CHECK_RET(lyxml_skip_until_end_or_after_otag(xmlctx));
@@ -795,7 +793,7 @@
 {
     LY_ERR ret = LY_SUCCESS;
     struct lyxml_ctx *xmlctx;
-    int closing;
+    uint8_t closing;
 
     /* new context */
     xmlctx = calloc(1, sizeof *xmlctx);
@@ -837,7 +835,7 @@
 lyxml_ctx_next(struct lyxml_ctx *xmlctx)
 {
     LY_ERR ret = LY_SUCCESS;
-    int closing;
+    uint8_t closing;
     struct lyxml_elem *e;
 
     /* if the value was not used, free it */
@@ -967,7 +965,7 @@
     LY_ERR ret = LY_SUCCESS;
     const char *prefix, *name, *prev_input;
     size_t prefix_len, name_len;
-    int closing;
+    uint8_t closing;
 
     prev_input = xmlctx->in->current;
 
@@ -1040,16 +1038,15 @@
 }
 
 LY_ERR
-lyxml_dump_text(struct ly_out *out, const char *text, int attribute)
+lyxml_dump_text(struct ly_out *out, const char *text, uint8_t attribute)
 {
     LY_ERR ret;
-    unsigned int u;
 
     if (!text) {
         return 0;
     }
 
-    for (u = 0; text[u]; u++) {
+    for (uint64_t u = 0; text[u]; u++) {
         switch (text[u]) {
         case '&':
             ret = ly_print_(out, "&amp;");
@@ -1138,7 +1135,6 @@
 {
     const char *ptr1, *ptr2, *ns1, *ns2;
     LY_ARRAY_COUNT_TYPE u1, u2;
-    int len;
 
     if (!value1 && !value2) {
         return LY_SUCCESS;
@@ -1152,6 +1148,7 @@
     while (ptr1[0] && ptr2[0]) {
         if (ptr1[0] != ptr2[0]) {
             /* it can be a start of prefix that maps to the same module */
+            size_t len;
             ns1 = ns2 = NULL;
             u1 = u2 = 0;
             if (prefs1) {
diff --git a/src/xml.h b/src/xml.h
index 8f4b47e..2be61b1 100644
--- a/src/xml.h
+++ b/src/xml.h
@@ -92,11 +92,11 @@
     };
     union {
         const char *name;   /* LYXML_ELEMENT, LYXML_ATTRIBUTE - elem/attr name */
-        int ws_only;        /* LYXML_ELEM_CONTENT, LYXML_ATTR_CONTENT - whether elem/attr value is empty/white-space only */
+        uint8_t ws_only;    /* LYXML_ELEM_CONTENT, LYXML_ATTR_CONTENT - whether elem/attr value is empty/white-space only */
     };
     union {
         size_t name_len;    /* LYXML_ELEMENT, LYXML_ATTRIBUTE - elem/attr name length */
-        int dynamic;        /* LYXML_ELEM_CONTENT, LYXML_ATTR_CONTENT - whether elem/attr value is dynamically allocated */
+        uint8_t dynamic;    /* LYXML_ELEM_CONTENT, LYXML_ATTR_CONTENT - whether elem/attr value is dynamically allocated */
     };
 
     struct ly_set elements; /* list of not-yet-closed elements */
@@ -153,7 +153,7 @@
  * @param[in] attribute Flag for attribute's value where a double quotes must be replaced.
  * @return LY_ERR values.
  */
-LY_ERR lyxml_dump_text(struct ly_out *out, const char *text, int attribute);
+LY_ERR lyxml_dump_text(struct ly_out *out, const char *text, uint8_t attribute);
 
 /**
  * @brief Remove the allocated working memory of the context.
diff --git a/src/xpath.c b/src/xpath.c
index 4072aab..9b9e835 100644
--- a/src/xpath.c
+++ b/src/xpath.c
@@ -44,7 +44,7 @@
 #include "xml.h"
 
 static LY_ERR reparse_or_expr(const struct ly_ctx *ctx, struct lyxp_expr *exp, uint16_t *tok_idx);
-static LY_ERR eval_expr_select(struct lyxp_expr *exp, uint16_t *tok_idx, enum lyxp_expr_type etype, struct lyxp_set *set, int options);
+static LY_ERR eval_expr_select(struct lyxp_expr *exp, uint16_t *tok_idx, enum lyxp_expr_type etype, struct lyxp_set *set, uint32_t options);
 
 /**
  * @brief Print the type of an XPath \p set.
@@ -318,7 +318,7 @@
  * @return LY_ERR
  */
 static LY_ERR
-cast_string_recursive(const struct lyd_node *node, int fake_cont, enum lyxp_node_type root_type, uint16_t indent, char **str,
+cast_string_recursive(const struct lyd_node *node, uint8_t fake_cont, enum lyxp_node_type root_type, uint16_t indent, char **str,
         uint16_t *used, uint16_t *size)
 {
     char *buf, *line, *ptr = NULL;
@@ -464,7 +464,7 @@
  * @return LY_ERR
  */
 static LY_ERR
-cast_string_elem(struct lyd_node *node, int fake_cont, enum lyxp_node_type root_type, char **str)
+cast_string_elem(struct lyd_node *node, uint8_t fake_cont, enum lyxp_node_type root_type, char **str)
 {
     uint16_t used, size;
     LY_ERR rc;
@@ -549,8 +549,8 @@
  * @param[in] cb_data Callback data.
  * @return 0 if not equal, non-zero if equal.
  */
-static int
-set_values_equal_cb(void *val1_p, void *val2_p, int UNUSED(mod), void *UNUSED(cb_data))
+static uint8_t
+set_values_equal_cb(void *val1_p, void *val2_p, uint8_t UNUSED(mod), void *UNUSED(cb_data))
 {
     struct lyxp_set_hash_node *val1, *val2;
 
@@ -574,7 +574,7 @@
 static void
 set_insert_node_hash(struct lyxp_set *set, struct lyd_node *node, enum lyxp_node_type type)
 {
-    int r;
+    LY_ERR r;
     uint32_t i, hash;
     struct lyxp_set_hash_node hnode;
 
@@ -625,7 +625,7 @@
 static void
 set_remove_node_hash(struct lyxp_set *set, struct lyd_node *node, enum lyxp_node_type type)
 {
-    int r;
+    LY_ERR r;
     struct lyxp_set_hash_node hnode;
     uint32_t hash;
 
@@ -763,7 +763,6 @@
 {
     struct lyxp_set *ret;
     uint16_t i;
-    int idx;
 
     if (!set) {
         return NULL;
@@ -778,7 +777,7 @@
 
         for (i = 0; i < set->used; ++i) {
             if ((set->val.scnodes[i].in_ctx == 1) || (set->val.scnodes[i].in_ctx == -2)) {
-                idx = lyxp_set_scnode_insert_node(ret, set->val.scnodes[i].scnode, set->val.scnodes[i].type);
+                int idx = lyxp_set_scnode_insert_node(ret, set->val.scnodes[i].scnode, set->val.scnodes[i].type);
                 /* coverity seems to think scnodes can be NULL */
                 if ((idx == -1) || !ret->val.scnodes) {
                     lyxp_set_free(ret);
@@ -849,7 +848,7 @@
  * @param[in] boolean Boolean to fill into \p set.
  */
 static void
-set_fill_boolean(struct lyxp_set *set, int boolean)
+set_fill_boolean(struct lyxp_set *set, uint8_t boolean)
 {
     lyxp_set_free_content(set);
 
@@ -1509,7 +1508,7 @@
     struct lyd_value val;
     struct ly_err_item *err = NULL;
     char *str, *ptr;
-    int dynamic;
+    uint8_t dynamic;
     LY_ERR rc;
 
     /* is there anything to canonize even? */
@@ -1583,7 +1582,8 @@
 set_sort(struct lyxp_set *set)
 {
     uint32_t i, j;
-    int ret = 0, cmp, inverted, change;
+    int ret = 0, cmp;
+    uint8_t inverted, change;
     const struct lyd_node *root;
     struct lyxp_set_node item;
     struct lyxp_set_hash_node hnode;
@@ -2079,7 +2079,8 @@
 static LY_ERR
 reparse_function_call(const struct ly_ctx *ctx, struct lyxp_expr *exp, uint16_t *tok_idx)
 {
-    int min_arg_count = -1, max_arg_count, arg_count;
+    int8_t min_arg_count = -1;
+    uint32_t arg_count, max_arg_count = 0;
     uint16_t func_tok_idx;
     LY_ERR rc;
 
@@ -2132,7 +2133,7 @@
     case 6:
         if (!strncmp(&exp->expr[exp->tok_pos[*tok_idx]], "concat", 6)) {
             min_arg_count = 2;
-            max_arg_count = INT_MAX;
+            max_arg_count = UINT32_MAX;
         } else if (!strncmp(&exp->expr[exp->tok_pos[*tok_idx]], "number", 6)) {
             min_arg_count = 0;
             max_arg_count = 1;
@@ -2262,7 +2263,7 @@
     LY_CHECK_RET(rc);
     ++(*tok_idx);
 
-    if ((arg_count < min_arg_count) || (arg_count > max_arg_count)) {
+    if ((arg_count < (uint8_t)min_arg_count) || (arg_count > max_arg_count)) {
         LOGVAL(ctx, LY_VLOG_NONE, NULL, LY_VCODE_XP_INARGCOUNT, arg_count, exp->tok_len[func_tok_idx],
                &exp->expr[exp->tok_pos[func_tok_idx]]);
         return LY_EVALID;
@@ -2561,7 +2562,7 @@
 static long int
 parse_ncname(const char *ncname)
 {
-    unsigned int uc;
+    uint32_t uc;
     size_t size;
     long int len = 0;
 
@@ -2642,13 +2643,12 @@
 }
 
 struct lyxp_expr *
-lyxp_expr_parse(const struct ly_ctx *ctx, const char *expr, size_t expr_len, int reparse)
+lyxp_expr_parse(const struct ly_ctx *ctx, const char *expr, size_t expr_len, uint8_t reparse)
 {
     struct lyxp_expr *ret;
     size_t parsed = 0, tok_len;
-    long int ncname_len;
     enum lyxp_token tok_type;
-    int prev_function_check = 0;
+    uint8_t prev_function_check = 0;
     uint16_t tok_idx = 0;
 
     if (!expr[0]) {
@@ -2872,7 +2872,7 @@
         } else {
 
             /* NameTest (NCName ':' '*' | QName) or NodeType/FunctionName */
-            ncname_len = parse_ncname(&expr[parsed]);
+            long int ncname_len = parse_ncname(&expr[parsed]);
             LY_CHECK_ERR_GOTO(ncname_len < 0, LOGVAL(ctx, LY_VLOG_NONE, NULL, LY_VCODE_XP_INEXPR, parsed - ncname_len + 1, expr), error);
             tok_len = ncname_len;
 
@@ -3016,11 +3016,11 @@
  * @param[in] type Type to test.
  * @return 1 if numeric, 0 otherwise.
  */
-static int
+static uint8_t
 warn_is_numeric_type(struct lysc_type *type)
 {
     struct lysc_type_union *uni;
-    int ret;
+    uint8_t ret;
     LY_ARRAY_COUNT_TYPE u;
 
     switch (type->basetype) {
@@ -3058,11 +3058,11 @@
  * @param[in] type Type to test.
  * @return 1 if string, 0 otherwise.
  */
-static int
+static uint8_t
 warn_is_string_type(struct lysc_type *type)
 {
     struct lysc_type_union *uni;
-    int ret;
+    uint8_t ret;
     LY_ARRAY_COUNT_TYPE u;
 
     switch (type->basetype) {
@@ -3097,11 +3097,11 @@
  * @param[in] base Expected type.
  * @return 1 if it is, 0 otherwise.
  */
-static int
+static uint8_t
 warn_is_specific_type(struct lysc_type *type, LY_DATA_TYPE base)
 {
     struct lysc_type_union *uni;
-    int ret;
+    uint8_t ret;
     LY_ARRAY_COUNT_TYPE u;
 
     if (type->basetype == base) {
@@ -3135,7 +3135,7 @@
 warn_is_equal_type_next_type(struct lysc_type *type, struct lysc_type *prev_type)
 {
     struct lysc_type_union *uni;
-    int found = 0;
+    uint8_t found = 0;
     LY_ARRAY_COUNT_TYPE u;
 
     switch (type->basetype) {
@@ -3212,10 +3212,10 @@
  * @param[in] tok_pos Token position.
  */
 static void
-warn_operands(struct ly_ctx *ctx, struct lyxp_set *set1, struct lyxp_set *set2, int numbers_only, const char *expr, uint16_t tok_pos)
+warn_operands(struct ly_ctx *ctx, struct lyxp_set *set1, struct lyxp_set *set2, uint8_t numbers_only, const char *expr, uint16_t tok_pos)
 {
     struct lysc_node_leaf *node1, *node2;
-    int leaves = 1, warning = 0;
+    uint8_t leaves = 1, warning = 0;
 
     node1 = (struct lysc_node_leaf *)warn_get_scnode_in_ctx(set1);
     node2 = (struct lysc_node_leaf *)warn_get_scnode_in_ctx(set2);
@@ -3340,7 +3340,7 @@
  * @return LY_ERR
  */
 static LY_ERR
-xpath_bit_is_set(struct lyxp_set **args, uint16_t UNUSED(arg_count), struct lyxp_set *set, int options)
+xpath_bit_is_set(struct lyxp_set **args, uint16_t UNUSED(arg_count), struct lyxp_set *set, uint32_t options)
 {
     struct lyd_node_term *leaf;
     struct lysc_node_leaf *sleaf;
@@ -3404,7 +3404,7 @@
  * @return LY_ERR
  */
 static LY_ERR
-xpath_boolean(struct lyxp_set **args, uint16_t UNUSED(arg_count), struct lyxp_set *set, int options)
+xpath_boolean(struct lyxp_set **args, uint16_t UNUSED(arg_count), struct lyxp_set *set, uint32_t options)
 {
     LY_ERR rc;
 
@@ -3431,7 +3431,7 @@
  * @return LY_ERR
  */
 static LY_ERR
-xpath_ceiling(struct lyxp_set **args, uint16_t UNUSED(arg_count), struct lyxp_set *set, int options)
+xpath_ceiling(struct lyxp_set **args, uint16_t UNUSED(arg_count), struct lyxp_set *set, uint32_t options)
 {
     struct lysc_node_leaf *sleaf;
     LY_ERR rc = LY_SUCCESS;
@@ -3470,7 +3470,7 @@
  * @return LY_ERR
  */
 static LY_ERR
-xpath_concat(struct lyxp_set **args, uint16_t arg_count, struct lyxp_set *set, int options)
+xpath_concat(struct lyxp_set **args, uint16_t arg_count, struct lyxp_set *set, uint32_t options)
 {
     uint16_t i;
     char *str = NULL;
@@ -3526,7 +3526,7 @@
  * @return LY_ERR
  */
 static LY_ERR
-xpath_contains(struct lyxp_set **args, uint16_t UNUSED(arg_count), struct lyxp_set *set, int options)
+xpath_contains(struct lyxp_set **args, uint16_t UNUSED(arg_count), struct lyxp_set *set, uint32_t options)
 {
     struct lysc_node_leaf *sleaf;
     LY_ERR rc = LY_SUCCESS;
@@ -3576,7 +3576,7 @@
  * @return LY_ERR
  */
 static LY_ERR
-xpath_count(struct lyxp_set **args, uint16_t UNUSED(arg_count), struct lyxp_set *set, int options)
+xpath_count(struct lyxp_set **args, uint16_t UNUSED(arg_count), struct lyxp_set *set, uint32_t options)
 {
     struct lysc_node *scnode = NULL;
     LY_ERR rc = LY_SUCCESS;
@@ -3609,7 +3609,7 @@
  * @return LY_ERR
  */
 static LY_ERR
-xpath_current(struct lyxp_set **args, uint16_t arg_count, struct lyxp_set *set, int options)
+xpath_current(struct lyxp_set **args, uint16_t arg_count, struct lyxp_set *set, uint32_t options)
 {
     if (arg_count || args) {
         LOGVAL(set->ctx, LY_VLOG_LYD, set->ctx_node, LY_VCODE_XP_INARGCOUNT, arg_count, "current()");
@@ -3641,7 +3641,7 @@
  * @return LY_ERR
  */
 static LY_ERR
-xpath_deref(struct lyxp_set **args, uint16_t UNUSED(arg_count), struct lyxp_set *set, int options)
+xpath_deref(struct lyxp_set **args, uint16_t UNUSED(arg_count), struct lyxp_set *set, uint32_t options)
 {
     struct lyd_node_term *leaf;
     struct lysc_node_leaf *sleaf = NULL;
@@ -3718,7 +3718,7 @@
 }
 
 static LY_ERR
-xpath_derived_(struct lyxp_set **args, struct lyxp_set *set, int options, int self_match, const char *func)
+xpath_derived_(struct lyxp_set **args, struct lyxp_set *set, uint32_t options, uint8_t self_match, const char *func)
 {
     uint16_t i;
     LY_ARRAY_COUNT_TYPE u;
@@ -3728,7 +3728,7 @@
     struct lyd_value data = {0}, *val;
     struct ly_err_item *err = NULL;
     LY_ERR rc = LY_SUCCESS;
-    int found;
+    uint8_t found;
 
     if (options & LYXP_SCNODE_ALL) {
         if ((args[0]->type != LYXP_SET_SCNODE_SET) || !(sleaf = (struct lysc_node_leaf *)warn_get_scnode_in_ctx(args[0]))) {
@@ -3837,7 +3837,7 @@
  * @return LY_ERR
  */
 static LY_ERR
-xpath_derived_from(struct lyxp_set **args, uint16_t UNUSED(arg_count), struct lyxp_set *set, int options)
+xpath_derived_from(struct lyxp_set **args, uint16_t UNUSED(arg_count), struct lyxp_set *set, uint32_t options)
 {
     return xpath_derived_(args, set, options, 0, __func__);
 }
@@ -3854,7 +3854,7 @@
  * @return LY_ERR
  */
 static LY_ERR
-xpath_derived_from_or_self(struct lyxp_set **args, uint16_t UNUSED(arg_count), struct lyxp_set *set, int options)
+xpath_derived_from_or_self(struct lyxp_set **args, uint16_t UNUSED(arg_count), struct lyxp_set *set, uint32_t options)
 {
     return xpath_derived_(args, set, options, 1, __func__);
 }
@@ -3870,7 +3870,7 @@
  * @return LY_ERR
  */
 static LY_ERR
-xpath_enum_value(struct lyxp_set **args, uint16_t UNUSED(arg_count), struct lyxp_set *set, int options)
+xpath_enum_value(struct lyxp_set **args, uint16_t UNUSED(arg_count), struct lyxp_set *set, uint32_t options)
 {
     struct lyd_node_term *leaf;
     struct lysc_node_leaf *sleaf;
@@ -3916,7 +3916,7 @@
  * @return LY_ERR
  */
 static LY_ERR
-xpath_false(struct lyxp_set **UNUSED(args), uint16_t UNUSED(arg_count), struct lyxp_set *set, int options)
+xpath_false(struct lyxp_set **UNUSED(args), uint16_t UNUSED(arg_count), struct lyxp_set *set, uint32_t options)
 {
     if (options & LYXP_SCNODE_ALL) {
         set_scnode_clear_ctx(set);
@@ -3938,7 +3938,7 @@
  * @return LY_ERR
  */
 static LY_ERR
-xpath_floor(struct lyxp_set **args, uint16_t UNUSED(arg_count), struct lyxp_set *set, int UNUSED(options))
+xpath_floor(struct lyxp_set **args, uint16_t UNUSED(arg_count), struct lyxp_set *set, uint32_t UNUSED(options))
 {
     LY_ERR rc;
 
@@ -3962,13 +3962,12 @@
  * @return LY_ERR
  */
 static LY_ERR
-xpath_lang(struct lyxp_set **args, uint16_t UNUSED(arg_count), struct lyxp_set *set, int options)
+xpath_lang(struct lyxp_set **args, uint16_t UNUSED(arg_count), struct lyxp_set *set, uint32_t options)
 {
     const struct lyd_node *node;
     struct lysc_node_leaf *sleaf;
     struct lyd_meta *meta = NULL;
     const char *val;
-    int i;
     LY_ERR rc = LY_SUCCESS;
 
     if (options & LYXP_SCNODE_ALL) {
@@ -4026,6 +4025,8 @@
     if (!meta) {
         set_fill_boolean(set, 0);
     } else {
+        uint64_t i;
+
         val = meta->value.canonical;
         for (i = 0; args[0]->val.str[i]; ++i) {
             if (tolower(args[0]->val.str[i]) != tolower(val[i])) {
@@ -4056,7 +4057,7 @@
  * @return LY_ERR
  */
 static LY_ERR
-xpath_last(struct lyxp_set **UNUSED(args), uint16_t UNUSED(arg_count), struct lyxp_set *set, int options)
+xpath_last(struct lyxp_set **UNUSED(args), uint16_t UNUSED(arg_count), struct lyxp_set *set, uint32_t options)
 {
     if (options & LYXP_SCNODE_ALL) {
         set_scnode_clear_ctx(set);
@@ -4086,7 +4087,7 @@
  * @return LY_ERR
  */
 static LY_ERR
-xpath_local_name(struct lyxp_set **args, uint16_t arg_count, struct lyxp_set *set, int options)
+xpath_local_name(struct lyxp_set **args, uint16_t arg_count, struct lyxp_set *set, uint32_t options)
 {
     struct lyxp_set_node *item;
     /* suppress unused variable warning */
@@ -4155,13 +4156,12 @@
  * @return LY_ERR
  */
 static LY_ERR
-xpath_name(struct lyxp_set **args, uint16_t arg_count, struct lyxp_set *set, int options)
+xpath_name(struct lyxp_set **args, uint16_t arg_count, struct lyxp_set *set, uint32_t options)
 {
     struct lyxp_set_node *item;
     struct lys_module *mod = NULL;
     char *str;
     const char *name = NULL;
-    int rc = -1;
 
     if (options & LYXP_SCNODE_ALL) {
         set_scnode_clear_ctx(set);
@@ -4215,6 +4215,8 @@
     }
 
     if (mod && name) {
+        int rc = -1;
+
         switch (set->format) {
         case LY_PREF_SCHEMA:
             rc = asprintf(&str, "%s:%s", lys_prefix_find_module(set->local_mod, mod), name);
@@ -4246,7 +4248,7 @@
  * @return LY_ERR (LY_EINVAL for wrong arguments on schema)
  */
 static LY_ERR
-xpath_namespace_uri(struct lyxp_set **args, uint16_t arg_count, struct lyxp_set *set, int options)
+xpath_namespace_uri(struct lyxp_set **args, uint16_t arg_count, struct lyxp_set *set, uint32_t options)
 {
     struct lyxp_set_node *item;
     struct lys_module *mod;
@@ -4323,7 +4325,7 @@
  * @return LY_ERR
  */
 static LY_ERR
-xpath_node(struct lyxp_set **UNUSED(args), uint16_t UNUSED(arg_count), struct lyxp_set *set, int options)
+xpath_node(struct lyxp_set **UNUSED(args), uint16_t UNUSED(arg_count), struct lyxp_set *set, uint32_t options)
 {
     if (options & LYXP_SCNODE_ALL) {
         set_scnode_clear_ctx(set);
@@ -4348,11 +4350,11 @@
  * @return LY_ERR
  */
 static LY_ERR
-xpath_normalize_space(struct lyxp_set **args, uint16_t arg_count, struct lyxp_set *set, int options)
+xpath_normalize_space(struct lyxp_set **args, uint16_t arg_count, struct lyxp_set *set, uint32_t options)
 {
     uint16_t i, new_used;
     char *new;
-    int have_spaces = 0, space_before = 0;
+    uint8_t have_spaces = 0, space_before = 0;
     struct lysc_node_leaf *sleaf;
     LY_ERR rc = LY_SUCCESS;
 
@@ -4438,7 +4440,7 @@
  * @return LY_ERR
  */
 static LY_ERR
-xpath_not(struct lyxp_set **args, uint16_t UNUSED(arg_count), struct lyxp_set *set, int options)
+xpath_not(struct lyxp_set **args, uint16_t UNUSED(arg_count), struct lyxp_set *set, uint32_t options)
 {
     if (options & LYXP_SCNODE_ALL) {
         set_scnode_clear_ctx(set);
@@ -4466,7 +4468,7 @@
  * @return LY_ERR
  */
 static LY_ERR
-xpath_number(struct lyxp_set **args, uint16_t arg_count, struct lyxp_set *set, int options)
+xpath_number(struct lyxp_set **args, uint16_t arg_count, struct lyxp_set *set, uint32_t options)
 {
     LY_ERR rc;
 
@@ -4498,7 +4500,7 @@
  * @return LY_ERR
  */
 static LY_ERR
-xpath_position(struct lyxp_set **UNUSED(args), uint16_t UNUSED(arg_count), struct lyxp_set *set, int options)
+xpath_position(struct lyxp_set **UNUSED(args), uint16_t UNUSED(arg_count), struct lyxp_set *set, uint32_t options)
 {
     if (options & LYXP_SCNODE_ALL) {
         set_scnode_clear_ctx(set);
@@ -4532,7 +4534,7 @@
  * @return LY_ERR
  */
 static LY_ERR
-xpath_re_match(struct lyxp_set **args, uint16_t UNUSED(arg_count), struct lyxp_set *set, int options)
+xpath_re_match(struct lyxp_set **args, uint16_t UNUSED(arg_count), struct lyxp_set *set, uint32_t options)
 {
     struct lysc_pattern **patterns = NULL, **pattern;
     struct lysc_node_leaf *sleaf;
@@ -4607,7 +4609,7 @@
  * @return LY_ERR
  */
 static LY_ERR
-xpath_round(struct lyxp_set **args, uint16_t UNUSED(arg_count), struct lyxp_set *set, int options)
+xpath_round(struct lyxp_set **args, uint16_t UNUSED(arg_count), struct lyxp_set *set, uint32_t options)
 {
     struct lysc_node_leaf *sleaf;
     LY_ERR rc = LY_SUCCESS;
@@ -4652,7 +4654,7 @@
  * @return LY_ERR
  */
 static LY_ERR
-xpath_starts_with(struct lyxp_set **args, uint16_t UNUSED(arg_count), struct lyxp_set *set, int options)
+xpath_starts_with(struct lyxp_set **args, uint16_t UNUSED(arg_count), struct lyxp_set *set, uint32_t options)
 {
     struct lysc_node_leaf *sleaf;
     LY_ERR rc = LY_SUCCESS;
@@ -4702,7 +4704,7 @@
  * @return LY_ERR
  */
 static LY_ERR
-xpath_string(struct lyxp_set **args, uint16_t arg_count, struct lyxp_set *set, int options)
+xpath_string(struct lyxp_set **args, uint16_t arg_count, struct lyxp_set *set, uint32_t options)
 {
     LY_ERR rc;
 
@@ -4734,7 +4736,7 @@
  * @return LY_ERR
  */
 static LY_ERR
-xpath_string_length(struct lyxp_set **args, uint16_t arg_count, struct lyxp_set *set, int options)
+xpath_string_length(struct lyxp_set **args, uint16_t arg_count, struct lyxp_set *set, uint32_t options)
 {
     struct lysc_node_leaf *sleaf;
     LY_ERR rc = LY_SUCCESS;
@@ -4785,9 +4787,9 @@
  * @return LY_ERR
  */
 static LY_ERR
-xpath_substring(struct lyxp_set **args, uint16_t arg_count, struct lyxp_set *set, int options)
+xpath_substring(struct lyxp_set **args, uint16_t arg_count, struct lyxp_set *set, uint32_t options)
 {
-    int start, len;
+    int32_t start, len;
     uint16_t str_start, str_len, pos;
     struct lysc_node_leaf *sleaf;
     LY_ERR rc = LY_SUCCESS;
@@ -4831,24 +4833,24 @@
     if (isfinite(args[1]->val.num)) {
         start = args[1]->val.num - 1;
     } else if (isinf(args[1]->val.num) && signbit(args[1]->val.num)) {
-        start = INT_MIN;
+        start = INT32_MIN;
     } else {
-        start = INT_MAX;
+        start = INT32_MAX;
     }
 
     /* len */
     if (arg_count == 3) {
         rc = xpath_round(&args[2], 1, args[2], options);
         LY_CHECK_RET(rc);
-        if (isfinite(args[2]->val.num)) {
-            len = args[2]->val.num;
-        } else if (isnan(args[2]->val.num) || signbit(args[2]->val.num)) {
+        if (isnan(args[2]->val.num) || signbit(args[2]->val.num)) {
             len = 0;
+        } else if (isfinite(args[2]->val.num)) {
+            len = args[2]->val.num;
         } else {
-            len = INT_MAX;
+            len = INT32_MAX;
         }
     } else {
-        len = INT_MAX;
+        len = INT32_MAX;
     }
 
     /* find matching character positions */
@@ -4880,7 +4882,7 @@
  * @return LY_ERR
  */
 static LY_ERR
-xpath_substring_after(struct lyxp_set **args, uint16_t UNUSED(arg_count), struct lyxp_set *set, int options)
+xpath_substring_after(struct lyxp_set **args, uint16_t UNUSED(arg_count), struct lyxp_set *set, uint32_t options)
 {
     char *ptr;
     struct lysc_node_leaf *sleaf;
@@ -4933,7 +4935,7 @@
  * @return LY_ERR
  */
 static LY_ERR
-xpath_substring_before(struct lyxp_set **args, uint16_t UNUSED(arg_count), struct lyxp_set *set, int options)
+xpath_substring_before(struct lyxp_set **args, uint16_t UNUSED(arg_count), struct lyxp_set *set, uint32_t options)
 {
     char *ptr;
     struct lysc_node_leaf *sleaf;
@@ -4985,7 +4987,7 @@
  * @return LY_ERR
  */
 static LY_ERR
-xpath_sum(struct lyxp_set **args, uint16_t UNUSED(arg_count), struct lyxp_set *set, int options)
+xpath_sum(struct lyxp_set **args, uint16_t UNUSED(arg_count), struct lyxp_set *set, uint32_t options)
 {
     long double num;
     char *str;
@@ -5056,7 +5058,7 @@
  * @return LY_ERR
  */
 static LY_ERR
-xpath_text(struct lyxp_set **UNUSED(args), uint16_t UNUSED(arg_count), struct lyxp_set *set, int options)
+xpath_text(struct lyxp_set **UNUSED(args), uint16_t UNUSED(arg_count), struct lyxp_set *set, uint32_t options)
 {
     uint32_t i;
 
@@ -5106,11 +5108,11 @@
  * @return LY_ERR
  */
 static LY_ERR
-xpath_translate(struct lyxp_set **args, uint16_t UNUSED(arg_count), struct lyxp_set *set, int options)
+xpath_translate(struct lyxp_set **args, uint16_t UNUSED(arg_count), struct lyxp_set *set, uint32_t options)
 {
     uint16_t i, j, new_used;
     char *new;
-    int found, have_removed;
+    uint8_t have_removed;
     struct lysc_node_leaf *sleaf;
     LY_ERR rc = LY_SUCCESS;
 
@@ -5155,7 +5157,7 @@
 
     have_removed = 0;
     for (i = 0; args[0]->val.str[i]; ++i) {
-        found = 0;
+        uint8_t found = 0;
 
         for (j = 0; args[1]->val.str[j]; ++j) {
             if (args[0]->val.str[i] == args[1]->val.str[j]) {
@@ -5204,7 +5206,7 @@
  * @return LY_ERR
  */
 static LY_ERR
-xpath_true(struct lyxp_set **UNUSED(args), uint16_t UNUSED(arg_count), struct lyxp_set *set, int options)
+xpath_true(struct lyxp_set **UNUSED(args), uint16_t UNUSED(arg_count), struct lyxp_set *set, uint32_t options)
 {
     if (options & LYXP_SCNODE_ALL) {
         set_scnode_clear_ctx(set);
@@ -5237,7 +5239,7 @@
 {
     const struct lys_module *mod = NULL;
     const char *ptr;
-    int pref_len;
+    size_t pref_len;
 
     assert((set->type == LYXP_SET_NODE_SET) || (set->type == LYXP_SET_SCNODE_SET));
 
@@ -5281,7 +5283,7 @@
  * @param[in] options Xpath options.
  */
 static void
-moveto_root(struct lyxp_set *set, int options)
+moveto_root(struct lyxp_set *set, uint32_t options)
 {
     if (!set) {
         return;
@@ -5411,7 +5413,6 @@
 moveto_node(struct lyxp_set *set, const struct lys_module *mod, const char *ncname)
 {
     uint32_t i;
-    int replaced;
     const struct lyd_node *siblings, *sub;
     LY_ERR rc;
 
@@ -5425,7 +5426,7 @@
     }
 
     for (i = 0; i < set->used; ) {
-        replaced = 0;
+        uint8_t replaced = 0;
 
         if ((set->val.nodes[i].type == LYXP_NODE_ROOT_CONFIG) || (set->val.nodes[i].type == LYXP_NODE_ROOT)) {
             assert(!set->val.nodes[i].node);
@@ -5558,9 +5559,12 @@
  * @return LY_ERR
  */
 static LY_ERR
-moveto_scnode(struct lyxp_set *set, const struct lys_module *mod, const char *ncname, int options)
+moveto_scnode(struct lyxp_set *set, const struct lys_module *mod, const char *ncname, uint32_t options)
 {
-    int i, orig_used, idx, temp_ctx = 0, getnext_opts;
+    int idx;
+    uint8_t temp_ctx = 0;
+    uint32_t getnext_opts;
+    uint32_t orig_used, i;
     uint32_t mod_idx;
     const struct lysc_node *iter, *start_parent;
 
@@ -5604,8 +5608,9 @@
                 while (mod->implemented && (iter = lys_getnext(iter, NULL, mod->compiled, getnext_opts))) {
                     if (!moveto_scnode_check(iter, set->root_type, set->context_op, ncname, mod)) {
                         idx = lyxp_set_scnode_insert_node(set, iter, LYXP_NODE_ELEM);
+                        LY_CHECK_RET(idx < 0, LY_EMEM);
                         /* we need to prevent these nodes from being considered in this moveto */
-                        if ((idx < orig_used) && (idx > i)) {
+                        if (((uint32_t)idx < orig_used) && ((uint32_t)idx > i)) {
                             set->val.scnodes[idx].in_ctx = 2;
                             temp_ctx = 1;
                         }
@@ -5625,7 +5630,8 @@
             while ((iter = lys_getnext(iter, start_parent, NULL, getnext_opts))) {
                 if (!moveto_scnode_check(iter, set->root_type, set->context_op, ncname, (mod ? mod : set->local_mod))) {
                     idx = lyxp_set_scnode_insert_node(set, iter, LYXP_NODE_ELEM);
-                    if ((idx < orig_used) && (idx > i)) {
+                    LY_CHECK_RET(idx < 0, LY_EMEM);
+                    if (((uint32_t)idx < orig_used) && ((uint32_t)idx > i)) {
                         set->val.scnodes[idx].in_ctx = 2;
                         temp_ctx = 1;
                     }
@@ -5742,9 +5748,10 @@
  * @return LY_ERR
  */
 static LY_ERR
-moveto_scnode_alldesc(struct lyxp_set *set, const struct lys_module *mod, const char *ncname, int options)
+moveto_scnode_alldesc(struct lyxp_set *set, const struct lys_module *mod, const char *ncname, uint32_t options)
 {
-    int i, orig_used, idx;
+    uint32_t i, orig_used;
+    int idx;
     const struct lysc_node *next, *elem, *start;
     LY_ERR rc;
 
@@ -5782,7 +5789,7 @@
             if (!rc) {
                 if ((idx = lyxp_set_scnode_dup_node_check(set, elem, LYXP_NODE_ELEM, i)) > -1) {
                     set->val.scnodes[idx].in_ctx = 1;
-                    if (idx > i) {
+                    if ((uint32_t)idx > i) {
                         /* we will process it later in the set */
                         goto skip_children;
                     }
@@ -5835,8 +5842,6 @@
 static LY_ERR
 moveto_attr(struct lyxp_set *set, const struct lys_module *mod, const char *ncname)
 {
-    uint32_t i;
-    int replaced;
     struct lyd_meta *sub;
 
     if (!set) {
@@ -5848,8 +5853,8 @@
         return LY_EVALID;
     }
 
-    for (i = 0; i < set->used; ) {
-        replaced = 0;
+    for (uint32_t i = 0; i < set->used; ) {
+        uint8_t replaced = 0;
 
         /* only attributes of an elem (not dummy) can be in the result, skip all the rest;
          * our attributes are always qualified */
@@ -5940,8 +5945,6 @@
 static int
 moveto_attr_alldesc(struct lyxp_set *set, const struct lys_module *mod, const char *ncname)
 {
-    uint32_t i;
-    int replaced;
     struct lyd_meta *sub;
     struct lyxp_set *set_all_desc = NULL;
     LY_ERR rc;
@@ -5973,8 +5976,8 @@
     }
     lyxp_set_free(set_all_desc);
 
-    for (i = 0; i < set->used; ) {
-        replaced = 0;
+    for (uint32_t i = 0; i < set->used; ) {
+        uint8_t replaced = 0;
 
         /* only attributes of an elem can be in the result, skip all the rest,
          * we have all attributes qualified in lyd tree */
@@ -6023,7 +6026,7 @@
  */
 static LY_ERR
 moveto_self_add_children_r(const struct lyd_node *parent, uint32_t parent_pos, enum lyxp_node_type parent_type,
-        struct lyxp_set *to_set, const struct lyxp_set *dup_check_set, int options)
+        struct lyxp_set *to_set, const struct lyxp_set *dup_check_set, uint32_t options)
 {
     const struct lyd_node *iter, *first;
     LY_ERR rc;
@@ -6086,9 +6089,8 @@
  * @return LY_ERR (LY_EINCOMPLETE on unresolved when)
  */
 static LY_ERR
-moveto_self(struct lyxp_set *set, int all_desc, int options)
+moveto_self(struct lyxp_set *set, uint8_t all_desc, uint32_t options)
 {
-    uint32_t i;
     struct lyxp_set ret_set;
     LY_ERR rc;
 
@@ -6108,7 +6110,7 @@
 
     /* add all the children, they get added recursively */
     set_init(&ret_set, set);
-    for (i = 0; i < set->used; ++i) {
+    for (uint32_t i = 0; i < set->used; ++i) {
         /* copy the current node to tmp */
         set_insert_node(&ret_set, set->val.nodes[i].node, set->val.nodes[i].pos, set->val.nodes[i].type, ret_set.used);
 
@@ -6145,10 +6147,10 @@
  * @return LY_ERR
  */
 static LY_ERR
-moveto_scnode_self(struct lyxp_set *set, int all_desc, int options)
+moveto_scnode_self(struct lyxp_set *set, uint8_t all_desc, uint32_t options)
 {
-    int getnext_opts;
-    uint32_t i, mod_idx;
+    uint32_t getnext_opts;
+    uint32_t mod_idx;
     const struct lysc_node *iter, *start_parent;
     const struct lys_module *mod;
 
@@ -6173,7 +6175,7 @@
     }
 
     /* add all the children, recursively as they are being added into the same set */
-    for (i = 0; i < set->used; ++i) {
+    for (uint32_t i = 0; i < set->used; ++i) {
         if (set->val.scnodes[i].in_ctx != 1) {
             if (set->val.scnodes[i].in_ctx != -2) {
                 continue;
@@ -6230,10 +6232,9 @@
  * @return LY_ERR (LY_EINCOMPLETE on unresolved when)
  */
 static LY_ERR
-moveto_parent(struct lyxp_set *set, int all_desc, int options)
+moveto_parent(struct lyxp_set *set, uint8_t all_desc, uint32_t options)
 {
     LY_ERR rc;
-    uint32_t i;
     struct lyd_node *node, *new_node;
     enum lyxp_node_type new_type;
 
@@ -6252,7 +6253,7 @@
         LY_CHECK_RET(rc);
     }
 
-    for (i = 0; i < set->used; ++i) {
+    for (uint32_t i = 0; i < set->used; ++i) {
         node = set->val.nodes[i].node;
 
         if (set->val.nodes[i].type == LYXP_NODE_ELEM) {
@@ -6307,12 +6308,13 @@
  * @return LY_ERR
  */
 static LY_ERR
-moveto_scnode_parent(struct lyxp_set *set, int all_desc, int options)
+moveto_scnode_parent(struct lyxp_set *set, uint8_t all_desc, uint32_t options)
 {
-    int idx, i, orig_used, temp_ctx = 0;
+    int idx;
+    uint32_t i, orig_used;
+    uint8_t temp_ctx = 0;
     const struct lysc_node *node, *new_node;
     enum lyxp_node_type new_type;
-    LY_ERR rc;
 
     if (!set) {
         return LY_SUCCESS;
@@ -6325,8 +6327,7 @@
 
     if (all_desc) {
         /* <path>//.. == <path>//./.. */
-        rc = moveto_scnode_self(set, 1, options);
-        LY_CHECK_RET(rc);
+        LY_CHECK_RET(moveto_scnode_self(set, 1, options));
     }
 
     orig_used = set->used;
@@ -6361,7 +6362,8 @@
         }
 
         idx = lyxp_set_scnode_insert_node(set, new_node, new_type);
-        if ((idx < orig_used) && (idx > i)) {
+        LY_CHECK_RET(idx < 0, LY_EMEM);
+        if (((uint32_t)idx < orig_used) && ((uint32_t)idx > i)) {
             set->val.scnodes[idx].in_ctx = 2;
             temp_ctx = 1;
         }
@@ -6389,7 +6391,7 @@
  * @return LY_ERR
  */
 static LY_ERR
-moveto_op_comp(struct lyxp_set *set1, struct lyxp_set *set2, const char *op, int options)
+moveto_op_comp(struct lyxp_set *set1, struct lyxp_set *set2, const char *op, uint32_t options)
 {
     /*
      * NODE SET + NODE SET = NODE SET + STRING /(1 NODE SET) 2 STRING
@@ -6647,7 +6649,7 @@
  * @return LY_ERR (LY_EINCOMPLETE on unresolved when)
  */
 static LY_ERR
-eval_predicate(struct lyxp_expr *exp, uint16_t *tok_idx, struct lyxp_set *set, int options, int parent_pos_pred)
+eval_predicate(struct lyxp_expr *exp, uint16_t *tok_idx, struct lyxp_set *set, uint32_t options, uint8_t parent_pos_pred)
 {
     LY_ERR rc;
     uint16_t i, orig_exp;
@@ -6828,7 +6830,7 @@
     uint16_t key_count, e_idx, pred_idx = 0;
     const struct lysc_node *key;
     size_t pred_len;
-    int prev_lo;
+    uint32_t prev_lo;
     struct lyxp_expr *exp2 = NULL;
 
     assert(scnode->nodetype & (LYS_LIST | LYS_LEAFLIST));
@@ -6916,10 +6918,9 @@
  * @return LY_ERR (LY_EINCOMPLETE on unresolved when)
  */
 static LY_ERR
-eval_name_test_with_predicate(struct lyxp_expr *exp, uint16_t *tok_idx, int attr_axis, int all_desc, struct lyxp_set *set,
-        int options)
+eval_name_test_with_predicate(struct lyxp_expr *exp, uint16_t *tok_idx, uint8_t attr_axis, uint8_t all_desc, struct lyxp_set *set,
+        uint32_t options)
 {
-    int i;
     char *path;
     const char *ncname, *ncname_dict = NULL;
     uint16_t ncname_len;
@@ -6946,7 +6947,7 @@
 
     if (moveto_mod && !attr_axis && !all_desc && (set->type == LYXP_SET_NODE_SET)) {
         /* find the matching schema node in some parent in the context */
-        for (i = 0; i < (signed)set->used; ++i) {
+        for (uint32_t i = 0; i < set->used; ++i) {
             if (set->val.nodes[i].type == set->root_type) {
                 tmp = lys_find_child(NULL, moveto_mod, ncname, ncname_len, 0, 0);
             } else if ((set->val.nodes[i].type == LYXP_NODE_ELEM)
@@ -7004,6 +7005,8 @@
         }
     } else {
         if (set && (options & LYXP_SCNODE_ALL)) {
+            int64_t i;
+
             if (all_desc) {
                 rc = moveto_scnode_alldesc(set, moveto_mod, ncname_dict, options);
             } else {
@@ -7067,8 +7070,8 @@
  * @return LY_ERR (LY_EINCOMPLETE on unresolved when)
  */
 static LY_ERR
-eval_node_type_with_predicate(struct lyxp_expr *exp, uint16_t *tok_idx, int attr_axis, int all_desc,
-        struct lyxp_set *set, int options)
+eval_node_type_with_predicate(struct lyxp_expr *exp, uint16_t *tok_idx, uint8_t attr_axis, uint8_t all_desc,
+        struct lyxp_set *set, uint32_t options)
 {
     LY_ERR rc;
 
@@ -7132,9 +7135,9 @@
  * @return LY_ERR (YL_EINCOMPLETE on unresolved when)
  */
 static LY_ERR
-eval_relative_location_path(struct lyxp_expr *exp, uint16_t *tok_idx, int all_desc, struct lyxp_set *set, int options)
+eval_relative_location_path(struct lyxp_expr *exp, uint16_t *tok_idx, uint8_t all_desc, struct lyxp_set *set, uint32_t options)
 {
-    int attr_axis;
+    uint8_t attr_axis;
     LY_ERR rc;
 
     goto step;
@@ -7222,9 +7225,9 @@
  * @return LY_ERR (LY_EINCOMPLETE on unresolved when)
  */
 static LY_ERR
-eval_absolute_location_path(struct lyxp_expr *exp, uint16_t *tok_idx, struct lyxp_set *set, int options)
+eval_absolute_location_path(struct lyxp_expr *exp, uint16_t *tok_idx, struct lyxp_set *set, uint32_t options)
 {
-    int all_desc;
+    uint8_t all_desc;
     LY_ERR rc;
 
     if (set) {
@@ -7283,10 +7286,10 @@
  * @return LY_ERR (LY_EINCOMPLETE on unresolved when)
  */
 static LY_ERR
-eval_function_call(struct lyxp_expr *exp, uint16_t *tok_idx, struct lyxp_set *set, int options)
+eval_function_call(struct lyxp_expr *exp, uint16_t *tok_idx, struct lyxp_set *set, uint32_t options)
 {
     LY_ERR rc;
-    LY_ERR (*xpath_func)(struct lyxp_set **, uint16_t, struct lyxp_set *, int) = NULL;
+    LY_ERR (*xpath_func)(struct lyxp_set **, uint16_t, struct lyxp_set *, uint32_t) = NULL;
     uint16_t arg_count = 0, i;
     struct lyxp_set **args = NULL, **args_aux;
 
@@ -7547,9 +7550,9 @@
  * @return LY_ERR (LY_EINCOMPLETE on unresolved when)
  */
 static LY_ERR
-eval_path_expr(struct lyxp_expr *exp, uint16_t *tok_idx, struct lyxp_set *set, int options)
+eval_path_expr(struct lyxp_expr *exp, uint16_t *tok_idx, struct lyxp_set *set, uint32_t options)
 {
-    int all_desc, parent_pos_pred;
+    uint8_t all_desc, parent_pos_pred;
     LY_ERR rc;
 
     switch (exp->tokens[*tok_idx]) {
@@ -7681,7 +7684,7 @@
  * @return LY_ERR (LY_EINCOMPLETE on unresolved when)
  */
 static LY_ERR
-eval_union_expr(struct lyxp_expr *exp, uint16_t *tok_idx, uint16_t repeat, struct lyxp_set *set, int options)
+eval_union_expr(struct lyxp_expr *exp, uint16_t *tok_idx, uint16_t repeat, struct lyxp_set *set, uint32_t options)
 {
     LY_ERR rc = LY_SUCCESS;
     struct lyxp_set orig_set, set2;
@@ -7742,7 +7745,7 @@
  * @return LY_ERR (LY_EINCOMPLETE on unresolved when)
  */
 static LY_ERR
-eval_unary_expr(struct lyxp_expr *exp, uint16_t *tok_idx, uint16_t repeat, struct lyxp_set *set, int options)
+eval_unary_expr(struct lyxp_expr *exp, uint16_t *tok_idx, uint16_t repeat, struct lyxp_set *set, uint32_t options)
 {
     LY_ERR rc;
     uint16_t this_op, i;
@@ -7790,7 +7793,7 @@
  * @return LY_ERR (LY_EINCOMPLETE on unresolved when)
  */
 static LY_ERR
-eval_multiplicative_expr(struct lyxp_expr *exp, uint16_t *tok_idx, uint16_t repeat, struct lyxp_set *set, int options)
+eval_multiplicative_expr(struct lyxp_expr *exp, uint16_t *tok_idx, uint16_t repeat, struct lyxp_set *set, uint32_t options)
 {
     LY_ERR rc;
     uint16_t this_op;
@@ -7858,7 +7861,7 @@
  * @return LY_ERR (LY_EINCOMPLETE on unresolved when)
  */
 static LY_ERR
-eval_additive_expr(struct lyxp_expr *exp, uint16_t *tok_idx, uint16_t repeat, struct lyxp_set *set, int options)
+eval_additive_expr(struct lyxp_expr *exp, uint16_t *tok_idx, uint16_t repeat, struct lyxp_set *set, uint32_t options)
 {
     LY_ERR rc;
     uint16_t this_op;
@@ -7928,7 +7931,7 @@
  * @return LY_ERR (LY_EINCOMPLETE on unresolved when)
  */
 static LY_ERR
-eval_relational_expr(struct lyxp_expr *exp, uint16_t *tok_idx, uint16_t repeat, struct lyxp_set *set, int options)
+eval_relational_expr(struct lyxp_expr *exp, uint16_t *tok_idx, uint16_t repeat, struct lyxp_set *set, uint32_t options)
 {
     LY_ERR rc;
     uint16_t this_op;
@@ -7995,7 +7998,7 @@
  * @return LY_ERR (LY_EINCOMPLETE on unresolved when)
  */
 static LY_ERR
-eval_equality_expr(struct lyxp_expr *exp, uint16_t *tok_idx, uint16_t repeat, struct lyxp_set *set, int options)
+eval_equality_expr(struct lyxp_expr *exp, uint16_t *tok_idx, uint16_t repeat, struct lyxp_set *set, uint32_t options)
 {
     LY_ERR rc;
     uint16_t this_op;
@@ -8063,7 +8066,7 @@
  * @return LY_ERR (LY_EINCOMPLETE on unresolved when)
  */
 static LY_ERR
-eval_and_expr(struct lyxp_expr *exp, uint16_t *tok_idx, uint16_t repeat, struct lyxp_set *set, int options)
+eval_and_expr(struct lyxp_expr *exp, uint16_t *tok_idx, uint16_t repeat, struct lyxp_set *set, uint32_t options)
 {
     LY_ERR rc;
     struct lyxp_set orig_set, set2;
@@ -8133,7 +8136,7 @@
  * @return LY_ERR (LY_EINCOMPLETE on unresolved when)
  */
 static LY_ERR
-eval_or_expr(struct lyxp_expr *exp, uint16_t *tok_idx, uint16_t repeat, struct lyxp_set *set, int options)
+eval_or_expr(struct lyxp_expr *exp, uint16_t *tok_idx, uint16_t repeat, struct lyxp_set *set, uint32_t options)
 {
     LY_ERR rc;
     struct lyxp_set orig_set, set2;
@@ -8203,7 +8206,7 @@
  * @return LY_ERR (LY_EINCOMPLETE on unresolved when)
  */
 static LY_ERR
-eval_expr_select(struct lyxp_expr *exp, uint16_t *tok_idx, enum lyxp_expr_type etype, struct lyxp_set *set, int options)
+eval_expr_select(struct lyxp_expr *exp, uint16_t *tok_idx, enum lyxp_expr_type etype, struct lyxp_set *set, uint32_t options)
 {
     uint16_t i, count;
     enum lyxp_expr_type next_etype;
@@ -8271,7 +8274,7 @@
  * @return Root type.
  */
 static enum lyxp_node_type
-lyxp_get_root_type(const struct lyd_node *ctx_node, const struct lysc_node *ctx_scnode, int options)
+lyxp_get_root_type(const struct lyd_node *ctx_node, const struct lysc_node *ctx_scnode, uint32_t options)
 {
     const struct lysc_node *op;
 
@@ -8301,7 +8304,7 @@
 
 LY_ERR
 lyxp_eval(struct lyxp_expr *exp, LY_PREFIX_FORMAT format, const struct lys_module *local_mod, const struct lyd_node *ctx_node,
-        enum lyxp_node_type ctx_node_type, const struct lyd_node *tree, struct lyxp_set *set, int options)
+        enum lyxp_node_type ctx_node_type, const struct lyd_node *tree, struct lyxp_set *set, uint32_t options)
 {
     uint16_t tok_idx = 0;
     const struct lyd_node *real_ctx_node;
@@ -8570,7 +8573,7 @@
 
 LY_ERR
 lyxp_atomize(struct lyxp_expr *exp, LY_PREFIX_FORMAT format, const struct lys_module *local_mod,
-        const struct lysc_node *ctx_scnode, enum lyxp_node_type ctx_scnode_type, struct lyxp_set *set, int options)
+        const struct lysc_node *ctx_scnode, enum lyxp_node_type ctx_scnode_type, struct lyxp_set *set, uint32_t options)
 {
     struct ly_ctx *ctx;
     const struct lysc_node *real_ctx_scnode;
diff --git a/src/xpath.h b/src/xpath.h
index 1e8b3b2..a0d7c4a 100644
--- a/src/xpath.h
+++ b/src/xpath.h
@@ -238,7 +238,7 @@
         } *meta;
         char *str;
         long double num;
-        int bln;
+        uint8_t bln; /* boolean */
     } val;
 
     /* this is valid only for type LYXP_SET_NODE_SET and LYXP_SET_SCNODE_SET */
@@ -292,7 +292,7 @@
  */
 LY_ERR lyxp_eval(struct lyxp_expr *exp, LY_PREFIX_FORMAT format, const struct lys_module *local_mod,
         const struct lyd_node *ctx_node, enum lyxp_node_type ctx_node_type, const struct lyd_node *tree,
-        struct lyxp_set *set, int options);
+        struct lyxp_set *set, uint32_t options);
 
 #define LYXP_SCHEMA 0x01        /**< Apply data node access restrictions defined for 'when' and 'must' evaluation. */
 
@@ -312,7 +312,7 @@
  */
 LY_ERR lyxp_atomize(struct lyxp_expr *exp, LY_PREFIX_FORMAT format, const struct lys_module *local_mod,
         const struct lysc_node *ctx_scnode, enum lyxp_node_type ctx_scnode_type, struct lyxp_set *set,
-        int options);
+        uint32_t options);
 
 /* used only internally */
 #define LYXP_SCNODE_ALL 0x0E
@@ -377,7 +377,7 @@
  * information about expressions and their operators (fill repeat).
  * @return Filled expression structure or NULL on error.
  */
-struct lyxp_expr *lyxp_expr_parse(const struct ly_ctx *ctx, const char *expr, size_t expr_len, int reparse);
+struct lyxp_expr *lyxp_expr_parse(const struct ly_ctx *ctx, const char *expr, size_t expr_len, uint8_t reparse);
 
 /**
  * @brief Duplicate parsed XPath expression.
diff --git a/tests/utests/data/test_types.c b/tests/utests/data/test_types.c
index 900c9b2..ff4d20e 100644
--- a/tests/utests/data/test_types.c
+++ b/tests/utests/data/test_types.c
@@ -633,7 +633,7 @@
                    const struct lys_module *mod)
 {
     const char *str;
-    int dynamic;
+    uint8_t dynamic;
 
     assert_non_null(str = value->realtype->plugin->print(value, format, (void *)mod, &dynamic));
     assert_string_equal(expected_value, str);
diff --git a/tests/utests/schema/test_parser_yang.c b/tests/utests/schema/test_parser_yang.c
index efbd868..c8b3511 100644
--- a/tests/utests/schema/test_parser_yang.c
+++ b/tests/utests/schema/test_parser_yang.c
@@ -38,11 +38,11 @@
 
 LY_ERR buf_add_char(struct ly_ctx *ctx, struct ly_in *in, size_t len, char **buf, size_t *buf_len, size_t *buf_used);
 LY_ERR buf_store_char(struct lys_yang_parser_ctx *ctx, struct ly_in *in, enum yang_arg arg, char **word_p,
-                      size_t *word_len, char **word_b, size_t *buf_len, int need_buf, int *prefix);
+                      size_t *word_len, char **word_b, size_t *buf_len, uint8_t need_buf, uint8_t *prefix);
 LY_ERR get_keyword(struct lys_yang_parser_ctx *ctx, struct ly_in *in, enum ly_stmt *kw, char **word_p, size_t *word_len);
 LY_ERR get_argument(struct lys_yang_parser_ctx *ctx, struct ly_in *in, enum yang_arg arg,
                     uint16_t *flags, char **word_p, char **word_b, size_t *word_len);
-LY_ERR skip_comment(struct lys_yang_parser_ctx *ctx, struct ly_in *in, int comment);
+LY_ERR skip_comment(struct lys_yang_parser_ctx *ctx, struct ly_in *in, uint8_t comment);
 
 LY_ERR parse_action(struct lys_yang_parser_ctx *ctx, struct ly_in *in, struct lysp_node *parent, struct lysp_action **actions);
 LY_ERR parse_any(struct lys_yang_parser_ctx *ctx, struct ly_in *in, enum ly_stmt kw, struct lysp_node *parent, struct lysp_node **siblings);
@@ -143,7 +143,7 @@
     ctx.ctx = NULL;
     ctx.pos_type = LY_VLOG_LINE;
     ctx.line = 1;
-    int prefix = 0;
+    uint8_t prefix = 0;
 
     /* storing into buffer */
     in.current = "abcd";
@@ -190,9 +190,9 @@
 
     /* checking identifiers */
     assert_int_equal(LY_EVALID, lysp_check_identifierchar((struct lys_parser_ctx *)&ctx, ':', 0, NULL));
-    logbuf_assert("Invalid identifier character ':'. Line number 1.");
+    logbuf_assert("Invalid identifier character ':' (0x003a). Line number 1.");
     assert_int_equal(LY_EVALID, lysp_check_identifierchar((struct lys_parser_ctx *)&ctx, '#', 1, NULL));
-    logbuf_assert("Invalid identifier first character '#'. Line number 1.");
+    logbuf_assert("Invalid identifier first character '#' (0x0023). Line number 1.");
 
     assert_int_equal(LY_SUCCESS, lysp_check_identifierchar((struct lys_parser_ctx *)&ctx, 'a', 1, &prefix));
     assert_int_equal(0, prefix);
@@ -204,7 +204,7 @@
     assert_int_equal(2, prefix);
     /* second colon is invalid */
     assert_int_equal(LY_EVALID, lysp_check_identifierchar((struct lys_parser_ctx *)&ctx, ':', 0, &prefix));
-    logbuf_assert("Invalid identifier character ':'. Line number 1.");
+    logbuf_assert("Invalid identifier character ':' (0x003a). Line number 1.");
 }
 
 static void
diff --git a/tests/utests/schema/test_parser_yin.c b/tests/utests/schema/test_parser_yin.c
index 201de0d..1d0f011 100644
--- a/tests/utests/schema/test_parser_yin.c
+++ b/tests/utests/schema/test_parser_yin.c
@@ -754,7 +754,7 @@
     st->yin_ctx->xmlctx->value = "#invalid";
     st->yin_ctx->xmlctx->value_len = 8;
     assert_int_equal(yin_validate_value(st->yin_ctx, Y_IDENTIF_ARG), LY_EVALID);
-    logbuf_assert("Invalid identifier character '#'. Line number 1.");
+    logbuf_assert("Invalid identifier character '#' (0x0023). Line number 1.");
 
     st->yin_ctx->xmlctx->value = "";
     st->yin_ctx->xmlctx->value_len = 0;
diff --git a/tests/utests/schema/test_tree_schema_compile.c b/tests/utests/schema/test_tree_schema_compile.c
index e587bc2..cf30cdc 100644
--- a/tests/utests/schema/test_tree_schema_compile.c
+++ b/tests/utests/schema/test_tree_schema_compile.c
@@ -30,7 +30,7 @@
 void yang_parser_ctx_free(struct lys_yang_parser_ctx *ctx);
 
 LY_ERR lys_path_token(const char **path, const char **prefix, size_t *prefix_len, const char **name, size_t *name_len,
-                      int *parent_times, int *has_predicate);
+                      int32_t *parent_times, uint8_t *has_predicate);
 
 #define BUFSIZE 1024
 char logbuf[BUFSIZE] = {0};
@@ -204,7 +204,7 @@
     struct lysc_node_leaflist *ll;
     struct lysc_node_leaf *l;
     const char *dflt;
-    int dynamic;
+    uint8_t dynamic;
 
     assert_int_equal(LY_SUCCESS, ly_ctx_new(NULL, LY_CTX_DISABLE_SEARCHDIRS, &ctx));
 
@@ -1276,10 +1276,10 @@
     logbuf_assert("Duplicate identifier \"one\" of bit statement. Line number 1.");
     assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module aa {namespace urn:aa;prefix aa; leaf l {type bits {"
                                    "bit '11';}}}", LYS_IN_YANG, &mod));
-    logbuf_assert("Invalid identifier first character '1'. Line number 1.");
+    logbuf_assert("Invalid identifier first character '1' (0x0031). Line number 1.");
     assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module aa {namespace urn:aa;prefix aa; leaf l {type bits {"
                                    "bit 'x1$1';}}}", LYS_IN_YANG, &mod));
-    logbuf_assert("Invalid identifier character '$'. Line number 1.");
+    logbuf_assert("Invalid identifier character '$' (0x0024). Line number 1.");
 
     assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module bb {namespace urn:bb;prefix bb; leaf l {type bits;}}", LYS_IN_YANG, &mod));
     logbuf_assert("Missing bit substatement for bits type. /bb:l");
@@ -1519,7 +1519,8 @@
     struct lysc_type *type;
     const char *path, *name, *prefix;
     size_t prefix_len, name_len;
-    int parent_times, has_predicate;
+    int32_t parent_times;
+    uint8_t has_predicate;
 
     assert_int_equal(LY_SUCCESS, ly_ctx_new(NULL, LY_CTX_DISABLE_SEARCHDIRS, &ctx));
 
@@ -2016,7 +2017,7 @@
     const struct lys_module *mod;
     struct lysc_type *type;
     struct lysc_node_leaf *leaf;
-    int dynamic;
+    uint8_t dynamic;
 
     assert_int_equal(LY_SUCCESS, ly_ctx_new(NULL, LY_CTX_DISABLE_SEARCHDIRS, &ctx));
 
@@ -2357,7 +2358,7 @@
     struct lysc_node *parent, *child;
     struct lysc_node_leaf *leaf;
     struct lysc_node_leaflist *llist;
-    int dynamic;
+    uint8_t dynamic;
 
     assert_int_equal(LY_SUCCESS, ly_ctx_new(NULL, LY_CTX_DISABLE_SEARCHDIRS, &ctx));
 
@@ -2667,7 +2668,7 @@
     const struct lysc_node_leaflist *llist;
     const struct lysc_node_leaf *leaf;
     const char *str;
-    int dynamic;
+    uint8_t dynamic;
 
     assert_int_equal(LY_SUCCESS, ly_ctx_new(NULL, LY_CTX_DISABLE_SEARCHDIRS, &ctx));
 
diff --git a/tests/utests/test_context.c b/tests/utests/test_context.c
index 7fc369d..136663c 100644
--- a/tests/utests/test_context.c
+++ b/tests/utests/test_context.c
@@ -183,7 +183,7 @@
 
     struct ly_ctx *ctx;
 
-    assert_int_equal(LY_SUCCESS, ly_ctx_new(NULL, 0xffffffff, &ctx));
+    assert_int_equal(LY_SUCCESS, ly_ctx_new(NULL, 0xffff, &ctx));
 
     /* invalid arguments */
     assert_int_equal(0, ly_ctx_get_options(NULL));
diff --git a/tests/utests/test_hash_table.c b/tests/utests/test_hash_table.c
index 12a946e..c9943ba 100644
--- a/tests/utests/test_hash_table.c
+++ b/tests/utests/test_hash_table.c
@@ -119,8 +119,8 @@
 #endif
 }
 
-static int
-ht_equal_clb(void *val1, void *val2, int mod, void *cb_data)
+static uint8_t
+ht_equal_clb(void *val1, void *val2, uint8_t mod, void *cb_data)
 {
     int *v1, *v2;
     (void)mod;
