netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Phil Sutter <phil@nwl.cc>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: [conntrack-tools PATCH] src: Eliminate warnings with -Wcalloc-transposed-args
Date: Wed, 6 Nov 2024 00:17:32 +0100	[thread overview]
Message-ID: <ZyqnjF-rGIfSCrte@orbyte.nwl.cc> (raw)
In-Reply-To: <Zyqlyj0FKU7XeUD5@calendula>

On Wed, Nov 06, 2024 at 12:10:02AM +0100, Pablo Neira Ayuso wrote:
> On Tue, Nov 05, 2024 at 10:54:50PM +0100, Phil Sutter wrote:
> > calloc() expects the number of elements in the first parameter, not the
> > second. Swap them and while at it drop one pointless cast (the function
> > returns a void pointer anyway).
> 
> BTW, will you add
> 
> -Wcalloc-transposed-args
> 
> to Makefile.am?

The gcc-14.2.1_p20240921 here seems to have this enabled by default. I
did not pass any special configure or make options.

Cheers, Phil

  reply	other threads:[~2024-11-05 23:17 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-05 21:54 [conntrack-tools PATCH] src: Eliminate warnings with -Wcalloc-transposed-args Phil Sutter
2024-11-05 22:01 ` Florian Westphal
2024-11-05 22:55 ` Phil Sutter
2024-11-05 23:10 ` Pablo Neira Ayuso
2024-11-05 23:17   ` Phil Sutter [this message]
2024-11-05 23:21     ` Pablo Neira Ayuso

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=ZyqnjF-rGIfSCrte@orbyte.nwl.cc \
    --to=phil@nwl.cc \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=pablo@netfilter.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).