diff options
author | David Lamparter <equinox@opensourcerouting.org> | 2023-01-26 14:53:47 +0100 |
---|---|---|
committer | David Lamparter <equinox@opensourcerouting.org> | 2023-01-27 12:01:20 +0100 |
commit | c84e51870940311bb6ec67d8b192da1ce32cba8f (patch) | |
tree | 5d1c214da53ca54b575e0b9e7c66d3c2422b1751 /ldpd | |
parent | *: apply proper format string attributes (diff) | |
download | frr-c84e51870940311bb6ec67d8b192da1ce32cba8f.tar.xz frr-c84e51870940311bb6ec67d8b192da1ce32cba8f.zip |
*: no-warn pragmas for non-const format strings
We do use non-constant/literal format strings in a few places for more
or less valid reasons; put `ignored "-Wformat-nonliteral"` around those
so we can have the warning enabled for everywhere else.
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'ldpd')
-rw-r--r-- | ldpd/log.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ldpd/log.c b/ldpd/log.c index 1aaad41a1..88ce03095 100644 --- a/ldpd/log.c +++ b/ldpd/log.c @@ -77,7 +77,11 @@ log_warn(const char *emsg, ...) vlog(LOG_ERR, emsg, ap); logit(LOG_ERR, "%s", strerror(errno)); } else { +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wformat-nonliteral" + /* format extended above */ vlog(LOG_ERR, nfmt, ap); +#pragma GCC diagnostic pop free(nfmt); } va_end(ap); |