From: Mark Wielaard <mark@klomp.org>
To: Sergei Trofimovich <slyich@gmail.com>, elfutils-devel@sourceware.org
Subject: Re: [PATCH] tests: fix build against upcoming `gcc-14` (`-Werror=calloc-transposed-args`)
Date: Thu, 21 Dec 2023 22:23:43 +0100 [thread overview]
Message-ID: <f4d1d6705b776418381da34abca3c2f973d111c4.camel@klomp.org> (raw)
In-Reply-To: <20231221092330.1419516-1-slyich@gmail.com>
Hi Sergei,
On Thu, 2023-12-21 at 09:23 +0000, Sergei Trofimovich wrote:
> `gcc-14` added a new `-Wcalloc-transposed-args` warning recently. It
> detected minor infelicity in `calloc()` API usage in `elfutils`:
>
> elfstrmerge.c: In function 'main':
> elfstrmerge.c:450:32: error:
> 'calloc' sizes specified with 'sizeof' in the earlier argument and not in the later argument [-Werror=calloc-transposed-args]
> 450 | newscnbufs = calloc (sizeof (void *), newshnums);
> | ^~~~
> elfstrmerge.c:450:32: note: earlier argument should specify number of elements, later size of each element
>
Thanks, looks good. Pushed.
Cheers,
Mark
prev parent reply other threads:[~2023-12-21 21:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-21 9:23 Sergei Trofimovich
2023-12-21 21:23 ` Mark Wielaard [this message]
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=f4d1d6705b776418381da34abca3c2f973d111c4.camel@klomp.org \
--to=mark@klomp.org \
--cc=elfutils-devel@sourceware.org \
--cc=slyich@gmail.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 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 read-only IMAP folder(s) and NNTP newsgroup(s).