Project

General

Profile

Bug #10154

zfs: cast between incompatible function types

Added by Toomas Soome 7 months ago. Updated 7 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
zfs - Zettabyte File System
Start date:
2018-12-21
Due date:
% Done:

100%

Estimated time:
Difficulty:
Bite-size
Tags:

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.

History

#1

Updated by Electric Monk 7 months ago

  • % Done changed from 90 to 100
  • Status changed from In Progress to Closed

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>

Also available in: Atom PDF