All of lore.kernel.org
 help / color / mirror / Atom feed
* [ulogd2 PATCH v4 00/32] Fixes for compiler warnings
@ 2021-11-30 10:55 Jeremy Sowden
  2021-11-30 10:55 ` [ulogd2 PATCH v4 01/32] jhash: add "fall through" comments to switch cases Jeremy Sowden
                   ` (32 more replies)
  0 siblings, 33 replies; 38+ messages in thread
From: Jeremy Sowden @ 2021-11-30 10:55 UTC (permalink / raw)
  To: Netfilter Devel

This patch-set fixes all the warnings reported by gcc 11.

Most of the warnings concern fall-throughs in switches, possibly
problematic uses of functions like `strncpy` and `strncat` and possible
truncation of output by `sprintf` and its siblings.

Some of the patches fix bugs revealed by warnings, some tweak code to
avoid warnings, others fix or improve things I noticed while looking at
the warnings.

Changes since v3:

  * When publishing v3 I accidentally sent out two different versions of the
    patch-set under one cover-letter.  There are no code-changes in v4: it just
    omits the earlier superseded patches.
  
Changes since v2:

  * the first four patches of v2 have been merged;
  * some of the v2 patches have been broken up into more, smaller parts;
  * more detailed commit messages;
  * patches 14 and 17 are new.

Changes since v1:

  * patch 13: stat of socket removed;
  * patch 15: `struct iphdr` pointer removed;
  * patch 27 is new.

Jeremy Sowden (32):
  jhash: add "fall through" comments to switch cases
  db: add missing `break` to switch case
  filter: HWHDR: simplify flow-control
  filter: HWHDR: re-order KEY_RAW_MAC checks
  filter: HWHDR: remove zero-initialization of MAC type
  Replace malloc+memset with calloc
  filter: PWSNIFF: replace malloc+strncpy with strndup
  input: UNIXSOCK: remove stat of socket-path
  input: UNIXSOCK: fix possible truncation of socket path
  input: UNIXSOCK: prevent unaligned pointer access
  output: DBI: fix deprecation warnings
  output: DBI: improve mapping of DB columns to input-keys
  output: DBI: fix NUL-termination of escaped SQL string
  output: DBI: fix configuration of DB connection
  output: MYSQL: improve mapping of DB columns to input-keys
  output: PGSQL: improve mapping of DB columns to input-keys
  output: PGSQL: fix non-`connstring` configuration of DB connection
  output: SQLITE3: fix possible buffer overruns
  output: SQLITE3: fix memory-leak in error-handling
  output: SQLITE3: improve formatting of insert statement
  output: SQLITE3: improve mapping of DB columns to fields
  output: SQLITE3: improve mapping of fields to DB columns
  output: SQLITE3: catch errors creating SQL statement
  db: improve formatting of insert statement
  db: improve mapping of input-keys to DB columns
  db: simplify initialization of ring-buffer
  output: JSON: fix output of GMT offset
  output: JSON: increase time-stamp buffer size
  output: JSON: fix possible leak in error-handling.
  output: JSON: optimize appending of newline to output
  output: JSON: fix possible truncation of socket path
  output: IPFIX: remove compiler attribute macros

 filter/ulogd_filter_HWHDR.c           | 54 ++++++++---------
 filter/ulogd_filter_PWSNIFF.c         | 18 +++---
 include/ulogd/jhash.h                 | 24 ++++----
 include/ulogd/ulogd.h                 |  5 --
 input/packet/ulogd_inppkt_UNIXSOCK.c  | 46 +++++++--------
 output/dbi/ulogd_output_DBI.c         | 84 +++++++++++++--------------
 output/ipfix/ipfix.c                  |  6 +-
 output/ipfix/ipfix.h                  |  8 +--
 output/mysql/ulogd_output_MYSQL.c     | 20 +++----
 output/pgsql/ulogd_output_PGSQL.c     | 64 ++++++++------------
 output/sqlite3/ulogd_output_SQLITE3.c | 71 +++++++++++-----------
 output/ulogd_output_JSON.c            | 45 +++++++-------
 src/ulogd.c                           |  3 +-
 util/db.c                             | 36 ++++++------
 14 files changed, 223 insertions(+), 261 deletions(-)

-- 
2.33.0


^ permalink raw reply	[flat|nested] 38+ messages in thread

end of thread, other threads:[~2022-01-10  0:22 UTC | newest]

