Project

General

Profile

Bug #11794

usba: cast between incompatible function types

Added by Toomas Soome 5 months ago. Updated 4 months ago.

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

100%

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

Testing done: build/install/boot.

History

#1

Updated by Toomas Soome 4 months ago

  • Description updated (diff)
#2

Updated by Electric Monk 4 months ago

  • Status changed from In Progress to Closed
  • % Done changed from 90 to 100

git commit 3fcf12aa85ee6a09e545bb163186849413a1ea3f

commit  3fcf12aa85ee6a09e545bb163186849413a1ea3f
Author: Toomas Soome <tsoome@me.com>
Date:   2019-11-14T08:09:31.000Z

    11794 usba: cast between incompatible function types
    Reviewed by: Robert Mustacchi <rm@fingolfin.org>
    Approved by: Dan McDonald <danmcd@joyent.com>

Also available in: Atom PDF