11798 apix: cast between incompatible function types

Review Request #2384 — Created Oct. 10, 2019 and submitted

tsoome
illumos-gate
11798
49c793a...
general
../../i86pc/io/apix/apix.c:623:25: error: cast between incompatible function types from 'void (*)(char *, struct regs *)' to 'uint_t (*)(char *, char *)' {aka 'unsigned int (*)(char *, char *)'} [-Werror=cast-function-type]
  if (!psm_add_nmintr(0, (avfunc) apic_nmi_intr,
                         ^

../../i86pc/io/hpet_acpi.c:353:33: error: cast between incompatible function types from 'uint_t (*)(char *)' {aka 'unsigned int (*)(char *)'} to 'uint_t (*)(char *, char *)' {aka 'unsigned int (*)(char *, char *)'} [-Werror=cast-function-type]
  rem_avintr(NULL, CBE_HIGH_PIL, (avfunc)&hpet_isr,
                                 ^
../../i86pc/io/hpet_acpi.c: In function 'hpet_install_interrupt_handler':
../../i86pc/io/hpet_acpi.c:617:42: error: cast between incompatible function types from 'uint_t (*)(char *)' {aka 'unsigned int (*)(char *)'} to 'uint_t (*)(char *, char *)' {aka 'unsigned int (*)(char *, char *)'} [-Werror=cast-function-type]
  retval = add_avintr(NULL, CBE_HIGH_PIL, (avfunc)func, "HPET Timer",
                                          ^
cc1: all warnings being treated as errors


  • 0
  • 0
  • 4
  • 0
  • 4
Description From Last Updated
jlevon
  1. 
      
  2. usr/src/uts/i86pc/io/hpet_acpi.c (Diff revision 1)
     
     

    arg should be 'avfunc'

  3. usr/src/uts/i86pc/io/hpet_acpi.c (Diff revision 1)
     
     

    first arg should be __unused too?

    1. yes, apparently it is also unused. .. -Wno-unused-parameter -Wno-unused

  4. mark both as __unused, remove :807?

  5. I'm not sure this is right

    1. hm. I guess yep, we should claim it.

  6. 
      
tsoome
jlevon
  1. Ship It!
  2. 
      
tsoome
Review request changed

Status: Closed (submitted)

Loading...