Actions
Bug #12082
closedlibpctx: cast between incompatible function types
Start date:
Due date:
% Done:
100%
Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:
External Bug:
Description
Build errors with gcc 8:
../common/libpctx.c: In function 'pctx_set_events': ../common/libpctx.c:304:16: error: cast between incompatible function types from 'int (*)(pctx_t *)' {aka 'int (*)(struct __pctx *)'} to 'int (*)(pctx_t *, pid_t, id_t, char *, void *)' {aka 'int (*)(struct __pctx *, long int, long int, char *, void *)'} [-Werror=cast-function-type] pctx->exec = (pctx_sysc_execfn_t *)default_int; ^ ../common/libpctx.c:306:16: error: cast between incompatible function types from 'void (*)(pctx_t *)' {aka 'void (*)(struct __pctx *)'} to 'void (*)(pctx_t *, pid_t, id_t, pid_t, void *)' {aka 'void (*)(struct __pctx *, long int, long int, long int, void *)'} [-Werror=cast-function-type] pctx->fork = (pctx_sysc_forkfn_t *)default_void; ^ ../common/libpctx.c:308:16: error: cast between incompatible function types from 'void (*)(pctx_t *)' {aka 'void (*)(struct __pctx *)'} to 'void (*)(pctx_t *, pid_t, id_t, int, void *)' {aka 'void (*)(struct __pctx *, long int, long int, int, void *)'} [-Werror=cast-function-type] pctx->exit = (pctx_sysc_exitfn_t *)default_void; ^ ../common/libpctx.c:310:22: error: cast between incompatible function types from 'int (*)(pctx_t *)' {aka 'int (*)(struct __pctx *)'} to 'int (*)(pctx_t *, pid_t, id_t, void *)' {aka 'int (*)(struct __pctx *, long int, long int, void *)'} [-Werror=cast-function-type] pctx->lwp_create = (pctx_sysc_lwp_createfn_t *)default_int; ^ ../common/libpctx.c:312:20: error: cast between incompatible function types from 'int (*)(pctx_t *)' {aka 'int (*)(struct __pctx *)'} to 'int (*)(pctx_t *, pid_t, id_t, void *)' {aka 'int (*)(struct __pctx *, long int, long int, void *)'} [-Werror=cast-function-type] pctx->init_lwp = (pctx_init_lwpfn_t *)default_int; ^ ../common/libpctx.c:314:20: error: cast between incompatible function types from 'int (*)(pctx_t *)' {aka 'int (*)(struct __pctx *)'} to 'int (*)(pctx_t *, pid_t, id_t, void *)' {aka 'int (*)(struct __pctx *, long int, long int, void *)'} [-Werror=cast-function-type] pctx->fini_lwp = (pctx_fini_lwpfn_t *)default_int; ^ ../common/libpctx.c:316:20: error: cast between incompatible function types from 'int (*)(pctx_t *)' {aka 'int (*)(struct __pctx *)'} to 'int (*)(pctx_t *, pid_t, id_t, void *)' {aka 'int (*)(struct __pctx *, long int, long int, void *)'} [-Werror=cast-function-type] pctx->lwp_exit = (pctx_sysc_lwp_exitfn_t *)default_int; ^ ../common/libpctx.c:318:20: error: cast between incompatible function types from 'void (*)(pctx_t *)' {aka 'void (*)(struct __pctx *)'} to 'void (*)(pctx_t *, pid_t, id_t, pid_t, void *)' {aka 'void (*)(struct __pctx *, long int, long int, long int, void *)'} [-Werror=cast-function-type] if (pctx->fork != (pctx_sysc_forkfn_t *)default_void) { ^ ../common/libpctx.c:334:20: error: cast between incompatible function types from 'int (*)(pctx_t *)' {aka 'int (*)(struct __pctx *)'} to 'int (*)(pctx_t *, pid_t, id_t, char *, void *)' {aka 'int (*)(struct __pctx *, long int, long int, char *, void *)'} [-Werror=cast-function-type] if (pctx->exec != (pctx_sysc_execfn_t *)default_int || ^ ../common/libpctx.c:335:24: error: cast between incompatible function types from 'int (*)(pctx_t *)' {aka 'int (*)(struct __pctx *)'} to 'int (*)(pctx_t *, pid_t, id_t, void *)' {aka 'int (*)(struct __pctx *, long int, long int, void *)'} [-Werror=cast-function-type] pctx->fini_lwp != (pctx_fini_lwpfn_t *)default_int || ^ ../common/libpctx.c:336:24: error: cast between incompatible function types from 'int (*)(pctx_t *)' {aka 'int (*)(struct __pctx *)'} to 'int (*)(pctx_t *, pid_t, id_t, void *)' {aka 'int (*)(struct __pctx *, long int, long int, void *)'} [-Werror=cast-function-type] pctx->init_lwp != (pctx_init_lwpfn_t *)default_int) { ^ ../common/libpctx.c:345:26: error: cast between incompatible function types from 'int (*)(pctx_t *)' {aka 'int (*)(struct __pctx *)'} to 'int (*)(pctx_t *, pid_t, id_t, void *)' {aka 'int (*)(struct __pctx *, long int, long int, void *)'} [-Werror=cast-function-type] pctx->lwp_create != (pctx_sysc_lwp_createfn_t *)default_int || ^ ../common/libpctx.c:346:24: error: cast between incompatible function types from 'int (*)(pctx_t *)' {aka 'int (*)(struct __pctx *)'} to 'int (*)(pctx_t *, pid_t, id_t, void *)' {aka 'int (*)(struct __pctx *, long int, long int, void *)'} [-Werror=cast-function-type] pctx->init_lwp != (pctx_init_lwpfn_t *)default_int); ^ ../common/libpctx.c:349:24: error: cast between incompatible function types from 'int (*)(pctx_t *)' {aka 'int (*)(struct __pctx *)'} to 'int (*)(pctx_t *, pid_t, id_t, void *)' {aka 'int (*)(struct __pctx *, long int, long int, void *)'} [-Werror=cast-function-type] pctx->lwp_exit != (pctx_sysc_lwp_exitfn_t *)default_int || ^ ../common/libpctx.c:350:24: error: cast between incompatible function types from 'int (*)(pctx_t *)' {aka 'int (*)(struct __pctx *)'} to 'int (*)(pctx_t *, pid_t, id_t, void *)' {aka 'int (*)(struct __pctx *, long int, long int, void *)'} [-Werror=cast-function-type] pctx->fini_lwp != (pctx_fini_lwpfn_t *)default_int); ^ ../common/libpctx.c: In function 'pctx_lwpiterate': ../common/libpctx.c:410:16: error: cast between incompatible function types from 'int (*)(pctx_t *)' {aka 'int (*)(struct __pctx *)'} to 'int (*)(pctx_t *, pid_t, id_t, void *)' {aka 'int (*)(struct __pctx *, long int, long int, void *)'} [-Werror=cast-function-type] if (action == (int (*)(pctx_t *, pid_t, id_t, void *))default_int) ^ ../common/libpctx.c: In function 'pctx_run': ../common/libpctx.c:725:23: error: cast between incompatible function types from 'int (*)(pctx_t *)' {aka 'int (*)(struct __pctx *)'} to 'int (*)(pctx_t *, pid_t, id_t, char *, void *)' {aka 'int (*)(struct __pctx *, long int, long int, char *, void *)'} [-Werror=cast-function-type] if (pctx->exec == (pctx_sysc_execfn_t *) ^ cc1: all warnings being treated as errors
Testing done: build/install/boot.
Updated by Electric Monk almost 4 years ago
- Status changed from In Progress to Closed
- % Done changed from 90 to 100
git commit bf6cb86ec437546144857d9aa94ef222ec6763c0
commit bf6cb86ec437546144857d9aa94ef222ec6763c0 Author: Toomas Soome <tsoome@me.com> Date: 2019-12-18T17:46:22.000Z 12082 libpctx: cast between incompatible function types Reviewed by: C Fraire <cfraire@me.com> Approved by: Dan McDonald <danmcd@joyent.com>
Actions