Project

General

Profile

Actions

Bug #12131

closed

mdb: cast between incompatible function types

Added by Toomas Soome almost 2 years ago. Updated almost 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
mdb - modular debugger
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:

Description

Build errors with gcc 8:

    ../../../common/mdb/mdb_proc.c:4724:2: error: cast between incompatible function types from 'void * (*)()' to 'int (*)()' [-Werror=cast-function-type]
      (int (*)()) mdb_tgt_null,  /* t_add_pwapt */
      ^
    ../../../common/mdb/mdb_proc.c:4726:2: error: cast between incompatible function types from 'void * (*)()' to 'int (*)()' [-Werror=cast-function-type]
      (int (*)()) mdb_tgt_null,  /* t_add_iowapt */
      ^
    ../../../common/mdb/mdb_proc.c:4853:2: error: cast between incompatible function types from 'long int (*)()' to 'void (*)()' [-Werror=cast-function-type]
      (void (*)()) mdb_tgt_nop,
      ^

    ../../../common/mdb/mdb_kvm.c:1485:29: error: cast between incompatible function types from 'int (*)(void)' to 'void (*)()' [-Werror=cast-function-type]
      kt->k_dump_print_content = (void (*)())kt_data_stub;
                                 ^
    ../../../common/mdb/mdb_main.c:493:39: error: cast between incompatible function types from '__attribute__((noreturn)) void (*)(int)' to 'void (*)(int,  siginfo_t *, ucontext_t *, void *)' {aka 'void (*)(int,  struct siginfo *, struct ucontext *, void *)'} [-Werror=cast-function-type]
      (void) mdb_signal_sethandler(SIGHUP, (mdb_signal_f *)terminate, NULL);
                                           ^
    ../../../common/mdb/mdb_main.c:494:40: error: cast between incompatible function types from '__attribute__((noreturn)) void (*)(int)' to 'void (*)(int,  siginfo_t *, ucontext_t *, void *)' {aka 'void (*)(int,  struct siginfo *, struct ucontext *, void *)'} [-Werror=cast-function-type]
      (void) mdb_signal_sethandler(SIGTERM, (mdb_signal_f *)terminate, NULL);
                                            ^
    ../../../common/mdb/mdb_kproc.c:891:2: error: cast between incompatible function types from 'long int (*)()' to 'void (*)()' [-Werror=cast-function-type]
      (void (*)()) mdb_tgt_nop,  /* t_periodic */
      ^
    ../../../common/mdb/mdb_kproc.c:925:2: error: cast between incompatible function types from 'void * (*)()' to 'int (*)()' [-Werror=cast-function-type]
      (int (*)()) mdb_tgt_null,  /* t_add_sbrkpt */
      ^
    ../../../common/mdb/mdb_kproc.c:926:2: error: cast between incompatible function types from 'void * (*)()' to 'int (*)()' [-Werror=cast-function-type]
      (int (*)()) mdb_tgt_null,  /* t_add_vbrkpt */
      ^
    ../../../common/mdb/mdb_kproc.c:927:2: error: cast between incompatible function types from 'void * (*)()' to 'int (*)()' [-Werror=cast-function-type]
      (int (*)()) mdb_tgt_null,  /* t_add_pwapt */
      ^
    ../../../common/mdb/mdb_kproc.c:928:2: error: cast between incompatible function types from 'void * (*)()' to 'int (*)()' [-Werror=cast-function-type]
      (int (*)()) mdb_tgt_null,  /* t_add_vwapt */
      ^
    ../../../common/mdb/mdb_kproc.c:929:2: error: cast between incompatible function types from 'void * (*)()' to 'int (*)()' [-Werror=cast-function-type]
      (int (*)()) mdb_tgt_null,  /* t_add_iowapt */
      ^
    ../../../common/mdb/mdb_kproc.c:930:2: error: cast between incompatible function types from 'void * (*)()' to 'int (*)()' [-Werror=cast-function-type]
      (int (*)()) mdb_tgt_null,  /* t_add_sysenter */
      ^
    ../../../common/mdb/mdb_kproc.c:931:2: error: cast between incompatible function types from 'void * (*)()' to 'int (*)()' [-Werror=cast-function-type]
      (int (*)()) mdb_tgt_null,  /* t_add_sysexit */
      ^
    ../../../common/mdb/mdb_kproc.c:932:2: error: cast between incompatible function types from 'void * (*)()' to 'int (*)()' [-Werror=cast-function-type]
      (int (*)()) mdb_tgt_null,  /* t_add_signal */
      ^
    ../../../common/mdb/mdb_kproc.c:933:2: error: cast between incompatible function types from 'void * (*)()' to 'int (*)()' [-Werror=cast-function-type]
      (int (*)()) mdb_tgt_null,  /* t_add_fault */
      ^
    ../../../common/mdb/mdb_rawfile.c:363:2: error: cast between incompatible function types from 'long int (*)()' to 'void (*)()' [-Werror=cast-function-type]
      (void (*)()) mdb_tgt_nop,  /* t_periodic */
      ^
    ../../../common/mdb/mdb_rawfile.c:397:2: error: cast between incompatible function types from 'void * (*)()' to 'int (*)()' [-Werror=cast-function-type]
      (int (*)()) mdb_tgt_null,  /* t_add_vbrkpt */
      ^
    ../../../common/mdb/mdb_rawfile.c:398:2: error: cast between incompatible function types from 'void * (*)()' to 'int (*)()' [-Werror=cast-function-type]
      (int (*)()) mdb_tgt_null,  /* t_add_sbrkpt */
      ^
    ../../../common/mdb/mdb_rawfile.c:399:2: error: cast between incompatible function types from 'void * (*)()' to 'int (*)()' [-Werror=cast-function-type]
      (int (*)()) mdb_tgt_null,  /* t_add_pwapt */
      ^
    ../../../common/mdb/mdb_rawfile.c:400:2: error: cast between incompatible function types from 'void * (*)()' to 'int (*)()' [-Werror=cast-function-type]
      (int (*)()) mdb_tgt_null,  /* t_add_vwapt */
      ^
    ../../../common/mdb/mdb_rawfile.c:401:2: error: cast between incompatible function types from 'void * (*)()' to 'int (*)()' [-Werror=cast-function-type]
      (int (*)()) mdb_tgt_null,  /* t_add_iowapt */
      ^
    ../../../common/mdb/mdb_rawfile.c:402:2: error: cast between incompatible function types from 'void * (*)()' to 'int (*)()' [-Werror=cast-function-type]
      (int (*)()) mdb_tgt_null,  /* t_add_sysenter */
      ^
    ../../../common/mdb/mdb_rawfile.c:403:2: error: cast between incompatible function types from 'void * (*)()' to 'int (*)()' [-Werror=cast-function-type]
      (int (*)()) mdb_tgt_null,  /* t_add_sysexit */
      ^
    ../../../common/mdb/mdb_rawfile.c:404:2: error: cast between incompatible function types from 'void * (*)()' to 'int (*)()' [-Werror=cast-function-type]
      (int (*)()) mdb_tgt_null,  /* t_add_signal */
      ^
    ../../../common/mdb/mdb_rawfile.c:405:2: error: cast between incompatible function types from 'void * (*)()' to 'int (*)()' [-Werror=cast-function-type]
      (int (*)()) mdb_tgt_null,  /* t_add_fault */
      ^
    ../../mdb/kvm_ia32dep.c:110:2: error: cast between incompatible function types from 'long int (*)()' to 'void (*)()' [-Werror=cast-function-type]
      (void (*)()) mdb_tgt_nop,  /* t_periodic */
      ^
    ../../mdb/kvm_ia32dep.c:144:2: error: cast between incompatible function types from 'void * (*)()' to 'int (*)()' [-Werror=cast-function-type]
      (int (*)()) mdb_tgt_null,  /* t_add_vbrkpt */
      ^
    ../../mdb/kvm_ia32dep.c:145:2: error: cast between incompatible function types from 'void * (*)()' to 'int (*)()' [-Werror=cast-function-type]
      (int (*)()) mdb_tgt_null,  /* t_add_sbrkpt */
      ^
    ../../mdb/kvm_ia32dep.c:146:2: error: cast between incompatible function types from 'void * (*)()' to 'int (*)()' [-Werror=cast-function-type]
      (int (*)()) mdb_tgt_null,  /* t_add_pwapt */
      ^
    ../../mdb/kvm_ia32dep.c:147:2: error: cast between incompatible function types from 'void * (*)()' to 'int (*)()' [-Werror=cast-function-type]
      (int (*)()) mdb_tgt_null,  /* t_add_vwapt */
      ^
    ../../mdb/kvm_ia32dep.c:148:2: error: cast between incompatible function types from 'void * (*)()' to 'int (*)()' [-Werror=cast-function-type]
      (int (*)()) mdb_tgt_null,  /* t_add_iowapt */
      ^
    ../../mdb/kvm_ia32dep.c:149:2: error: cast between incompatible function types from 'void * (*)()' to 'int (*)()' [-Werror=cast-function-type]
      (int (*)()) mdb_tgt_null,  /* t_add_sysenter */
      ^
    ../../mdb/kvm_ia32dep.c:150:2: error: cast between incompatible function types from 'void * (*)()' to 'int (*)()' [-Werror=cast-function-type]
      (int (*)()) mdb_tgt_null,  /* t_add_sysexit */
      ^
    ../../mdb/kvm_ia32dep.c:151:2: error: cast between incompatible function types from 'void * (*)()' to 'int (*)()' [-Werror=cast-function-type]
      (int (*)()) mdb_tgt_null,  /* t_add_signal */
      ^
    ../../mdb/kvm_ia32dep.c:152:2: error: cast between incompatible function types from 'void * (*)()' to 'int (*)()' [-Werror=cast-function-type]
      (int (*)()) mdb_tgt_null,  /* t_add_fault */
      ^
    ../../../common/mdb/mdb_value.c:112:2: error: cast between incompatible function types from 'long int (*)()' to 'void (*)()' [-Werror=cast-function-type]
      (void (*)()) mdb_tgt_nop,  /* t_activate */
      ^
    ../../../common/mdb/mdb_value.c:113:2: error: cast between incompatible function types from 'long int (*)()' to 'void (*)()' [-Werror=cast-function-type]
      (void (*)()) mdb_tgt_nop,  /* t_deactivate */
      ^
    ../../../common/mdb/mdb_value.c:114:2: error: cast between incompatible function types from 'long int (*)()' to 'void (*)()' [-Werror=cast-function-type]
      (void (*)()) mdb_tgt_nop,  /* t_periodic */
      ^
    ../../../common/mdb/mdb_value.c:148:2: error: cast between incompatible function types from 'void * (*)()' to 'int (*)()' [-Werror=cast-function-type]
      (int (*)()) mdb_tgt_null,  /* t_add_vbrkpt */
      ^
    ../../../common/mdb/mdb_value.c:149:2: error: cast between incompatible function types from 'void * (*)()' to 'int (*)()' [-Werror=cast-function-type]
      (int (*)()) mdb_tgt_null,  /* t_add_sbrkpt */
      ^
    ../../../common/mdb/mdb_value.c:150:2: error: cast between incompatible function types from 'void * (*)()' to 'int (*)()' [-Werror=cast-function-type]
      (int (*)()) mdb_tgt_null,  /* t_add_pwapt */
      ^
    ../../../common/mdb/mdb_value.c:151:2: error: cast between incompatible function types from 'void * (*)()' to 'int (*)()' [-Werror=cast-function-type]
      (int (*)()) mdb_tgt_null,  /* t_add_vwapt */
      ^
    ../../../common/mdb/mdb_value.c:152:2: error: cast between incompatible function types from 'void * (*)()' to 'int (*)()' [-Werror=cast-function-type]
      (int (*)()) mdb_tgt_null,  /* t_add_iowapt */
      ^
    ../../../common/mdb/mdb_value.c:153:2: error: cast between incompatible function types from 'void * (*)()' to 'int (*)()' [-Werror=cast-function-type]
      (int (*)()) mdb_tgt_null,  /* t_add_sysenter */
      ^
    ../../../common/mdb/mdb_value.c:154:2: error: cast between incompatible function types from 'void * (*)()' to 'int (*)()' [-Werror=cast-function-type]
      (int (*)()) mdb_tgt_null,  /* t_add_sysexit */
      ^
    ../../../common/mdb/mdb_value.c:155:2: error: cast between incompatible function types from 'void * (*)()' to 'int (*)()' [-Werror=cast-function-type]
      (int (*)()) mdb_tgt_null,  /* t_add_signal */
      ^
    ../../../common/mdb/mdb_value.c:156:2: error: cast between incompatible function types from 'void * (*)()' to 'int (*)()' [-Werror=cast-function-type]
      (int (*)()) mdb_tgt_null,  /* t_add_fault */
      ^
    ../../../common/mdb/mdb_proc.c:4685:2: error: cast between incompatible function types from 'long int (*)()' to 'int (*)()' [-Werror=cast-function-type]
      (int (*)()) mdb_tgt_notsup,  /* t_setcontext */
      ^
    ../../../common/mdb/mdb_proc.c:4705:2: error: cast between incompatible function types from 'long int (*)()' to 'int (*)()' [-Werror=cast-function-type]
      (int (*)()) mdb_tgt_notsup,  /* t_vtop */
      ^
    ../../../common/mdb/mdb_proc.c:4852:2: error: cast between incompatible function types from 'long int (*)()' to 'int (*)()' [-Werror=cast-function-type]
      (int (*)()) mdb_tgt_nop,
      ^
    ../../../common/mdb/mdb_kproc.c:887:2: error: cast between incompatible function types from 'long int (*)()' to 'int (*)()' [-Werror=cast-function-type]
      (int (*)()) mdb_tgt_notsup,  /* t_setflags */
      ^
    ../../../common/mdb/mdb_kproc.c:919:2: error: cast between incompatible function types from 'long int (*)()' to 'int (*)()' [-Werror=cast-function-type]
      (int (*)()) mdb_tgt_notsup,  /* t_run */
      ^
    ../../../common/mdb/mdb_kproc.c:920:2: error: cast between incompatible function types from 'long int (*)()' to 'int (*)()' [-Werror=cast-function-type]
      (int (*)()) mdb_tgt_notsup,  /* t_step */
      ^
    ../../../common/mdb/mdb_kproc.c:921:2: error: cast between incompatible function types from 'long int (*)()' to 'int (*)()' [-Werror=cast-function-type]
      (int (*)()) mdb_tgt_notsup,  /* t_step_out */
      ^
    ../../../common/mdb/mdb_kproc.c:922:2: error: cast between incompatible function types from 'long int (*)()' to 'int (*)()' [-Werror=cast-function-type]
      (int (*)()) mdb_tgt_notsup,  /* t_next */
      ^
    ../../../common/mdb/mdb_kproc.c:923:2: error: cast between incompatible function types from 'long int (*)()' to 'int (*)()' [-Werror=cast-function-type]
      (int (*)()) mdb_tgt_notsup,  /* t_cont */
      ^
    ../../../common/mdb/mdb_kproc.c:924:2: error: cast between incompatible function types from 'long int (*)()' to 'int (*)()' [-Werror=cast-function-type]
      (int (*)()) mdb_tgt_notsup,  /* t_signal */
      ^
    ../../../common/mdb/mdb_kproc.c:934:2: error: cast between incompatible function types from 'long int (*)()' to 'int (*)()' [-Werror=cast-function-type]
      (int (*)()) mdb_tgt_notsup,  /* t_getareg XXX */
      ^
    ../../../common/mdb/mdb_kproc.c:935:2: error: cast between incompatible function types from 'long int (*)()' to 'int (*)()' [-Werror=cast-function-type]
      (int (*)()) mdb_tgt_notsup,  /* t_putareg XXX */
      ^
    ../../../common/mdb/mdb_kproc.c:936:2: error: cast between incompatible function types from 'long int (*)()' to 'int (*)()' [-Werror=cast-function-type]
      (int (*)()) mdb_tgt_notsup,  /* t_stack_iter XXX */
      ^
    ../../../common/mdb/mdb_rawfile.c:360:2: error: cast between incompatible function types from 'long int (*)()' to 'int (*)()' [-Werror=cast-function-type]
      (int (*)()) mdb_tgt_notsup,  /* t_setcontext */
      ^
    ../../../common/mdb/mdb_rawfile.c:368:2: error: cast between incompatible function types from 'long int (*)()' to 'int (*)()' [-Werror=cast-function-type]
      (int (*)()) mdb_tgt_notsup,  /* t_uname */
      ^
    ../../../common/mdb/mdb_rawfile.c:369:2: error: cast between incompatible function types from 'long int (*)()' to 'int (*)()' [-Werror=cast-function-type]
      (int (*)()) mdb_tgt_notsup,  /* t_dmodel */
      ^
    ../../../common/mdb/mdb_rawfile.c:380:2: error: cast between incompatible function types from 'long int (*)()' to 'int (*)()' [-Werror=cast-function-type]
      (int (*)()) mdb_tgt_notsup,  /* t_vtop */
      ^
    ../../../common/mdb/mdb_rawfile.c:381:2: error: cast between incompatible function types from 'long int (*)()' to 'int (*)()' [-Werror=cast-function-type]
      (int (*)()) mdb_tgt_notsup,  /* t_lookup_by_name */
      ^
    ../../../common/mdb/mdb_rawfile.c:382:2: error: cast between incompatible function types from 'long int (*)()' to 'int (*)()' [-Werror=cast-function-type]
      (int (*)()) mdb_tgt_notsup,  /* t_lookup_by_addr */
      ^
    ../../../common/mdb/mdb_rawfile.c:383:2: error: cast between incompatible function types from 'long int (*)()' to 'int (*)()' [-Werror=cast-function-type]
      (int (*)()) mdb_tgt_notsup,  /* t_symbol_iter */
      ^
    ../../../common/mdb/mdb_rawfile.c:391:2: error: cast between incompatible function types from 'long int (*)()' to 'int (*)()' [-Werror=cast-function-type]
      (int (*)()) mdb_tgt_notsup,  /* t_run */
      ^
    ../../../common/mdb/mdb_rawfile.c:392:2: error: cast between incompatible function types from 'long int (*)()' to 'int (*)()' [-Werror=cast-function-type]
      (int (*)()) mdb_tgt_notsup,  /* t_step */
      ^
    ../../../common/mdb/mdb_rawfile.c:393:2: error: cast between incompatible function types from 'long int (*)()' to 'int (*)()' [-Werror=cast-function-type]
      (int (*)()) mdb_tgt_notsup,  /* t_step_out */
      ^
    ../../../common/mdb/mdb_rawfile.c:394:2: error: cast between incompatible function types from 'long int (*)()' to 'int (*)()' [-Werror=cast-function-type]
      (int (*)()) mdb_tgt_notsup,  /* t_next */
      ^
    ../../../common/mdb/mdb_rawfile.c:395:2: error: cast between incompatible function types from 'long int (*)()' to 'int (*)()' [-Werror=cast-function-type]
      (int (*)()) mdb_tgt_notsup,  /* t_cont */
      ^
    ../../../common/mdb/mdb_rawfile.c:396:2: error: cast between incompatible function types from 'long int (*)()' to 'int (*)()' [-Werror=cast-function-type]
      (int (*)()) mdb_tgt_notsup,  /* t_signal */
      ^
    ../../../common/mdb/mdb_rawfile.c:406:2: error: cast between incompatible function types from 'long int (*)()' to 'int (*)()' [-Werror=cast-function-type]
      (int (*)()) mdb_tgt_notsup,  /* t_getareg */
      ^
    ../../../common/mdb/mdb_rawfile.c:407:2: error: cast between incompatible function types from 'long int (*)()' to 'int (*)()' [-Werror=cast-function-type]
      (int (*)()) mdb_tgt_notsup,  /* t_putareg */
      ^
    ../../../common/mdb/mdb_rawfile.c:408:2: error: cast between incompatible function types from 'long int (*)()' to 'int (*)()' [-Werror=cast-function-type]
      (int (*)()) mdb_tgt_notsup,  /* t_stack_iter */
      ^
    ../../../common/mdb/mdb_rawfile.c:409:2: error: cast between incompatible function types from 'long int (*)()' to 'int (*)()' [-Werror=cast-function-type]
      (int (*)()) mdb_tgt_notsup  /* t_auxv */
      ^
    cc1: all warnings being treated as errors

Testing done: build/install/boot. Using mdb in some extent.

Actions

Also available in: Atom PDF