Project

General

Profile

Bug #11794

usba: cast between incompatible function types

Added by Toomas Soome 6 days ago.

Status:
In Progress
Priority:
Normal
Assignee:
Category:
driver - device drivers
Start date:
Due date:
% Done:

90%

Estimated time:
Difficulty:
Medium
Tags:

Description

Build errors with gcc 8:

    ../../common/io/usb/usba/usbai.c: In function 'usb_register_hotplug_cbs':
    ../../common/io/usb/usba/usbai.c:1042:6: error: cast between incompatible function types from 'int (*)(struct __dev_info **)' to 'void (*)(struct __dev_info **, struct ddi_event_cookie *, void *, void *)' [-Werror=cast-function-type]
          (peh_t)disconnect_event_handler,
          ^
    ../../common/io/usb/usba/usbai.c:1060:6: error: cast between incompatible function types from 'int (*)(struct __dev_info **)' to 'void (*)(struct __dev_info **, struct ddi_event_cookie *, void *, void *)' [-Werror=cast-function-type]
          (peh_t)reconnect_event_handler,
          ^
    ../../common/io/usb/usba/usbai.c: In function 'usb_register_event_cbs':
    ../../common/io/usb/usba/usbai.c:1131:7: error: cast between incompatible function types from 'int (*)(struct __dev_info **)' to 'void (*)(struct __dev_info **, struct ddi_event_cookie *, void *, void *)' [-Werror=cast-function-type]
           (peh_t)usb_evdata->disconnect_event_handler,
           ^
    ../../common/io/usb/usba/usbai.c:1146:7: error: cast between incompatible function types from 'int (*)(struct __dev_info **)' to 'void (*)(struct __dev_info **, struct ddi_event_cookie *, void *, void *)' [-Werror=cast-function-type]
           (peh_t)usb_evdata->reconnect_event_handler,
           ^
    ../../common/io/usb/usba/usbai.c:1161:7: error: cast between incompatible function types from 'int (*)(struct __dev_info **)' to 'void (*)(struct __dev_info **, struct ddi_event_cookie *, void *, void *)' [-Werror=cast-function-type]
           (peh_t)usb_evdata->post_resume_event_handler,
           ^
    ../../common/io/usb/usba/usbai.c:1176:7: error: cast between incompatible function types from 'int (*)(struct __dev_info **)' to 'void (*)(struct __dev_info **, struct ddi_event_cookie *, void *, void *)' [-Werror=cast-function-type]
           (peh_t)usb_evdata->pre_suspend_event_handler,
           ^
    cc1: all warnings being treated as errors

Also available in: Atom PDF