libyang REFACTOR add more compiler printf attributes

Some bugs fixed because of the new warnings.
diff --git a/src/tree_schema_common.c b/src/tree_schema_common.c
index 5580809..a6e2036 100644
--- a/src/tree_schema_common.c
+++ b/src/tree_schema_common.c
@@ -104,7 +104,7 @@
 
 error:
     if (stmt) {
-        LOGVAL_PARSER(ctx, LY_VCODE_INVAL, date_len, date, stmt);
+        LOGVAL_PARSER(ctx, LY_VCODE_INVAL, (int)date_len, date, stmt);
     }
     return LY_EINVAL;
 }
@@ -140,10 +140,10 @@
                 (int)name_len, name);
         return LY_EVALID;
     } else {
-        for (size_t u = 0; u < name_len; ++u) {
+        for (uint32_t u = 0; u < name_len; ++u) {
             if (iscntrl(name[u])) {
-                LOGWRN(PARSER_CTX(ctx), "Control characters in enum name should be avoided (\"%.*s\", character number %d).",
-                        (int)name_len, name, u + 1);
+                LOGWRN(PARSER_CTX(ctx), "Control characters in enum name should be avoided "
+                        "(\"%.*s\", character number %" PRIu32 ").", (int)name_len, name, u + 1);
                 break;
             }
         }