11720 rpcmod: cast between incompatible function types

Review Request #2324 — Created Sept. 20, 2019 and submitted

tsoome
illumos-gate
11720
5ce8f83...
general

../../common/rpc/rpcmod.c:240:2: error: cast between incompatible function types from 'void (*)(queue_t *, mblk_t *)' {aka 'void (*)(struct queue *, struct msgb *)'} to 'int (*)()' [-Werror=cast-function-type]
(int (*)())rmm_rput,
^
../../common/rpc/rpcmod.c:241:2: error: cast between incompatible function types from 'void (*)(queue_t *)' {aka 'void (*)(struct queue *)'} to 'int (*)()' [-Werror=cast-function-type]
(int (*)())rmm_rsrv,
^
../../common/rpc/rpcmod.c:255:2: error: cast between incompatible function types from 'void (*)(queue_t *, mblk_t *)' {aka 'void (*)(struct queue *, struct msgb *)'} to 'int (*)()' [-Werror=cast-function-type]
(int (*)())rmm_wput,
^
../../common/rpc/rpcmod.c:256:2: error: cast between incompatible function types from 'void (*)(queue_t *)' {aka 'void (*)(struct queue *)'} to 'int (*)()' [-Werror=cast-function-type]
(int (*)())rmm_wsrv,
^

../../common/rpc/clnt_clts.c: In function 'endpnt_repossess':
../../common/rpc/clnt_clts.c:2008:7: error: cast between incompatible function types from 'void (*)(zoneid_t)' {aka 'void (*)(int)'} to 'void (*)(void *)' [-Werror=cast-function-type]
(task_func_t *)endpnt_reclaim, (void *)ALL_ZONES,
^

cc1: all warnings being treated as errors



marcel
  1. I'm unable to find a fix for this:

    ../../common/rpc/rpcmod.c: In function 'mir_wput_other':
    ../../common/rpc/rpcmod.c:2500:3: error: this statement may fall through [-Werror=implicit-fallthrough=]
       switch (((union T_primitives *)rptr)->type) {
       ^~~~~~
    ../../common/rpc/rpcmod.c:2620:2: note: here
      default:
      ^~~~~~~
    
    1. whoops, this one was fixed by "10363 rpcmod: this statement may fall through" (already integrated). I'll update the error list.

  2. 
      
tsoome
marcel
  1. Ship It!
  2. 
      
citrus
  1. Ship It!
  2. 
      
tsoome
tsoome
Review request changed

Status: Closed (submitted)

Loading...