diff options
author | Tobias Burnus <tobias@codesourcery.com> | 2023-11-06 11:34:31 +0100 |
---|---|---|
committer | Tobias Burnus <tobias@codesourcery.com> | 2023-11-06 11:43:28 +0100 |
commit | 17df6ddcf11aef6d200305d35641a7deb2f430e1 (patch) | |
tree | 14a82441c9e62e644ab1ee9331050185380fd893 /gcc/function.cc | |
parent | f463ef79ddb403570461343ebda0c1aeac85d5bb (diff) | |
download | gcc-17df6ddcf11aef6d200305d35641a7deb2f430e1.zip gcc-17df6ddcf11aef6d200305d35641a7deb2f430e1.tar.gz gcc-17df6ddcf11aef6d200305d35641a7deb2f430e1.tar.bz2 |
libgfortran: Fix calloc call by swapping arg order [PR112364]
The prototype of calloc is
void *calloc(size_t nmemb, size_t size);
denoting "an array of nmemb objects, each of whose size is size." (C23)
In order to follow the meaning of the argument names and to silence
a -Walloc-size warning, this commit swaps the order of the two args
to read now: calloc (1, sizeof (transfer_queue));
libgfortran/ChangeLog:
PR libfortran/112364
* io/async.c (enqueue_transfer, enqueue_done_id, enqueue_done,
enqueue_close): Swap 1st and 2nd arg in calloc call.
Diffstat (limited to 'gcc/function.cc')
0 files changed, 0 insertions, 0 deletions