• Arnd Bergmann's avatar
    ubifs: fix sort function prototype · 60f16e91
    Arnd Bergmann authored
    The global sort() function expects a callback pointer to a function with two
    void* arguments, but ubifs has a function with specific object types, which
    causes a warning in clang-16 and higher:
    
    fs/ubifs/lprops.c:1272:9: error: cast from 'int (*)(struct ubifs_info *, const struct ubifs_lprops *, int, struct ubifs_lp_stats *)' to 'ubifs_lpt_scan_callback' (aka 'int (*)(struct ubifs_info *, const struct ubifs_lprops *, int, void *)') converts to incompatible function type [-Werror,-Wcast-function-type-strict]
     1272 |                                     (ubifs_lpt_scan_callback)scan_check_cb,
          |                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    Change the prototype to the regular one and cast the object pointers
    locally instead.
    
    Fixes: 1e51764a ("UBIFS: add new flash file system")
    Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
    Reviewed-by: default avatarZhihao Cheng <chengzhihao1@huawei.com>
    Signed-off-by: default avatarRichard Weinberger <richard@nod.at>
    60f16e91
find.c 29.4 KB