Project

General

Profile

Actions

Bug #10154

closed

zfs: cast between incompatible function types

Added by Toomas Soome about 4 years ago. Updated about 4 years 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:
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.

Actions #1

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

Also available in: Atom PDF