summaryrefslogtreecommitdiffstats
path: root/bgpd/bgp_dump.c
diff options
context:
space:
mode:
authorDonald Sharp <donaldsharp72@gmail.com>2023-01-31 15:01:32 +0100
committerGitHub <noreply@github.com>2023-01-31 15:01:32 +0100
commitea768492f1499830292eec0a31b968e045d598f1 (patch)
tree7c1319f14ca28f5fd7b5ef79bd259b0ec9a1db9e /bgpd/bgp_dump.c
parentMerge pull request #12710 from opensourcerouting/fix/reset_fqdn_capability_on... (diff)
parentbuild: enable format string warnings (diff)
downloadfrr-ea768492f1499830292eec0a31b968e045d598f1.tar.xz
frr-ea768492f1499830292eec0a31b968e045d598f1.zip
Merge pull request #12695 from opensourcerouting/format-warnings
build: `-Wformat-nonliteral -Wformat-security`
Diffstat (limited to 'bgpd/bgp_dump.c')
-rw-r--r--bgpd/bgp_dump.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/bgpd/bgp_dump.c b/bgpd/bgp_dump.c
index 254996eda..98a2f95ea 100644
--- a/bgpd/bgp_dump.c
+++ b/bgpd/bgp_dump.c
@@ -117,9 +117,13 @@ static FILE *bgp_dump_open_file(struct bgp_dump *bgp_dump)
if (bgp_dump->filename[0] != DIRECTORY_SEP) {
snprintf(fullpath, sizeof(fullpath), "%s/%s", vty_get_cwd(),
bgp_dump->filename);
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wformat-nonliteral"
+ /* user supplied date/time format string */
ret = strftime(realpath, MAXPATHLEN, fullpath, &tm);
} else
ret = strftime(realpath, MAXPATHLEN, bgp_dump->filename, &tm);
+#pragma GCC diagnostic pop
if (ret == 0) {
flog_warn(EC_BGP_DUMP, "%s: strftime error", __func__);