Project

General

Profile

Bug #10300

fem: cast between incompatible function types

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

Status:
Closed
Priority:
Normal
Assignee:
Category:
filesystems (not ZFS)
Start date:
2019-01-27
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:

Description

Build error from gcc 8:

    ../../common/fs/fem.c:1979:22: error: cast between incompatible function types from 'void (*)(vnode_t *, cred_t *, caller_context_t *)' {aka 'void (*)(struct vnode *, struct cred *, struct caller_context *)'} to 'int (*)()' [-Werror=cast-function-type]
      { VOPNAME_INACTIVE, (femop_t *)vhead_inactive },
                          ^
    ../../common/fs/fem.c:1982:22: error: cast between incompatible function types from 'void (*)(vnode_t *, int,  caller_context_t *)' {aka 'void (*)(struct vnode *, int,  struct caller_context *)'} to 'int (*)()' [-Werror=cast-function-type]
      { VOPNAME_RWUNLOCK, (femop_t *)vhead_rwunlock },
                          ^
    ../../common/fs/fem.c:1998:21: error: cast between incompatible function types from 'void (*)(vnode_t *, struct page *, int,  int,  cred_t *, caller_context_t *)' {aka 'void (*)(struct vnode *, struct page *, int,  int,  struct cred *, struct caller_context *)'} to 'int (*)()' [-Werror=cast-function-type]
      { VOPNAME_DISPOSE, (femop_t *)vhead_dispose },
                         ^
    ../../common/fs/fem.c:2021:21: error: cast between incompatible function types from 'void (*)(vfs_t *)' {aka 'void (*)(struct vfs *)'} to 'int (*)()' [-Werror=cast-function-type]
      { VFSNAME_FREEVFS, (femop_t *)fshead_freevfs },
                         ^
    cc1: all warnings being treated as errors

History

#1

Updated by Electric Monk 11 months ago

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

git commit b1659ed92cb99723e24e3144b2cc0be8663442d7

commit  b1659ed92cb99723e24e3144b2cc0be8663442d7
Author: Toomas Soome <tsoome@me.com>
Date:   2019-01-31T22:04:30.000Z

    10300 fem: cast between incompatible function types
    Reviewed by: Andy Stormont <astormont@racktopsystems.com>
    Reviewed by: Robert Mustacchi <rm@joyent.com>
    Reviewed by: Gergő Mihály Doma <domag02@gmail.com>
    Approved by: Hans Rosenfeld <hans.rosenfeld@joyent.com>

Also available in: Atom PDF