Skip to content
  • Alan Coopersmith's avatar
    Move sizeof to second argument in calloc calls · 6c2a8e59
    Alan Coopersmith authored
    
    
    Clears -Wcalloc-transposed-args warnings from gcc 14.1, such as:
    
    kbd.c: In function ‘KbdPreInit’:
    kbd.c:160:32: warning: ‘calloc’ sizes specified with ‘sizeof’ in the
     earlier argument and not in the later argument [-Wcalloc-transposed-args]
      160 |     if (!(pKbd = calloc(sizeof(KbdDevRec), 1))) {
          |                                ^~~~~~~~~
    kbd.c:160:32: 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: <!14>
    6c2a8e59
Loading