11735 cardbus: cast between incompatible function types

Review Request #2339 - Created Sept. 20, 2019 and submitted

Information
Toomas Soome
illumos-gate
11735
9907fe3...
Reviewers
general
../../common/io/cardbus/cardbus.c: In function 'cardbus_enable_intr_impl':
../../common/io/cardbus/cardbus.c:2297:16: error: cast between incompatible function types from 'uint_t (*)(char *, char *)' {aka 'unsigned int (*)(char *, char *)'} to 'int (*)(int,  ...)' [-Werror=cast-function-type]
  sih.handler = (f_tt *)hdlp->ih_cb_func;
                ^
../../common/io/cardbus/cardbus.c: In function 'cardbus_disable_intr_impl':
../../common/io/cardbus/cardbus.c:2333:16: error: cast between incompatible function types from 'uint_t (*)(char *, char *)' {aka 'unsigned int (*)(char *, char *)'} to 'int (*)(int,  ...)' [-Werror=cast-function-type]
  cih.handler = (f_tt *)hdlp->ih_cb_func;
                ^
../../common/io/cardbus/cardbus_hp.c:1690:28: error: cast between incompatible function types from 'uint16_t (*)(struct __ddi_acc_handle *, off_t)' {aka 'short unsigned int (*)(struct __ddi_acc_handle *, long int)'} to 'int (*)()' [-Werror=cast-function-type]
      { "VendorId    =", 0, (int(*)())pci_config_get16, "%s 0x%04x" },
                            ^
../../common/io/cardbus/cardbus_hp.c:1691:28: error: cast between incompatible function types from 'uint16_t (*)(struct __ddi_acc_handle *, off_t)' {aka 'short unsigned int (*)(struct __ddi_acc_handle *, long int)'} to 'int (*)()' [-Werror=cast-function-type]
      { "DeviceId    =", 2, (int(*)())pci_config_get16, "%s 0x%04x" },
                            ^
../../common/io/cardbus/cardbus_hp.c:1692:28: error: cast between incompatible function types from 'uint16_t (*)(struct __ddi_acc_handle *, off_t)' {aka 'short unsigned int (*)(struct __ddi_acc_handle *, long int)'} to 'int (*)()' [-Werror=cast-function-type]
      { "Command     =", 4, (int(*)())pci_config_get16, "%s 0x%04x" },
                            ^
../../common/io/cardbus/cardbus_hp.c:1693:28: error: cast between incompatible function types from 'uint16_t (*)(struct __ddi_acc_handle *, off_t)' {aka 'short unsigned int (*)(struct __ddi_acc_handle *, long int)'} to 'int (*)()' [-Werror=cast-function-type]
      { "Status      =", 6, (int(*)())pci_config_get16, "%s 0x%04x" },
                            ^
../../common/io/cardbus/cardbus_hp.c:1694:30: error: cast between incompatible function types from 'uint8_t (*)(struct __ddi_acc_handle *, off_t)' {aka 'unsigned char (*)(struct __ddi_acc_handle *, long int)'} to 'int (*)()' [-Werror=cast-function-type]
      { "Latency     =", 0xd, (int(*)())pci_config_get8, "%s 0x%02x" },
                              ^
../../common/io/cardbus/cardbus_hp.c:1701:31: error: cast between incompatible function types from 'uint8_t (*)(struct __ddi_acc_handle *, off_t)' {aka 'unsigned char (*)(struct __ddi_acc_handle *, long int)'} to 'int (*)()' [-Werror=cast-function-type]
      { "ILINE       =", 0x3c, (int(*)())pci_config_get8, "%s 0x%02x" },
                               ^
../../common/io/cardbus/cardbus_hp.c:1702:31: error: cast between incompatible function types from 'uint8_t (*)(struct __ddi_acc_handle *, off_t)' {aka 'unsigned char (*)(struct __ddi_acc_handle *, long int)'} to 'int (*)()' [-Werror=cast-function-type]
      { "IPIN        =", 0x3d, (int(*)())pci_config_get8, "%s 0x%02x" },
                               ^
../../common/io/cardbus/cardbus_hp.c:1707:28: error: cast between incompatible function types from 'uint16_t (*)(struct __ddi_acc_handle *, off_t)' {aka 'short unsigned int (*)(struct __ddi_acc_handle *, long int)'} to 'int (*)()' [-Werror=cast-function-type]
      { "VendorId    =", 0, (int(*)())pci_config_get16, "%s 0x%04x" },
                            ^
../../common/io/cardbus/cardbus_hp.c:1708:28: error: cast between incompatible function types from 'uint16_t (*)(struct __ddi_acc_handle *, off_t)' {aka 'short unsigned int (*)(struct __ddi_acc_handle *, long int)'} to 'int (*)()' [-Werror=cast-function-type]
      { "DeviceId    =", 2, (int(*)())pci_config_get16, "%s 0x%04x" },
                            ^
