10834 sd: cast between incompatible function types

Review Request #1776 - Created April 20, 2019 and submitted

Information
Toomas Soome
illumos-gate
10834
44b595f...
Reviewers
general
../../common/io/scsi/targets/sd_xbuf.c: In function 'xbuf_dispatch':
../../common/io/scsi/targets/sd_xbuf.c:569:7: error: cast between incompatible function types from 'int (*)(struct __ddi_xbuf_attr *)' to 'void (*)(void *)' [-Werror=cast-function-type]
       (void (*)(void *)) xbuf_iostart, xap, KM_NOSLEEP) == 0) {
       ^

../../common/io/scsi/targets/sd.c: In function 'sd_mapblockaddr_iostart':
../../common/io/scsi/targets/sd.c:12860:7: error: cast between incompatible function types from 'void (*)(int,  struct sd_lun *, struct buf *)' to 'int (*)(struct buf *)' [-Werror=cast-function-type]
       (int (*)(struct buf *)) sd_mapblockaddr_iodone);
       ^
../../common/io/scsi/targets/sd.c: In function 'sd_mapblockaddr_iodone':
../../common/io/scsi/targets/sd.c:12905:22: error: cast between incompatible function types from 'void (*)(int,  struct sd_lun *, struct buf *)' to 'int (*)(struct buf *)' [-Werror=cast-function-type]
  if (bp->b_iodone == (int (*)(struct buf *)) sd_mapblockaddr_iodone) {
                      ^
../../common/io/scsi/targets/sd.c: In function 'sd_mapblocksize_iostart':
../../common/io/scsi/targets/sd.c:13137:7: error: cast between incompatible function types from 'void (*)(int,  struct sd_lun *, struct buf *)' to 'int (*)(struct buf *)' [-Werror=cast-function-type]
       (int (*)(struct buf *)) sd_mapblocksize_iodone);
       ^
../../common/io/scsi/targets/sd.c: In function 'sd_mapblocksize_iodone':
../../common/io/scsi/targets/sd.c:13257:23: error: cast between incompatible function types from 'void (*)(int,  struct sd_lun *, struct buf *)' to 'int (*)(struct buf *)' [-Werror=cast-function-type]
  if ((bp->b_iodone != (int(*)(struct buf *))sd_mapblocksize_iodone)) {
                       ^

cc1: all warnings being treated as errors
*** Error code 1

  

Issues

  • 0
  • 53
  • 0
  • 53
Description From Last Updated
Gergő Mihály Doma
Toomas Soome
Toomas Soome
Review request changed

Status: Closed (submitted)

Loading...