libyang REFACTOR add more compiler printf attributes

Some bugs fixed because of the new warnings.
diff --git a/src/tree_data_common.c b/src/tree_data_common.c
index 8d1de06..b19ba3a 100644
--- a/src/tree_data_common.c
+++ b/src/tree_data_common.c
@@ -489,8 +489,8 @@
             LOGVAL_ERRITEM(ctx, err);
             ly_err_free(err);
         } else {
-            LOGVAL(ctx, LYVE_OTHER, "Resolving value \"%s\" failed.", type->plugin->print(ctx, val, LY_VALUE_CANON,
-                    NULL, NULL, NULL));
+            LOGVAL(ctx, LYVE_OTHER, "Resolving value \"%s\" failed.",
+                    (char *)type->plugin->print(ctx, val, LY_VALUE_CANON, NULL, NULL, NULL));
         }
         return ret;
     }