Actions
Bug #10834
closedsd: cast between incompatible function types
Start date:
2019-04-20
Due date:
% Done:
100%
Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:
External Bug:
Description
Build errors with gcc 8:
../../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
Updated by Electric Monk over 4 years ago
- Status changed from In Progress to Closed
- % Done changed from 90 to 100
git commit e3f3c0e614a8cd74d4212f4c7c616ed5b3cf00cb
commit e3f3c0e614a8cd74d4212f4c7c616ed5b3cf00cb Author: Toomas Soome <tsoome@me.com> Date: 2019-05-16T19:32:34.000Z 10834 sd: cast between incompatible function types Reviewed by: Gergő Doma <domag02@gmail.com> Approved by: Dan McDonald <danmcd@joyent.com>
Actions