../../common/io/cardbus/cardbus_hp.c:1709:28: error: cast between incompatible function types from 'uint16_t (*)(struct __ddi_acc_handle *, off_t)' {aka 'short unsigned int (*)(struct __ddi_acc_handle *, long int)'} to 'int (*)()' [-Werror=cast-function-type]
      { "Command     =", 4, (int(*)())pci_config_get16, "%s 0x%04x" },
                            ^
../../common/io/cardbus/cardbus_hp.c:1710:28: error: cast between incompatible function types from 'uint16_t (*)(struct __ddi_acc_handle *, off_t)' {aka 'short unsigned int (*)(struct __ddi_acc_handle *, long int)'} to 'int (*)()' [-Werror=cast-function-type]
      { "Status      =", 6, (int(*)())pci_config_get16, "%s 0x%04x" },
                            ^
../../common/io/cardbus/cardbus_hp.c:1711:30: error: cast between incompatible function types from 'uint8_t (*)(struct __ddi_acc_handle *, off_t)' {aka 'unsigned char (*)(struct __ddi_acc_handle *, long int)'} to 'int (*)()' [-Werror=cast-function-type]
      { "CacheLineSz =", 0xc, (int(*)())pci_config_get8, "%s 0x%02x" },
                              ^
../../common/io/cardbus/cardbus_hp.c:1712:30: error: cast between incompatible function types from 'uint8_t (*)(struct __ddi_acc_handle *, off_t)' {aka 'unsigned char (*)(struct __ddi_acc_handle *, long int)'} to 'int (*)()' [-Werror=cast-function-type]
      { "Latency     =", 0xd, (int(*)())pci_config_get8, "%s 0x%02x" },
                              ^
../../common/io/cardbus/cardbus_hp.c:1714:31: error: cast between incompatible function types from 'uint8_t (*)(struct __ddi_acc_handle *, off_t)' {aka 'unsigned char (*)(struct __ddi_acc_handle *, long int)'} to 'int (*)()' [-Werror=cast-function-type]
      { "Pri Bus     =", 0x18, (int(*)())pci_config_get8, "%s 0x%02x" },
                               ^
../../common/io/cardbus/cardbus_hp.c:1715:31: error: cast between incompatible function types from 'uint8_t (*)(struct __ddi_acc_handle *, off_t)' {aka 'unsigned char (*)(struct __ddi_acc_handle *, long int)'} to 'int (*)()' [-Werror=cast-function-type]
      { "Sec Bus     =", 0x19, (int(*)())pci_config_get8, "%s 0x%02x" },
                               ^
../../common/io/cardbus/cardbus_hp.c:1716:31: error: cast between incompatible function types from 'uint8_t (*)(struct __ddi_acc_handle *, off_t)' {aka 'unsigned char (*)(struct __ddi_acc_handle *, long int)'} to 'int (*)()' [-Werror=cast-function-type]
      { "Sub Bus     =", 0x1a, (int(*)())pci_config_get8, "%s 0x%02x" },
                               ^
../../common/io/cardbus/cardbus_hp.c:1717:31: error: cast between incompatible function types from 'uint8_t (*)(struct __ddi_acc_handle *, off_t)' {aka 'unsigned char (*)(struct __ddi_acc_handle *, long int)'} to 'int (*)()' [-Werror=cast-function-type]
      { "CBus Latency=", 0x1b, (int(*)())pci_config_get8, "%s 0x%02x" },
                               ^
../../common/io/cardbus/cardbus_hp.c:1726:31: error: cast between incompatible function types from 'uint8_t (*)(struct __ddi_acc_handle *, off_t)' {aka 'unsigned char (*)(struct __ddi_acc_handle *, long int)'} to 'int (*)()' [-Werror=cast-function-type]
      { "ILINE       =", 0x3c, (int(*)())pci_config_get8, "%s 0x%02x" },
                               ^
../../common/io/cardbus/cardbus_hp.c:1727:31: error: cast between incompatible function types from 'uint8_t (*)(struct __ddi_acc_handle *, off_t)' {aka 'unsigned char (*)(struct __ddi_acc_handle *, long int)'} to 'int (*)()' [-Werror=cast-function-type]
      { "IPIN        =", 0x3d, (int(*)())pci_config_get8, "%s 0x%02x" },
                               ^
../../common/io/cardbus/cardbus_hp.c:1728:31: error: cast between incompatible function types from 'uint16_t (*)(struct __ddi_acc_handle *, off_t)' {aka 'short unsigned int (*)(struct __ddi_acc_handle *, long int)'} to 'int (*)()' [-Werror=cast-function-type]
      { "Bridge Ctrl =", 0x3e, (int(*)())pci_config_get16, "%s 0x%04x" },
                               ^
cc1: all warnings being treated as errors

  
John Levon
Andy Fiddaman
Toomas Soome
Toomas Soome
Review request changed

Status: Closed (submitted)

Loading...