Project

General

Profile

Bug #10158

sgs/rtld: cast between incompatible function types

Added by Toomas Soome 7 months ago. Updated 7 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
lib - userland libraries
Start date:
2018-12-23
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:

Description

Issue found by gcc 8 build:

    ../common/external.c: In function 'rt_thr_init':
    ../common/external.c:481:6: error: cast between incompatible function types from 'int (*)()' to 'void (*)()' [-Werror=cast-function-type]
          (void (*)())lml->lm_lcs[CI_THRINIT].lc_un.lc_func) != NULL) {
          ^

    ../common/tls.c: In function 'tls_modaddrem':
    ../common/tls.c:126:10: error: cast between incompatible function types from 'int (*)()' to 'void (*)()' [-Werror=cast-function-type]
       fptr = (void (*)())lml->lm_lcs[CI_TLS_MODADD].lc_un.lc_func;
              ^
    ../common/tls.c:128:10: error: cast between incompatible function types from 'int (*)()' to 'void (*)()' [-Werror=cast-function-type]
       fptr = (void (*)())lml->lm_lcs[CI_TLS_MODREM].lc_un.lc_func;
              ^
    ../common/tls.c: In function 'tls_statmod':
    ../common/tls.c:263:9: error: cast between incompatible function types from 'int (*)()' to 'void (*)()' [-Werror=cast-function-type]
      fptr = (void (*)())lml->lm_lcs[CI_TLS_STATMOD].lc_un.lc_func;
             ^
    cc1: all warnings being treated as errors

History

#1

Updated by Electric Monk 7 months ago

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

git commit 5e90af26eb6ed2206c2a5f5131a1f3c377d6e8c4

commit  5e90af26eb6ed2206c2a5f5131a1f3c377d6e8c4
Author: Toomas Soome <tsoome@me.com>
Date:   2019-01-04T12:35:46.000Z

    10158 sgs/rtld: cast between incompatible function types
    Reviewed by: Gergő Mihály Doma <domag02@gmail.com>
    Reviewed by: C Fraire <cfraire@me.com>
    Approved by: Hans Rosenfeld <rosenfeld@grumpf.hope-2000.org>

Also available in: Atom PDF