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

Also available in: Atom PDF