Thread overview: 38+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-30 10:55 [ulogd2 PATCH v4 00/32] Fixes for compiler warnings Jeremy Sowden
2021-11-30 10:55 ` [ulogd2 PATCH v4 01/32] jhash: add "fall through" comments to switch cases Jeremy Sowden
2021-11-30 10:55 ` [ulogd2 PATCH v4 02/32] db: add missing `break` to switch case Jeremy Sowden
2021-11-30 10:55 ` [ulogd2 PATCH v4 03/32] filter: HWHDR: simplify flow-control Jeremy Sowden
2021-11-30 10:55 ` [ulogd2 PATCH v4 04/32] filter: HWHDR: re-order KEY_RAW_MAC checks Jeremy Sowden
2021-11-30 10:55 ` [ulogd2 PATCH v4 05/32] filter: HWHDR: remove zero-initialization of MAC type Jeremy Sowden
2021-11-30 10:55 ` [ulogd2 PATCH v4 06/32] Replace malloc+memset with calloc Jeremy Sowden
2021-11-30 10:55 ` [ulogd2 PATCH v4 07/32] filter: PWSNIFF: replace malloc+strncpy with strndup Jeremy Sowden
2021-11-30 10:55 ` [ulogd2 PATCH v4 08/32] input: UNIXSOCK: remove stat of socket-path Jeremy Sowden
2021-11-30 10:55 ` [ulogd2 PATCH v4 09/32] input: UNIXSOCK: fix possible truncation of socket path Jeremy Sowden
2021-11-30 10:55 ` [ulogd2 PATCH v4 10/32] input: UNIXSOCK: prevent unaligned pointer access Jeremy Sowden
2021-11-30 10:55 ` [ulogd2 PATCH v4 11/32] output: DBI: fix deprecation warnings Jeremy Sowden
2021-11-30 10:55 ` [ulogd2 PATCH v4 12/32] output: DBI: improve mapping of DB columns to input-keys Jeremy Sowden
2021-11-30 10:55 ` [ulogd2 PATCH v4 13/32] output: DBI: fix NUL-termination of escaped SQL string Jeremy Sowden
2021-11-30 10:55 ` [ulogd2 PATCH v4 14/32] output: DBI: fix configuration of DB connection Jeremy Sowden
2021-11-30 10:55 ` [ulogd2 PATCH v4 15/32] output: MYSQL: improve mapping of DB columns to input-keys Jeremy Sowden
2021-11-30 10:55 ` [ulogd2 PATCH v4 16/32] output: PGSQL: " Jeremy Sowden
2021-11-30 10:55 ` [ulogd2 PATCH v4 17/32] output: PGSQL: fix non-`connstring` configuration of DB connection Jeremy Sowden
2021-11-30 10:55 ` [ulogd2 PATCH v4 18/32] output: SQLITE3: fix possible buffer overruns Jeremy Sowden
2021-11-30 10:55 ` [ulogd2 PATCH v4 19/32] output: SQLITE3: fix memory-leak in error-handling Jeremy Sowden
2021-11-30 10:55 ` [ulogd2 PATCH v4 20/32] output: SQLITE3: improve formatting of insert statement Jeremy Sowden
2021-11-30 10:55 ` [ulogd2 PATCH v4 21/32] output: SQLITE3: improve mapping of DB columns to fields Jeremy Sowden
2021-11-30 10:55 ` [ulogd2 PATCH v4 22/32] output: SQLITE3: improve mapping of fields to DB columns Jeremy Sowden
2021-11-30 10:55 ` [ulogd2 PATCH v4 23/32] output: SQLITE3: catch errors creating SQL statement Jeremy Sowden
2021-11-30 10:55 ` [ulogd2 PATCH v4 24/32] db: improve formatting of insert statement Jeremy Sowden
2021-11-30 10:55 ` [ulogd2 PATCH v4 25/32] db: improve mapping of input-keys to DB columns Jeremy Sowden
2021-11-30 10:55 ` [ulogd2 PATCH v4 26/32] db: simplify initialization of ring-buffer Jeremy Sowden
2021-11-30 10:55 ` [ulogd2 PATCH v4 27/32] output: JSON: fix output of GMT offset Jeremy Sowden
2021-11-30 10:55 ` [ulogd2 PATCH v4 28/32] output: JSON: increase time-stamp buffer size Jeremy Sowden
2021-11-30 10:55 ` [ulogd2 PATCH v4 29/32] output: JSON: fix possible leak in error-handling Jeremy Sowden
2021-11-30 10:55 ` [ulogd2 PATCH v4 30/32] output: JSON: optimize appending of newline to output Jeremy Sowden
2021-11-30 10:55 ` [ulogd2 PATCH v4 31/32] output: JSON: fix possible truncation of socket path Jeremy Sowden
2021-11-30 10:56 ` [ulogd2 PATCH v4 32/32] output: IPFIX: remove compiler attribute macros Jeremy Sowden
2021-12-06 22:20 ` [ulogd2 PATCH v4 00/32] Fixes for compiler warnings Pablo Neira Ayuso
2022-01-03 18:10   ` Pablo Neira Ayuso
2022-01-05 22:48     ` Jeremy Sowden
2022-01-10  0:22       ` Pablo Neira Ayuso
2022-01-06 21:00     ` Jeremy Sowden

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.