Project

General

Profile

Actions

Bug #11981

closed

libslp: cast between incompatible function types

Added by Toomas Soome over 2 years ago. Updated over 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:

    ../clib/slp_net.c: In function 'start_tcp_thr':
    ../clib/slp_net.c:424:34: error: cast between incompatible function types from 'void (*)()' to 'void * (*)(void *)' [-Werror=cast-function-type]
      if ((terr = thr_create(0, NULL, (void *(*)(void *)) tcp_thread,
                                      ^

    ../clib/SLPUtils.c:258:9: error: cast between incompatible function types from 'SLPBoolean (*)(void *, char *, SLPError,  void **)' {aka 'enum <anonymous> (*)(void *, char *, enum <anonymous>,  void **)'} to 'void (*)()' [-Werror=cast-function-type]
             (SLPGenericAppCB *)saadvert_callback,
             ^

    ../clib/SLPReg.c:568:12: error: cast between incompatible function types from 'void (*)()' to 'void * (*)(void *)' [-Werror=cast-function-type]
       0, NULL, (void *(*)(void *)) reg_thread,
                ^

    ../clib/slp_ipc.c: In function 'open_ipc':
    ../clib/slp_ipc.c:122:4: error: cast between incompatible function types from 'void (*)()' to 'void * (*)(void *)' [-Werror=cast-function-type]
        (void *(*)(void *)) ipc_manage_thr,
        ^
    ../clib/slp_ua_common.c:92:12: error: cast between incompatible function types from 'void (*)(void *)' to 'void * (*)(void *)' [-Werror=cast-function-type]
       NULL, 0, (void *(*)(void *)) slp_call, args, 0, &tid)) != 0) {
                ^
    ../clib/slp_ua_common.c:103:13: error: cast between incompatible function types from 'SLPError (*)(void *)' {aka 'enum <anonymous> (*)(void *)'} to 'void * (*)(void *)' [-Werror=cast-function-type]
        NULL, 0, (void *(*)(void *))consumer,
                 ^
    ../clib/SLPFindAttrs.c: In function 'SLPFindAttrs':
    ../clib/SLPFindAttrs.c:96:9: error: cast between incompatible function types from 'SLPBoolean (*)(void *, const char *, SLPError,  void *)' {aka 'enum <anonymous> (*)(void *, const char *, enum <anonymous>,  void *)'} to 'void (*)()' [-Werror=cast-function-type]
             (SLPGenericAppCB *) callback, pvUser,
             ^
    ../clib/slp_da_cache.c: In function 'start_cache_thr':
    ../clib/slp_da_cache.c:229:12: error: cast between incompatible function types from 'void (*)()' to 'void * (*)(void *)' [-Werror=cast-function-type]
       0, NULL, (void *(*)(void *)) cache_thr,
                ^
    ../clib/slp_da_cache.c: In function 'cache_thr':
    ../clib/slp_da_cache.c:262:4: error: cast between incompatible function types from 'void (*)(void *, VISIT)' {aka 'void (*)(void *, enum <anonymous>)'} to 'void (*)(void *, VISIT,  int,  void *)' {aka 'void (*)(void *, enum <anonymous>,  int,  void *)'} [-Werror=cast-function-type]
        (void (*)(void *, VISIT, int, void *))free_cache_entry,
        ^
    ../clib/SLPFindSrvs.c:98:9: error: cast between incompatible function types from 'SLPBoolean (*)(void *, const char *, short unsigned int,  SLPError,  void *)' {aka 'enum <anonymous> (*)(void *, const char *, short unsigned int,  enum <anonymous>,  void *)'} to 'void (*)()' [-Werror=cast-function-type]
             (SLPGenericAppCB *) callback, pvUser,
             ^
    ../clib/SLPFindSrvTypes.c:63:9: error: cast between incompatible function types from 'SLPBoolean (*)(void *, const char *, SLPError,  void *)' {aka 'enum <anonymous> (*)(void *, const char *, enum <anonymous>,  void *)'} to 'void (*)()' [-Werror=cast-function-type]
             (SLPGenericAppCB *) callback, pvUser,
             ^

    cc1: all warnings being treated as errors

Testing done: build/install/boot.

Actions

Also available in: Atom PDF