Actions
Bug #11981
closedlibslp: cast between incompatible function types
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.
Updated by Electric Monk over 2 years ago
- Status changed from In Progress to Closed
- % Done changed from 90 to 100
git commit 48d1bcbbf436904298ce3191590b67834ac47dea
commit 48d1bcbbf436904298ce3191590b67834ac47dea Author: Toomas Soome <tsoome@me.com> Date: 2020-02-21T15:45:19.000Z 11981 libslp: cast between incompatible function types Reviewed by: Matthias Scheler <mscheler@tintri.com> Reviewed by: Andy Stormont <astormont@racktopsystems.com> Approved by: Robert Mustacchi <rm@fingolfin.org>
Actions