Project

General

Profile

Actions

Bug #14053

open

px: cast between incompatible function types

Added by Toomas Soome 21 days ago. Updated 20 days ago.

Status:
In Progress
Priority:
Normal
Assignee:
Category:
driver - device drivers
Start date:
Due date:
% Done:

90%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:

Description

Build errors on SPARC:

    ../../sun4/io/px/px_pec.c: In function 'px_pec_msg_add_intr':
    ../../sun4/io/px/px_pec.c:155:19: error: cast between incompatible function types from 'uint_t (*)(px_t *, msgcode_t,  pcie_req_id_t)' {aka 'unsigned int (*)(struct px *, unsigned int,  short unsigned int)'} to 'uint_t (*)(char *, char *)' {aka 'unsigned int (*)(char *, char *)'} [-Werror=cast-function-type]
      155 |  hdl.ih_cb_func = (ddi_intr_handler_t *)px_err_fabric_intr;
          |                   ^
    cc1: all warnings being treated as errors

    ../../sun4/io/px/px.c: In function 'px_pwr_setup':
    ../../sun4/io/px/px.c:647:19: 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]
      647 |  hdl.ih_cb_func = (ddi_intr_handler_t *)px_pmeq_intr;
          |                   ^
    cc1: all warnings being treated as errors

    ../../sun4/io/px/px_ib.c: In function 'px_ib_attach':
    ../../sun4/io/px/px_ib.c:87:23: error: assignment to 'uint_t (*)(char *, char *)' {aka 'unsigned int (*)(char *, char *)'} from incompatible pointer type 'uint_t (*)(char *)' {aka 'unsigned int (*)(char *)'} [-Werror=incompatible-pointer-types]
       87 |  fault_p->px_err_func = px_err_dmc_pec_intr;
          |                       ^
    cc1: all warnings being treated as errors

    In file included from ../../common/sys/ddi_intr.h:114,
                     from ../../common/sys/devops.h:46,
                     from ../../common/sys/sunddi.h:40,
                     from ../../sun4/io/px/px_intr.c:36:
    ../../sun4/io/px/px_intr.c: In function 'px_add_intx_intr':
    ../../sun4/io/px/px_intr.c:1028:6: 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]
     1028 |      (ddi_intr_handler_t *)px_intx_intr, (caddr_t)ipil_p, NULL);
          |      ^
    ../../common/sys/ddi_intr_impl.h:365:21: note: in definition of macro 'DDI_INTR_ASSIGN_HDLR_N_ARGS'
      365 |  hdlp->ih_cb_func = func; \
          |                     ^~~~
    ../../sun4/io/px/px_intr.c: In function 'px_add_msiq_intr':
    ../../sun4/io/px/px_intr.c:1230:6: 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]
     1230 |      (ddi_intr_handler_t *)px_msiq_intr, (caddr_t)ipil_p, NULL);
          |      ^
    ../../common/sys/ddi_intr_impl.h:365:21: note: in definition of macro 'DDI_INTR_ASSIGN_HDLR_N_ARGS'
      365 |  hdlp->ih_cb_func = func; \
          |                     ^~~~
    cc1: all warnings being treated as errors

    In file included from ../../common/sys/model.h:35,
                     from ../../common/sys/resource.h:221,
                     from ../../common/sys/user.h:73,
                     from ../../common/sys/proc.h:37,
                     from ../../common/sys/systm.h:40,
                     from ../../common/sys/conf.h:57,
                     from ../../sun4u/io/px/px_lib4u.c:27:
    ../../sun4u/io/px/px_lib4u.c: In function 'px_err_add_intr':
    ../../sun4u/io/px/px_lib4u.c:2102:6: 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]
     2102 |      (intrfunc)px_fault_p->px_err_func, (caddr_t)px_fault_p,
          |      ^
    ../../common/sys/debug.h:57:29: note: in definition of macro 'VERIFY'
       57 | #define VERIFY(EX) ((void)((EX) || assfail(#EX, __FILE__, __LINE__)))
          |                             ^~
    ../../sun4u/io/px/px_lib4u.c: In function 'px_cb_add_intr':
    ../../sun4u/io/px/px_lib4u.c:2206:6: 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]
     2206 |      (intrfunc)cb_p->px_cb_func, (caddr_t)cb_p, NULL, NULL) == 0);
          |      ^
    ../../common/sys/debug.h:57:29: note: in definition of macro 'VERIFY'
       57 | #define VERIFY(EX) ((void)((EX) || assfail(#EX, __FILE__, __LINE__)))
          |                             ^~
    cc1: all warnings being treated as errors

    ../../sun4v/io/px/px_lib4v.c:2066:1: error: conflicting types for 'px_pmeq_intr'
     2066 | px_pmeq_intr(caddr_t arg)
          | ^~~~~~~~~~~~
    In file included from ../../sun4/io/px/px_obj.h:39,
                     from ../../sun4v/io/px/px_lib4v.c:38:
    ../../sun4/io/px/px_lib.h:161:15: note: previous declaration of 'px_pmeq_intr' was here
      161 | extern uint_t px_pmeq_intr(caddr_t, caddr_t);
          |               ^~~~~~~~~~~~
    *** Error code 1
    dmake: Warning: Command failed for target `obj64/px_lib4v.o'
    Current working directory /code/illumos-gate/usr/src/uts/sun4v/px

Actions #1

Updated by Toomas Soome 20 days ago

  • Description updated (diff)
Actions

Also available in: Atom PDF