Project

General

Profile

Actions

Bug #13756

closed

mdb: cast between incompatible function types

Added by Toomas Soome 11 days ago. Updated 3 days 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 on SPARC:

    ../../../sparc/kmdb/kctl/kctl_isadep.c: In function 'kctl_ttable_init':
    ../../../sparc/kmdb/kctl/kctl_isadep.c:143:9: error: cast between incompatible function types from 'void (*)(char *, size_t)' {aka 'void (*)(char *, long unsigned int)'} to 'void (*)(uint64_t,  uint64_t)' {aka 'void (*)(long unsigned int,  long unsigned int)'} [-Werror=cast-function-type]
      143 |  xc_all((xcfunc_t *)kctl_ttable_tlb_lock, (uint64_t)kctl.kctl_tba,
          |         ^
    ../../../sparc/kmdb/kctl/kctl_isadep.c: In function 'kctl_ttable_fini':
    ../../../sparc/kmdb/kctl/kctl_isadep.c:150:9: error: cast between incompatible function types from 'void (*)(char *, size_t)' {aka 'void (*)(char *, long unsigned int)'} to 'void (*)(uint64_t,  uint64_t)' {aka 'void (*)(long unsigned int,  long unsigned int)'} [-Werror=cast-function-type]
      150 |  xc_all((xcfunc_t *)kctl_ttable_tlb_unlock, (uint64_t)kctl.kctl_dseg,
          |         ^
    cc1: all warnings being treated as errors

    ../../mdb/kvm_v9dep.c:217:2: error: cast between incompatible function types from 'long int (*)()' to 'int (*)()' [-Werror=cast-function-type]
      217 |  (int (*)())mdb_tgt_notsup,  /* t_run */
          |  ^
    ../../mdb/kvm_v9dep.c:218:2: error: cast between incompatible function types from 'long int (*)()' to 'int (*)()' [-Werror=cast-function-type]
      218 |  (int (*)())mdb_tgt_notsup,  /* t_step */
          |  ^
    ../../mdb/kvm_v9dep.c:219:2: error: cast between incompatible function types from 'long int (*)()' to 'int (*)()' [-Werror=cast-function-type]
      219 |  (int (*)())mdb_tgt_notsup,  /* t_step_out */
          |  ^
    ../../mdb/kvm_v9dep.c:220:2: error: cast between incompatible function types from 'long int (*)()' to 'int (*)()' [-Werror=cast-function-type]
      220 |  (int (*)())mdb_tgt_notsup,  /* t_next */
          |  ^
    ../../mdb/kvm_v9dep.c:221:2: error: cast between incompatible function types from 'long int (*)()' to 'int (*)()' [-Werror=cast-function-type]
      221 |  (int (*)())mdb_tgt_notsup,  /* t_cont */
          |  ^
    ../../mdb/kvm_v9dep.c:222:2: error: cast between incompatible function types from 'long int (*)()' to 'int (*)()' [-Werror=cast-function-type]
      222 |  (int (*)())mdb_tgt_notsup,  /* t_signal */
          |  ^
    ../../mdb/kvm_v9dep.c:235:2: error: cast between incompatible function types from 'long int (*)()' to 'int (*)()' [-Werror=cast-function-type]
      235 |  (int (*)())mdb_tgt_notsup  /* t_auxv */
          |  ^
    cc1: all warnings being treated as errors

    ../../mdb/kvm_v7dep.c:376:2: error: cast between incompatible function types from 'long int (*)()' to 'void (*)()' [-Werror=cast-function-type]
      376 |  (void (*)()) mdb_tgt_nop,  /* t_periodic */
          |  ^
    ../../mdb/kvm_v7dep.c:410:2: error: cast between incompatible function types from 'void * (*)()' to 'int (*)()' [-Werror=cast-function-type]
      410 |  (int (*)()) mdb_tgt_null,  /* t_add_vbrkpt */
          |  ^
    ../../mdb/kvm_v7dep.c:411:2: error: cast between incompatible function types from 'void * (*)()' to 'int (*)()' [-Werror=cast-function-type]
      411 |  (int (*)()) mdb_tgt_null,  /* t_add_sbrkpt */
          |  ^
    ../../mdb/kvm_v7dep.c:412:2: error: cast between incompatible function types from 'void * (*)()' to 'int (*)()' [-Werror=cast-function-type]
      412 |  (int (*)()) mdb_tgt_null,  /* t_add_pwapt */
          |  ^
    ../../mdb/kvm_v7dep.c:413:2: error: cast between incompatible function types from 'void * (*)()' to 'int (*)()' [-Werror=cast-function-type]
      413 |  (int (*)()) mdb_tgt_null,  /* t_add_vwapt */
          |  ^
    ../../mdb/kvm_v7dep.c:414:2: error: cast between incompatible function types from 'void * (*)()' to 'int (*)()' [-Werror=cast-function-type]
      414 |  (int (*)()) mdb_tgt_null,  /* t_add_iowapt */
          |  ^
    ../../mdb/kvm_v7dep.c:415:2: error: cast between incompatible function types from 'void * (*)()' to 'int (*)()' [-Werror=cast-function-type]
      415 |  (int (*)()) mdb_tgt_null,  /* t_add_sysenter */
          |  ^
    ../../mdb/kvm_v7dep.c:416:2: error: cast between incompatible function types from 'void * (*)()' to 'int (*)()' [-Werror=cast-function-type]
      416 |  (int (*)()) mdb_tgt_null,  /* t_add_sysexit */
          |  ^
    ../../mdb/kvm_v7dep.c:417:2: error: cast between incompatible function types from 'void * (*)()' to 'int (*)()' [-Werror=cast-function-type]
      417 |  (int (*)()) mdb_tgt_null,  /* t_add_signal */
          |  ^
    ../../mdb/kvm_v7dep.c:418:2: error: cast between incompatible function types from 'void * (*)()' to 'int (*)()' [-Werror=cast-function-type]
      418 |  (int (*)()) mdb_tgt_null,  /* t_add_fault */
          |  ^
    cc1: all warnings being treated as errors
    *** Error code 1
    dmake: Fatal error: Command failed for target `kvm_v7dep.o'
    Current working directory /code/illumos-gate/usr/src/cmd/mdb/sparc/v7/mdb

    ../../mdb/kvm_v9dep.c:189:2: error: cast between incompatible function types from 'long int (*)()' to 'void (*)()' [-Werror=cast-function-type]
      189 |  (void (*)()) mdb_tgt_nop,  /* t_periodic */
          |  ^
    ../../mdb/kvm_v9dep.c:223:2: error: cast between incompatible function types from 'void * (*)()' to 'int (*)()' [-Werror=cast-function-type]
      223 |  (int (*)()) mdb_tgt_null,  /* t_add_vbrkpt */
          |  ^
    ../../mdb/kvm_v9dep.c:224:2: error: cast between incompatible function types from 'void * (*)()' to 'int (*)()' [-Werror=cast-function-type]
      224 |  (int (*)()) mdb_tgt_null,  /* t_add_sbrkpt */
          |  ^
    ../../mdb/kvm_v9dep.c:225:2: error: cast between incompatible function types from 'void * (*)()' to 'int (*)()' [-Werror=cast-function-type]
      225 |  (int (*)()) mdb_tgt_null,  /* t_add_pwapt */
          |  ^
    ../../mdb/kvm_v9dep.c:226:2: error: cast between incompatible function types from 'void * (*)()' to 'int (*)()' [-Werror=cast-function-type]
      226 |  (int (*)()) mdb_tgt_null,  /* t_add_iowapt */
          |  ^
    ../../mdb/kvm_v9dep.c:227:2: error: cast between incompatible function types from 'void * (*)()' to 'int (*)()' [-Werror=cast-function-type]
      227 |  (int (*)()) mdb_tgt_null,  /* t_add_vwapt */
          |  ^
    ../../mdb/kvm_v9dep.c:228:2: error: cast between incompatible function types from 'void * (*)()' to 'int (*)()' [-Werror=cast-function-type]
      228 |  (int (*)()) mdb_tgt_null,  /* t_add_sysenter */
          |  ^
    ../../mdb/kvm_v9dep.c:229:2: error: cast between incompatible function types from 'void * (*)()' to 'int (*)()' [-Werror=cast-function-type]
      229 |  (int (*)()) mdb_tgt_null,  /* t_add_sysexit */
          |  ^
    ../../mdb/kvm_v9dep.c:230:2: error: cast between incompatible function types from 'void * (*)()' to 'int (*)()' [-Werror=cast-function-type]
      230 |  (int (*)()) mdb_tgt_null,  /* t_add_signal */
          |  ^
    ../../mdb/kvm_v9dep.c:231:2: error: cast between incompatible function types from 'void * (*)()' to 'int (*)()' [-Werror=cast-function-type]
      231 |  (int (*)()) mdb_tgt_null,  /* t_add_fault */
          |  ^
    cc1: all warnings being treated as errors
    *** Error code 1
    dmake: Fatal error: Command failed for target `kvm_v9dep.o'
    Current working directory /code/illumos-gate/usr/src/cmd/mdb/sparc/v7/mdb

Testing done: build/install/boot, mdb is still functional

Actions #1

Updated by Electric Monk 11 days ago

  • Gerrit CR set to 1447
Actions #2

Updated by Toomas Soome 4 days ago

  • Description updated (diff)
Actions #3

Updated by Electric Monk 3 days ago

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

git commit 0597f6f3c66723c1dd0a4c1ad4b79db2dfd71b12

commit  0597f6f3c66723c1dd0a4c1ad4b79db2dfd71b12
Author: Toomas Soome <tsoome@me.com>
Date:   2021-05-04T19:36:06.000Z

    13756 mdb: cast between incompatible function types
    Reviewed by: Robert Mustacchi <rm+illumos@fingolfin.org>
    Approved by: Dan McDonald <danmcd@joyent.com>

Actions

Also available in: Atom PDF