summaryrefslogtreecommitdiffstats
path: root/src/evaluate.c
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2023-08-29 14:53:37 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2023-08-29 20:03:42 +0200
commit0ba90cceaf8693a392196112c809302271259758 (patch)
treec0667affe1d7f21c2a0b31c646e577c8ccda7054 /src/evaluate.c
parent83d1a6733691d8bbb9ca1b9c195591794074337d (diff)
include: drop "format" attribute from nft_gmp_print()
nft_gmp_print() passes the format string and arguments to gmp_vfprintf(). Note that the format string is then interpreted by gmp, which also understand special specifiers like "%Zx". Note that with clang we get various compiler warnings: datatype.c:299:26: error: invalid conversion specifier 'Z' [-Werror,-Wformat-invalid-specifier] nft_gmp_print(octx, "0x%Zx [invalid type]", expr->value); ~^ gcc doesn't warn, because to gcc 'Z' is a deprecated alias for 'z' and because the 3rd argument of the attribute((format())) is zero (so gcc doesn't validate the arguments). But Z specifier in gmp expects a "mpz_t" value and not a size_t. It's really not the same thing. The correct solution is not to mark the function to accept a printf format string. Fixes: 2535ba7006f2 ('src: get rid of printf') Signed-off-by: Thomas Haller <thaller@redhat.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/evaluate.c')
0 files changed, 0 insertions, 0 deletions