diff options
author | Donald Sharp <donaldsharp72@gmail.com> | 2023-01-31 15:01:32 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-31 15:01:32 +0100 |
commit | ea768492f1499830292eec0a31b968e045d598f1 (patch) | |
tree | 7c1319f14ca28f5fd7b5ef79bd259b0ec9a1db9e /bgpd/bgp_dump.c | |
parent | Merge pull request #12710 from opensourcerouting/fix/reset_fqdn_capability_on... (diff) | |
parent | build: enable format string warnings (diff) | |
download | frr-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.c | 4 |
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__); |