binutils: Fix calloc argument order in srconv.c
commit91e9420f18112b7046fcaeda618df07a17b7e93a
authorMark Wielaard <mark@klomp.org>
Sun, 21 Jan 2024 23:47:46 +0000 (22 00:47 +0100)
committerMark Wielaard <mark@klomp.org>
Mon, 22 Jan 2024 17:20:21 +0000 (22 18:20 +0100)
tree71937f7b5ca43373591de7700bc2059f9b464fe9
parentdd0c018e72c035330cb4bf8aeeb4e7aa0c9e1337
binutils: Fix calloc argument order in srconv.c

GCC 14 will warn about calling calloc with swapped size and count
arguments.

binutils/srconv.c: In function ‘nints’:
binutils/srconv.c:598:36: error: ‘xcalloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument [-Werror=calloc-transposed-args]
  598 |   return (int *) (xcalloc (sizeof (int), x));
      |                                    ^~~
binutils/srconv.c:598:36: note: earlier argument should specify number of elements, later size of each element

binutils/

* srconv.c (nints): Swap xcalloc arguments.
(wr_du): Likewise.
(wr_dus): Likewise.
binutils/srconv.c