Project

General

Profile

Actions

Bug #13618

closed

mdb: cast between incompatible function types

Added by Toomas Soome about 1 year ago. Updated about 1 year 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 10:

    ../../mdb/mdb_bhyve.c:1373:19: error: cast between incompatible function types from 'long int (*)()' to 'int (*)()' [-Werror=cast-function-type]
     1373 |  .t_setcontext =  (int (*)()) mdb_tgt_notsup,
          |                   ^
    ../../mdb/mdb_bhyve.c:1376:17: error: cast between incompatible function types from 'long int (*)()' to 'void (*)()' [-Werror=cast-function-type]
     1376 |  .t_periodic =  (void (*)()) mdb_tgt_nop,
          |                 ^
    ../../mdb/mdb_bhyve.c:1381:14: error: cast between incompatible function types from 'long int (*)()' to 'int (*)()' [-Werror=cast-function-type]
     1381 |  .t_uname =  (int (*)()) mdb_tgt_notsup,
          |              ^
    ../../mdb/mdb_bhyve.c:1394:22: error: cast between incompatible function types from 'long int (*)()' to 'int (*)()' [-Werror=cast-function-type]
     1394 |  .t_lookup_by_name = (int (*)()) mdb_tgt_notsup,
          |                      ^
    ../../mdb/mdb_bhyve.c:1395:22: error: cast between incompatible function types from 'long int (*)()' to 'int (*)()' [-Werror=cast-function-type]
     1395 |  .t_lookup_by_addr = (int (*)()) mdb_tgt_notsup,
          |                      ^
    ../../mdb/mdb_bhyve.c:1396:19: error: cast between incompatible function types from 'long int (*)()' to 'int (*)()' [-Werror=cast-function-type]
     1396 |  .t_symbol_iter = (int (*)()) mdb_tgt_notsup,
          |                   ^
    ../../mdb/mdb_bhyve.c:1397:20: error: cast between incompatible function types from 'long int (*)()' to 'int (*)()' [-Werror=cast-function-type]
     1397 |  .t_mapping_iter = (int (*)()) mdb_tgt_notsup,
          |                    ^
    ../../mdb/mdb_bhyve.c:1398:19: error: cast between incompatible function types from 'long int (*)()' to 'int (*)()' [-Werror=cast-function-type]
     1398 |  .t_object_iter = (int (*)()) mdb_tgt_notsup,
          |                   ^
    ../../mdb/mdb_bhyve.c:1404:12: error: cast between incompatible function types from 'long int (*)()' to 'int (*)()' [-Werror=cast-function-type]
     1404 |  .t_run =  (int (*)()) mdb_tgt_notsup,
          |            ^
    ../../mdb/mdb_bhyve.c:1406:17: error: cast between incompatible function types from 'long int (*)()' to 'int (*)()' [-Werror=cast-function-type]
     1406 |  .t_step_out =  (int (*)()) mdb_tgt_notsup,
          |                 ^
    ../../mdb/mdb_bhyve.c:1407:13: error: cast between incompatible function types from 'long int (*)()' to 'int (*)()' [-Werror=cast-function-type]
     1407 |  .t_next =  (int (*)()) mdb_tgt_notsup,
          |             ^
    ../../mdb/mdb_bhyve.c:1409:15: error: cast between incompatible function types from 'long int (*)()' to 'int (*)()' [-Werror=cast-function-type]
     1409 |  .t_signal =  (int (*)()) mdb_tgt_notsup,
          |               ^
    ../../mdb/mdb_bhyve.c:1410:19: error: cast between incompatible function types from 'void * (*)()' to 'int (*)()' [-Werror=cast-function-type]
     1410 |  .t_add_vbrkpt =  (int (*)()) mdb_tgt_null,
          |                   ^
    ../../mdb/mdb_bhyve.c:1411:19: error: cast between incompatible function types from 'void * (*)()' to 'int (*)()' [-Werror=cast-function-type]
     1411 |  .t_add_sbrkpt =  (int (*)()) mdb_tgt_null,
          |                   ^
    ../../mdb/mdb_bhyve.c:1412:18: error: cast between incompatible function types from 'void * (*)()' to 'int (*)()' [-Werror=cast-function-type]
     1412 |  .t_add_pwapt =  (int (*)()) mdb_tgt_null,
          |                  ^
    ../../mdb/mdb_bhyve.c:1413:18: error: cast between incompatible function types from 'void * (*)()' to 'int (*)()' [-Werror=cast-function-type]
     1413 |  .t_add_vwapt =  (int (*)()) mdb_tgt_null,
          |                  ^
    ../../mdb/mdb_bhyve.c:1414:19: error: cast between incompatible function types from 'void * (*)()' to 'int (*)()' [-Werror=cast-function-type]
     1414 |  .t_add_iowapt =  (int (*)()) mdb_tgt_null,
          |                   ^
    ../../mdb/mdb_bhyve.c:1415:20: error: cast between incompatible function types from 'void * (*)()' to 'int (*)()' [-Werror=cast-function-type]
     1415 |  .t_add_sysenter = (int (*)()) mdb_tgt_null,
          |                    ^
    ../../mdb/mdb_bhyve.c:1416:19: error: cast between incompatible function types from 'void * (*)()' to 'int (*)()' [-Werror=cast-function-type]
     1416 |  .t_add_sysexit = (int (*)()) mdb_tgt_null,
          |                   ^
    ../../mdb/mdb_bhyve.c:1417:19: error: cast between incompatible function types from 'void * (*)()' to 'int (*)()' [-Werror=cast-function-type]
     1417 |  .t_add_signal =  (int (*)()) mdb_tgt_null,
          |                   ^
    ../../mdb/mdb_bhyve.c:1418:18: error: cast between incompatible function types from 'void * (*)()' to 'int (*)()' [-Werror=cast-function-type]
     1418 |  .t_add_fault =  (int (*)()) mdb_tgt_null,
          |                  ^
    ../../mdb/mdb_bhyve.c:1421:19: error: cast between incompatible function types from 'long int (*)()' to 'int (*)()' [-Werror=cast-function-type]
     1421 |  .t_stack_iter =  (int (*)()) mdb_tgt_notsup,
          |                   ^
    ../../mdb/mdb_bhyve.c:1422:13: error: cast between incompatible function types from 'long int (*)()' to 'int (*)()' [-Werror=cast-function-type]
     1422 |  .t_auxv =  (int (*)()) mdb_tgt_notsup
          |             ^

Testing done: build/install/boot

Actions #1

Updated by Electric Monk about 1 year ago

  • Gerrit CR set to 1322
Actions #2

Updated by Toomas Soome about 1 year ago

  • Description updated (diff)
Actions #3

Updated by Electric Monk about 1 year ago

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

git commit 974fceab66899bd599db3037669647d0e261838d

commit  974fceab66899bd599db3037669647d0e261838d
Author: Toomas Soome <tsoome@me.com>
Date:   2021-03-15T19:08:28.000Z

    13618 mdb: cast between incompatible function types
    Reviewed by: Andy Fiddaman <andy@omniosce.org>
    Approved by: Dan McDonald <danmcd@joyent.com>

Actions

Also available in: Atom PDF