From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Thomas Haller <thaller@redhat.com>
Cc: NetFilter <netfilter-devel@vger.kernel.org>
Subject: Re: [PATCH nft v2 0/8] fix compiler warnings with clang
Date: Tue, 29 Aug 2023 17:00:35 +0200 [thread overview]
Message-ID: <ZO4IEwJPaP9FZiqF@calendula> (raw)
In-Reply-To: <20230829125809.232318-1-thaller@redhat.com>
On Tue, Aug 29, 2023 at 02:53:29PM +0200, Thomas Haller wrote:
> Building with clang caused some compiler warnings. Fix, suppress or work
> around them.
Series LGTM, applied.
The ugly macro can go away later, once meta_parse_key() is removed
when bison/flex use start conditions for this, and probably log prefix
is reviewed not to use it anymore. I still think that macro is not
looking any better after this update but this is not a deal breaker
for this series.
BTW, would you extend tests/build to check for run build tests for
clang in a follow up patch? That would help a lot to improve coverage,
and reduce chances compilation with clang breaks again in the future
before a release.
Thanks.
> Changes to v1:
> - replace patches
> "src: use "%zx" format instead of "%Zx""
> "utils: add _NFT_PRAGMA_WARNING_DISABLE()/_NFT_PRAGMA_WARNING_REENABLE helpers"
> "datatype: suppress "-Wformat-nonliteral" warning in integer_type_print()"
> with
> "include: drop "format" attribute from nft_gmp_print()"
> which is the better solution.
> - let SNPRINTF_BUFFER_SIZE() not assert against truncation. Instead, the
> callers handle it.
> - add bugfix "evaluate: fix check for truncation in stmt_evaluate_log_prefix()"
> - add minor patch "evaluate: don't needlessly clear full string buffer in stmt_evaluate_log_prefix()"
>
> Thomas Haller (8):
> netlink: avoid "-Wenum-conversion" warning in dtype_map_from_kernel()
> netlink: avoid "-Wenum-conversion" warning in parser_bison.y
> datatype: avoid cast-align warning with struct sockaddr result from
> getaddrinfo()
> evaluate: fix check for truncation in stmt_evaluate_log_prefix()
> src: rework SNPRINTF_BUFFER_SIZE() and handle truncation
> evaluate: don't needlessly clear full string buffer in
> stmt_evaluate_log_prefix()
> src: suppress "-Wunused-but-set-variable" warning with
> "parser_bison.c"
> include: drop "format" attribute from nft_gmp_print()
>
> include/nftables.h | 3 +--
> include/utils.h | 35 ++++++++++++++++++++++++++---------
> src/Makefile.am | 1 +
> src/datatype.c | 14 +++++++++++---
> src/evaluate.c | 15 ++++++++++-----
> src/meta.c | 11 ++++++-----
> src/netlink.c | 2 +-
> src/parser_bison.y | 4 ++--
> 8 files changed, 58 insertions(+), 27 deletions(-)
>
> --
> 2.41.0
>
next prev parent reply other threads:[~2023-08-29 15:01 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-29 12:53 [PATCH nft v2 0/8] fix compiler warnings with clang Thomas Haller
2023-08-29 12:53 ` [PATCH nft v2 1/8] netlink: avoid "-Wenum-conversion" warning in dtype_map_from_kernel() Thomas Haller
2023-08-29 12:53 ` [PATCH nft v2 2/8] netlink: avoid "-Wenum-conversion" warning in parser_bison.y Thomas Haller
2023-08-29 12:53 ` [PATCH nft v2 3/8] datatype: avoid cast-align warning with struct sockaddr result from getaddrinfo() Thomas Haller
2023-08-29 12:53 ` [PATCH nft v2 4/8] evaluate: fix check for truncation in stmt_evaluate_log_prefix() Thomas Haller
2023-08-29 12:53 ` [PATCH nft v2 5/8] src: rework SNPRINTF_BUFFER_SIZE() and handle truncation Thomas Haller
2023-08-29 12:53 ` [PATCH nft v2 6/8] evaluate: don't needlessly clear full string buffer in stmt_evaluate_log_prefix() Thomas Haller
2023-08-29 18:08 ` Pablo Neira Ayuso
2023-08-29 18:55 ` Thomas Haller
2023-08-29 12:53 ` [PATCH nft v2 7/8] src: suppress "-Wunused-but-set-variable" warning with "parser_bison.c" Thomas Haller
2023-08-29 12:53 ` [PATCH nft v2 8/8] include: drop "format" attribute from nft_gmp_print() Thomas Haller
2023-08-29 15:00 ` Pablo Neira Ayuso [this message]
2023-08-29 17:52 ` [PATCH nft v2 0/8] fix compiler warnings with clang Thomas Haller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZO4IEwJPaP9FZiqF@calendula \
--to=pablo@netfilter.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=thaller@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.