Project

General

Profile

Bug #12109

Updated by Toomas Soome almost 2 years ago

Build errors with gcc 8: 
 <pre> 
     ../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 
 </pre> 

 Testing done: build/install/boot.

Back