Project

General

Profile

Bug #11792

ibtl: 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/ib/ibtl/ibtl_handlers.c:508:16: error: cast between incompatible function types from 'ibt_async_handler_t' {aka 'void (*)(void *, struct ibtl_hca_s *, enum ibt_async_code_e,  struct ibt_async_event_s *)'} to 'ibt_status_t (*)(ib_guid_t,  uint8_t,  ib_lid_t,  ibt_node_info_t *)' {aka 'enum ibt_status_e (*)(long unsigned int,  unsigned char,  short unsigned int,  struct ibt_node_info_s *)'} [-Werror=cast-function-type]
      ibt_status = ((ibtl_node_info_cb_t)mgrp->mgr_async_handler)(hca_guid,
                    ^
    ../../common/io/ib/ibtl/ibtl_handlers.c: In function 'ibtl_do_hca_asyncs':
    ../../common/io/ib/ibtl/ibtl_handlers.c:743:8: error: cast between incompatible function types from 'ibtl_node_info_cb_t' {aka 'enum ibt_status_e (*)(long unsigned int,  unsigned char,  short unsigned int,  struct ibt_node_info_s *)'} to 'void (*)(void *, struct ibtl_hca_s *, ibt_async_code_t,  ibt_async_event_t *)' {aka 'void (*)(void *, struct ibtl_hca_s *, enum ibt_async_code_e,  struct ibt_async_event_s *)'} [-Werror=cast-function-type]
            (ibt_async_handler_t)ibtl_node_info_cb);
            ^
    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 327c8d1665439dd2540c1b460773bd9f0c1c0fa9

commit  327c8d1665439dd2540c1b460773bd9f0c1c0fa9
Author: Toomas Soome <tsoome@me.com>
Date:   2019-11-07T06:27:18.000Z

    11792 ibtl: cast between incompatible function types
    Reviewed by: Andy Fiddaman <omnios@citrus-it.co.uk>
    Approved by: Dan McDonald <danmcd@joyent.com>

Also available in: Atom PDF