Project

General

Profile

Actions

Bug #12109

closed

libfksmbfs: cast between incompatible function types

Added by Toomas Soome almost 2 years ago. Updated almost 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
lib - userland libraries
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:

Description

Build errors with gcc 8:

    ../common/fake_vnode.c:195:6: 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]
          (fs_generic_func_p) fs_rwunlock,
          ^
    ../common/fake_vnode.c:196:6: 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]
          (fs_generic_func_p) fs_rwunlock, /* no errors allowed */
          ^
    ../common/fake_vnode.c:246:6: error: cast between incompatible function types from 'void (*)(struct vnode *, page_t *, int,  int,  struct cred *, caller_context_t *)' {aka 'void (*)(struct vnode *, struct page *, int,  int,  struct cred *, struct caller_context *)'} to 'int (*)()' [-Werror=cast-function-type]
          (fs_generic_func_p) fs_dispose,
          ^
    ../common/fake_vnode.c:247:6: error: cast between incompatible function types from 'void (*)(struct vnode *, page_t *, int,  int,  struct cred *, caller_context_t *)' {aka 'void (*)(struct vnode *, struct page *, int,  int,  struct cred *, struct caller_context *)'} to 'int (*)()' [-Werror=cast-function-type]
          (fs_generic_func_p) fs_nodispose,
          ^

    ../common/fake_vfs.c: In function 'fs_copyfsops':
    ../common/fake_vfs.c:287:4: error: cast between incompatible function types from 'void (*)(vfs_t *)' {aka 'void (*)(struct vfs *)'} to 'int (*)()' [-Werror=cast-function-type]
        (fs_generic_func_p)fs_freevfs,
        ^
    ../common/fake_vfs.c:288:4: error: cast between incompatible function types from 'void (*)(vfs_t *)' {aka 'void (*)(struct vfs *)'} to 'int (*)()' [-Werror=cast-function-type]
        (fs_generic_func_p)fs_freevfs, /* Shouldn't fail */
        ^
    cc1: all warnings being treated as errors

Testing done: build/install/boot.

Actions #1

Updated by Toomas Soome almost 2 years ago

  • Description updated (diff)
Actions #2

Updated by Electric Monk almost 2 years ago

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

git commit 8bbe90c14cec0e58886bcb1d4d11723245046f36

commit  8bbe90c14cec0e58886bcb1d4d11723245046f36
Author: Toomas Soome <tsoome@me.com>
Date:   2020-01-13T15:55:51.000Z

    12109 libfksmbfs: cast between incompatible function types
    Reviewed by: John Levon <john.levon@joyent.com>
    Approved by: Dan McDonald <danmcd@joyent.com>

Actions

Also available in: Atom PDF