Bug #10071

genunix: loadable_syscall: cast between incompatible function types

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

Status:ClosedStart date:2018-12-18
Priority:NormalDue date:
Assignee:Toomas Soome% Done:

100%

Category:kernel
Target version:-
Difficulty:Medium Tags:

Description

Issue reported by gcc 8 build:

    ../../intel/ia32/os/syscall.c: In function 'loadable_syscall':
    ../../intel/ia32/os/syscall.c:1208:14: error: cast between incompatible function types from 'int (*)()' to 'int64_t (*)()' {aka 'long int (*)()'} [-Werror=cast-function-type]
        sy_call = (int64_t (*)())callp->sy_call;
                  ^
    ../../intel/ia32/os/syscall.c:1222:14: error: cast between incompatible function types from 'int (*)()' to 'int64_t (*)()' {aka 'long int (*)()'} [-Werror=cast-function-type]
        sy_call = (int64_t (*)())callp->sy_call;
                  ^
    cc1: all warnings being treated as errors

We have int64_t rval and instead of casting the function return type, the current code does change the function signature...

History

#1 Updated by Electric Monk 2 months ago

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

git commit 1ec00b5abd071c76e2dc0cfa7905965b6b7a89a9

commit  1ec00b5abd071c76e2dc0cfa7905965b6b7a89a9
Author: Toomas Soome <tsoome@me.com>
Date:   2018-12-20T21:51:05.000Z

    10071 genunix: loadable_syscall: cast between incompatible function types
    Reviewed by: Andy Stormont <astormont@racktopsystems.com>
    Reviewed by: Robert Mustacchi <rm@joyent.com>
    Reviewed by: Gergő Mihály Doma <domag02@gmail.com>
    Approved by: Richard Lowe <richlowe@richlowe.net>

Also available in: Atom