summaryrefslogtreecommitdiffstats
path: root/lib/yang_translator.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/yang_translator.c')
-rw-r--r--lib/yang_translator.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/yang_translator.c b/lib/yang_translator.c
index d562e4d29..67b7f9aa7 100644
--- a/lib/yang_translator.c
+++ b/lib/yang_translator.c
@@ -339,8 +339,12 @@ yang_translate_xpath(const struct yang_translator *translator, int dir,
if (!mapping)
return YANG_TRANSLATE_NOTFOUND;
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wformat-nonliteral"
+ /* processing format strings from mapping node... */
n = sscanf(xpath, mapping->xpath_from_fmt, keys[0], keys[1], keys[2],
keys[3]);
+#pragma GCC diagnostic pop
if (n < 0) {
flog_warn(EC_LIB_YANG_TRANSLATION_ERROR,
"%s: sscanf() failed: %s", __func__,
@@ -348,8 +352,12 @@ yang_translate_xpath(const struct yang_translator *translator, int dir,
return YANG_TRANSLATE_FAILURE;
}
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wformat-nonliteral"
+ /* processing format strings from mapping node... */
snprintf(xpath, xpath_len, mapping->xpath_to_fmt, keys[0], keys[1],
keys[2], keys[3]);
+#pragma GCC diagnostic pop
return YANG_TRANSLATE_SUCCESS;
}