This fixes Clang-Tidy warnings Signed-off-by: Sergey Ponomarev <stok...@gmail.com> --- jshn.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/jshn.c b/jshn.c index 7a2f935..43a82e0 100644 --- a/jshn.c +++ b/jshn.c @@ -36,7 +36,7 @@ static struct avl_tree env_vars; static struct blob_buf b = { 0 }; static const char *var_prefix = ""; -static int var_prefix_len = 0; +static size_t var_prefix_len = 0; static int add_json_element(const char *key, json_object *obj); @@ -62,11 +62,11 @@ static int add_json_object(json_object *obj) static int add_json_array(struct array_list *a) { char seq[12]; - int i, len; + size_t i, len; int ret; for (i = 0, len = array_list_length(a); i < len; i++) { - snprintf(seq, sizeof(seq), "%d", i); + snprintf(seq, sizeof(seq), "%zu", i); ret = add_json_element(seq, array_list_get_idx(a, i)); if (ret) return ret; @@ -78,7 +78,7 @@ static int add_json_array(struct array_list *a) static void add_json_string(const char *str) { char *ptr = (char *) str; - int len; + size_t len; char *c; while ((c = strchr(ptr, '\'')) != NULL) { -- 2.27.0 _______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel