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 /watchfrr | |
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 'watchfrr')
-rw-r--r-- | watchfrr/watchfrr.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/watchfrr/watchfrr.c b/watchfrr/watchfrr.c index 2b0fec1b2..c37626ccc 100644 --- a/watchfrr/watchfrr.c +++ b/watchfrr/watchfrr.c @@ -512,7 +512,11 @@ static int run_job(struct restart_info *restart, const char *cmdtype, restart->kills = 0; { char cmd[strlen(command) + strlen(restart->name) + 1]; +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wformat-nonliteral" + /* user supplied command string has a %s for the daemon name */ snprintf(cmd, sizeof(cmd), command, restart->name); +#pragma GCC diagnostic pop if ((restart->pid = run_background(cmd)) > 0) { thread_add_timer(master, restart_kill, restart, gs.restart_timeout, &restart->t_kill); |