Actions
Bug #10154
closedzfs: cast between incompatible function types
Start date:
2018-12-21
Due date:
% Done:
100%
Estimated time:
Difficulty:
Bite-size
Tags:
Gerrit CR:
External Bug:
Description
Issue found by gcc 8 build:
../../common/fs/zfs/vdev_disk.c: In function 'vdev_disk_io_start': ../../common/fs/zfs/vdev_disk.c:795:17: error: cast between incompatible function types from 'void (*)(buf_t *)' {aka 'void (*)(struct buf *)'} to 'int (*)()' [-Werror=cast-function-type] bp->b_iodone = (int (*)())vdev_disk_io_intr; ^ ../../common/fs/zfs/vdev_file.c: In function 'vdev_file_io_start': ../../common/fs/zfs/vdev_file.c:244:17: error: cast between incompatible function types from 'void (*)(buf_t *)' {aka 'void (*)(struct buf *)'} to 'int (*)()' [-Werror=cast-function-type] bp->b_iodone = (int (*)())vdev_file_io_intr; ^ cc1: all warnings being treated as errors
b_iodone() is supposed to be function returning int - lets provide one.
Updated by Electric Monk about 4 years ago
- Status changed from In Progress to Closed
- % Done changed from 90 to 100
git commit c62757b2b8b6c26589d7704d0ff20beb107fcd9a
commit c62757b2b8b6c26589d7704d0ff20beb107fcd9a Author: Toomas Soome <tsoome@me.com> Date: 2019-01-04T16:10:04.000Z 10154 zfs: cast between incompatible function types Reviewed by: Robert Mustacchi <rm@joyent.com> Reviewed by: Andy Stormont <astormont@racktopsystems.com> Reviewed by: Gergő Mihály Doma <domag02@gmail.com> Approved by: Dan McDonald <danmcd@joyent.com>
Actions