summaryrefslogtreecommitdiff
path: root/lib/yang.h
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@opensourcerouting.org>2023-01-26 14:21:02 +0100
committerDavid Lamparter <equinox@opensourcerouting.org>2023-01-27 12:01:17 +0100
commit0f9de11a11644b77cc60d6ff6ac4519d2e5c29e1 (patch)
treec8e418c2049ef79101e62821f2b49506654eb4bd /lib/yang.h
parente784f789fb7af43027eeee55a3f16026ab36b9e4 (diff)
*: apply proper format string attributes
So that we get warnings about broken format strings. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'lib/yang.h')
-rw-r--r--lib/yang.h15
1 files changed, 9 insertions, 6 deletions
diff --git a/lib/yang.h b/lib/yang.h
index d625b24f6a..8b49df5e91 100644
--- a/lib/yang.h
+++ b/lib/yang.h
@@ -331,7 +331,8 @@ extern void yang_dnode_get_path(const struct lyd_node *dnode, char *xpath,
* Schema name of the libyang data node.
*/
extern const char *yang_dnode_get_schema_name(const struct lyd_node *dnode,
- const char *xpath_fmt, ...);
+ const char *xpath_fmt, ...)
+ PRINTFRR(2, 3);
/*
* Find a libyang data node by its YANG data path.
@@ -366,7 +367,8 @@ extern struct lyd_node *yang_dnode_get(const struct lyd_node *dnode,
* The libyang data node if found, or NULL if not found.
*/
extern struct lyd_node *yang_dnode_getf(const struct lyd_node *dnode,
- const char *path_fmt, ...);
+ const char *path_fmt, ...)
+ PRINTFRR(2, 3);
/*
* Check if a libyang data node exists.
@@ -400,7 +402,7 @@ extern bool yang_dnode_exists(const struct lyd_node *dnode, const char *xpath);
* true if a libyang data node was found, false otherwise.
*/
extern bool yang_dnode_existsf(const struct lyd_node *dnode,
- const char *xpath_fmt, ...);
+ const char *xpath_fmt, ...) PRINTFRR(2, 3);
/*
* Iterate over all libyang data nodes that satisfy an XPath query.
@@ -422,7 +424,7 @@ extern bool yang_dnode_existsf(const struct lyd_node *dnode,
*/
void yang_dnode_iterate(yang_dnode_iter_cb cb, void *arg,
const struct lyd_node *dnode, const char *xpath_fmt,
- ...);
+ ...) PRINTFRR(4, 5);
/*
* Check if the libyang data node contains a default value. Non-presence
@@ -459,7 +461,7 @@ extern bool yang_dnode_is_default(const struct lyd_node *dnode,
* true if the data node contains the default value, false otherwise.
*/
extern bool yang_dnode_is_defaultf(const struct lyd_node *dnode,
- const char *xpath_fmt, ...);
+ const char *xpath_fmt, ...) PRINTFRR(2, 3);
/*
* Check if the libyang data node and all of its children contain default
@@ -566,7 +568,8 @@ extern struct list *yang_data_list_new(void);
* Pointer to yang_data if found, NULL otherwise.
*/
extern struct yang_data *yang_data_list_find(const struct list *list,
- const char *xpath_fmt, ...);
+ const char *xpath_fmt, ...)
+ PRINTFRR(2, 3);
/*
* Create and set up a libyang context (for use by the translator)