aboutsummaryrefslogtreecommitdiff
path: root/libgcc/libgcov-util.c
diff options
context:
space:
mode:
authorPeter Damianov <peter0x44@disroot.org>2024-05-03 01:02:35 -0700
committerRichard Biener <rguenther@suse.de>2024-05-03 13:24:10 +0200
commitc5245c869f0468ddb67c6d996219bd443610673c (patch)
treed3e84974ea93810a6ba599f3eb64dbe940fa9322 /libgcc/libgcov-util.c
parent212d93f4b3a2b63817b7b32efa1d910e5720ddc6 (diff)
downloadgcc-c5245c869f0468ddb67c6d996219bd443610673c.zip
gcc-c5245c869f0468ddb67c6d996219bd443610673c.tar.gz
gcc-c5245c869f0468ddb67c6d996219bd443610673c.tar.bz2
Silence two instances of -Wcalloc-transposed-args
libgcc/ * libgcov-util.c (tag_counters): Swap order of arguments to xcalloc. (topen_to_memory_representation): Likewise. Signed-off-by: Peter Damianov <peter0x44@disroot.org>
Diffstat (limited to 'libgcc/libgcov-util.c')
-rw-r--r--libgcc/libgcov-util.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libgcc/libgcov-util.c b/libgcc/libgcov-util.c
index ba4b90a..f443408 100644
--- a/libgcc/libgcov-util.c
+++ b/libgcc/libgcov-util.c
@@ -211,8 +211,8 @@ tag_counters (unsigned tag, int length)
gcc_assert (k_ctrs[tag_ix].num == 0);
k_ctrs[tag_ix].num = n_counts;
- k_ctrs[tag_ix].values = values = (gcov_type *) xcalloc (sizeof (gcov_type),
- n_counts);
+ k_ctrs[tag_ix].values = values = (gcov_type *) xcalloc (n_counts,
+ sizeof (gcov_type));
gcc_assert (values);
if (length > 0)
@@ -526,7 +526,7 @@ topn_to_memory_representation (struct gcov_ctr_info *info)
if (n > 0)
{
struct gcov_kvp *tuples
- = (struct gcov_kvp *)xcalloc (sizeof (struct gcov_kvp), n);
+ = (struct gcov_kvp *)xcalloc (n, sizeof (struct gcov_kvp));
for (unsigned i = 0; i < n - 1; i++)
tuples[i].next = &tuples[i + 1];
for (unsigned i = 0; i < n; i++)