[PATCH nft v2 0/8] fix compiler warnings with clang

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


Building with clang caused some compiler warnings. Fix, suppress or work
around them.

Changes to v1:
- replace patches
    "src: use "%zx" format instead of "%Zx""
    "datatype: suppress "-Wformat-nonliteral" warning in integer_type_print()"
    "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
  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
  src: suppress "-Wunused-but-set-variable" warning with
  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(-)


[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux