Skip to content
  • Alan Coopersmith's avatar
    Fix -Wcalloc-transposed-args warnings · 8ef3f9e4
    Alan Coopersmith authored
    
    
    From gcc 14.1:
    
    Eyes.c: In function ‘EyesConfigure’:
    Eyes.c:132:45: warning: ‘calloc’ sizes specified with ‘sizeof’ in the
     earlier argument and not in the later argument [-Wcalloc-transposed-args]
      132 |         EyeConfiguration *c = calloc(sizeof(EyeConfiguration), 1);
          |                                             ^~~~~~~~~~~~~~~~
    Eyes.c:132:45: note: earlier argument should specify number of elements,
     later size of each element
    
    Eyes.c: In function ‘Initialize’:
    Eyes.c:409:36: warning: ‘calloc’ sizes specified with ‘sizeof’ in the
     earlier argument and not in the later argument [-Wcalloc-transposed-args]
      409 |     TPoint *pupils = calloc(sizeof(TPoint), config->count);
          |                                    ^~~~~~
    Eyes.c:409:36: note: earlier argument should specify number of elements,
     later size of each element
    
    Signed-off-by: default avatarAlan Coopersmith <alan.coopersmith@oracle.com>
    Part-of: <https://gitlab.freedesktop.org/xorg/app/xey...
    8ef3f9e4