Project

General

Profile

Bug #11580

dtrace: cast between incompatible function types

Added by Toomas Soome 28 days ago.

Status:
In Progress
Priority:
Normal
Assignee:
Category:
DTrace
Start date:
Due date:
% Done:

90%

Estimated time:
Difficulty:
Medium
Tags:

Description

Build errors with gcc 8:

    ../../common/dtrace/dtrace.c:256:2: error: cast between incompatible function types from 'int (*)(void)' to 'int (*)(void *, dtrace_id_t,  void *)' {aka 'int (*)(void *, unsigned int,  void *)'} [-Werror=cast-function-type]
      (int (*)(void *, dtrace_id_t, void *))dtrace_enable_nullop,
      ^
    ../../common/dtrace/dtrace.c: In function 'dtrace_unregister':
    ../../common/dtrace/dtrace.c:8358:6: error: cast between incompatible function types from 'int (*)(void)' to 'int (*)(void *, dtrace_id_t,  void *)' {aka 'int (*)(void *, unsigned int,  void *)'} [-Werror=cast-function-type]
          (int (*)(void *, dtrace_id_t, void *))dtrace_enable_nullop) {
          ^
    ../../common/dtrace/dtrace.c: In function 'dtrace_attach':
    ../../common/dtrace/dtrace.c:16036:26: error: cast between incompatible function types from 'int (*)(cpu_setup_t,  processorid_t)' {aka 'int (*)(enum <anonymous>,  int)'} to 'int (*)(cpu_setup_t,  int,  void *)' {aka 'int (*)(enum <anonymous>,  int,  void *)'} [-Werror=cast-function-type]
      register_cpu_setup_func((cpu_setup_func_t *)dtrace_cpu_setup, NULL);
                              ^
    ../../common/dtrace/dtrace.c: In function 'dtrace_detach':
    ../../common/dtrace/dtrace.c:17150:28: error: cast between incompatible function types from 'int (*)(cpu_setup_t,  processorid_t)' {aka 'int (*)(enum <anonymous>,  int)'} to 'int (*)(cpu_setup_t,  int,  void *)' {aka 'int (*)(enum <anonymous>,  int,  void *)'} [-Werror=cast-function-type]
      unregister_cpu_setup_func((cpu_setup_func_t *)dtrace_cpu_setup, NULL);
                                ^
    cc1: all warnings being treated as errors

Also available in: Atom PDF