Skip to content

Move sizeof to second argument in calloc calls

Clears -Wcalloc-transposed-args warnings from gcc 14.1, such as:

r128_dri.c: In function ‘R128DRIScreenInit’:
r128_dri.c:822:48: warning: ‘calloc’ sizes specified with ‘sizeof’ in the
 earlier argument and not in the later argument [-Wcalloc-transposed-args]
  822 |     if (!(pR128DRI = (R128DRIPtr)calloc(sizeof(R128DRIRec),1))) {
      |                                                ^~~~~~~~~~
r128_dri.c:822:48: note: earlier argument should specify number of elements,
 later size of each element

Signed-off-by: Alan Coopersmith

Merge request reports