Project

General

Profile

Bug #11797

Updated by Toomas Soome over 2 years ago

Build errors with gcc8: 
 <pre> 
     ../../i86pc/io/cbe.c: In function 'cbe_init': 
     ../../i86pc/io/cbe.c:349:40: error: cast between incompatible function types from 'int (*)(void)' to 'uint_t (*)(char *, char *)' {aka 'unsigned int (*)(char *, char *)'} [-Werror=cast-function-type] 
       (void) add_avintr(NULL, CBE_HIGH_PIL, (avfunc)cbe_fire, 
                                             ^ 
     ../../i86pc/io/cbe.c:353:41: error: cast between incompatible function types from 'int (*)(void)' to 'uint_t (*)(char *, char *)' {aka 'unsigned int (*)(char *, char *)'} [-Werror=cast-function-type] 
        (void) add_avintr(NULL, CBE_HIGH_PIL, (avfunc)cbe_fire, 
                                              ^ 
     ../../i86pc/io/cbe.c:360:6: error: cast between incompatible function types from 'int (*)(void)' to 'uint_t (*)(char *, char *)' {aka 'unsigned int (*)(char *, char *)'} [-Werror=cast-function-type] 
           (avfunc)cbe_softclock, "softclock", NULL, NULL); 
           ^ 
     ../../i86pc/io/cbe.c:363:6: error: cast between incompatible function types from 'int (*)(void)' to 'uint_t (*)(char *, char *)' {aka 'unsigned int (*)(char *, char *)'} [-Werror=cast-function-type] 
           (avfunc)cbe_low_level, "low level", NULL, NULL); 
           ^ 
    
     ../../i86pc/os/cpupm/cpupm_throttle.c: In function 'cpupm_throttle': 
     ../../i86pc/os/cpupm/cpupm_throttle.c:217:23: error: cast between incompatible function types from 'void (*)(uint32_t)' {aka 'void (*)(unsigned int)'} to 'int (*)(xc_arg_t,    xc_arg_t,    xc_arg_t)' {aka 'int (*)(long unsigned int,    long unsigned int,    long unsigned int)'} [-Werror=cast-function-type] 
            CPUSET2BV(set), (xc_func_t)cpupm_tstate_transition); 
                            ^ 
    
     ../../i86pc/os/dtrace_subr.c: In function 'dtrace_xcall': 
     ../../i86pc/os/dtrace_subr.c:160:6: error: cast between incompatible function types from 'int (*)(void (*)(void *), void *)' to 'int (*)(xc_arg_t,    xc_arg_t,    xc_arg_t)' {aka 'int (*)(long unsigned int,    long unsigned int,    long unsigned int)'} [-Werror=cast-function-type] 
           (xc_func_t)dtrace_xcall_func); 
           ^ 
    
     ../../intel/ia32/os/desctbls.c:150:2: error: cast between incompatible function types from 'hrtime_t (*)(void)' {aka 'long long int (*)(void)'} to 'void (*)()' [-Werror=cast-function-type] 
       (void (*)())get_hrtime,    /* T_GETHRTIME */ 
       ^ 
     ../../intel/ia32/os/desctbls.c:151:2: error: cast between incompatible function types from 'hrtime_t (*)(void)' {aka 'long long int (*)(void)'} to 'void (*)()' [-Werror=cast-function-type] 
       (void (*)())gethrvtime,    /* T_GETHRVTIME */ 
       ^ 
     ../../intel/ia32/os/desctbls.c:152:2: error: cast between incompatible function types from 'hrtime_t (*)(void)' {aka 'long long int (*)(void)'} to 'void (*)()' [-Werror=cast-function-type] 
       (void (*)())get_hrestime, /* T_GETHRESTIME */ 
       ^ 
     ../../intel/ia32/os/desctbls.c:153:2: error: cast between incompatible function types from 'uint64_t (*)(void)' {aka 'long unsigned int (*)(void)'} to 'void (*)()' [-Werror=cast-function-type] 
       (void (*)())getlgrp    /* T_GETLGRP */ 
       ^ 
    
     ./../i86pc/os/fastboot.c: In function 'fast_reboot': 
     ../../i86pc/os/fastboot.c:1375:7: error: cast between incompatible function types from 'int (*)(fastboot_info_t *, xc_arg_t,    xc_arg_t)' {aka 'int (*)(struct _fastboot_info *, long unsigned int,    long unsigned int)'} to 'int (*)(xc_arg_t,    xc_arg_t,    xc_arg_t)' {aka 'int (*)(long unsigned int,    long unsigned int,    long unsigned int)'} [-Werror=cast-function-type] 
            (xc_func_t)fastboot_xc_func); 
            ^ 
    
     ../../intel/kdi/kdi_idt.c: In function 'kdi_activate': 
     ../../intel/kdi/kdi_idt.c:350:7: error: cast between incompatible function types from 'int (*)(void)' to 'int (*)(xc_arg_t,    xc_arg_t,    xc_arg_t)' {aka 'int (*)(long unsigned int,    long unsigned int,    long unsigned int)'} [-Werror=cast-function-type] 
            (xc_func_t)kdi_cpu_activate); 
            ^ 
     ../../intel/kdi/kdi_idt.c: In function 'kdi_deactivate': 
     ../../intel/kdi/kdi_idt.c:367:38: error: cast between incompatible function types from 'int (*)(void)' to 'int (*)(xc_arg_t,    xc_arg_t,    xc_arg_t)' {aka 'int (*)(long unsigned int,    long unsigned int,    long unsigned int)'} [-Werror=cast-function-type] 
       xc_call(0, 0, 0, CPUSET2BV(cpuset), (xc_func_t)kdi_cpu_deactivate); 
                                           ^ 
    
     ../../i86pc/os/machdep.c: In function 'stop_other_cpus': 
     ../../i86pc/os/machdep.c:406:41: error: cast between incompatible function types from 'void (*)(char *)' to 'int (*)(xc_arg_t,    xc_arg_t,    xc_arg_t)' {aka 'int (*)(long unsigned int,    long unsigned int,    long unsigned int)'} [-Werror=cast-function-type] 
       xc_priority(0, 0, 0, CPUSET2BV(xcset), (xc_func_t)mach_cpu_halt); 
                                              ^ 
    
     ../../i86pc/os/mp_call.c: In function 'cpu_call': 
     ../../i86pc/os/mp_call.c:90:7: error: cast between incompatible function types from 'cpu_call_func_t' {aka 'void (*)(long unsigned int,    long unsigned int)'} to 'int (*)(xc_arg_t,    xc_arg_t,    xc_arg_t)' {aka 'int (*)(long unsigned int,    long unsigned int,    long unsigned int)'} [-Werror=cast-function-type] 
            (xc_func_t)func); 
            ^ 
    
     ../../i86pc/os/cpupm/pwrnow.c: In function 'pwrnow_power': 
     ../../i86pc/os/cpupm/pwrnow.c:157:23: error: cast between incompatible function types from 'void (*)(uint32_t)' {aka 'void (*)(unsigned int)'} to 'int (*)(xc_arg_t,    xc_arg_t,    xc_arg_t)' {aka 'int (*)(long unsigned int,    long unsigned int,    long unsigned int)'} [-Werror=cast-function-type] 
            CPUSET2BV(set), (xc_func_t)pwrnow_pstate_transition); 
                            ^ 
    
     ../../i86pc/os/cpupm/speedstep.c: In function 'speedstep_power': 
     ../../i86pc/os/cpupm/speedstep.c:172:7: error: cast between incompatible function types from 'void (*)(uint32_t)' {aka 'void (*)(unsigned int)'} to 'int (*)(xc_arg_t,    xc_arg_t,    xc_arg_t)' {aka 'int (*)(long unsigned int,    long unsigned int,    long unsigned int)'} [-Werror=cast-function-type] 
            (xc_func_t)speedstep_pstate_transition); 
            ^ 
    
     ../../common/os/cap_util.c: In function 'cu_cpu_run': 
     ../../common/os/cap_util.c:1420:15: error: cast between incompatible function types from 'cu_cpu_func_t' {aka 'void (*)(long unsigned int,    int *)'} to 'void (*)(uintptr_t,    uintptr_t)' {aka 'void (*)(long unsigned int,    long unsigned int)'} [-Werror=cast-function-type] 
       cpu_call(cp, (cpu_call_func_t)func, arg, (uintptr_t)&error); 
                    ^ 
     ../../common/os/cap_util.c: In function 'cu_cpu_update': 
     ../../common/os/cap_util.c:1474:25: error: cast between incompatible function types from 'int (*)(int (*)(void *, uint64_t))' {aka 'int (*)(int (*)(void *, long unsigned int))'} to 'void (*)(uintptr_t,    int *)' {aka 'void (*)(long unsigned int,    int *)'} [-Werror=cast-function-type] 
        (void) cu_cpu_run(cp, (cu_cpu_func_t)kcpc_read, 
                              ^ 
    
     ../../i86pc/os/startup.c: In function 'startup_end': 
     ../../i86pc/os/startup.c:2363:7: error: cast between incompatible function types from 'void (*)(int)' to 'uint_t (*)(char *, char *)' {aka 'unsigned int (*)(char *, char *)'} [-Werror=cast-function-type] 
            (avfunc)ddi_periodic_softintr, "ddi_periodic", 
            ^ 
    
     ../../common/vm/seg_kmem.c:438:26: error: cast between incompatible function types from 'void (*)()' to 'int (*)()' [-Werror=cast-function-type] 
      #define SEGKMEM_BADOP(t) (t(*)())segkmem_badop 
                               ^ 
     ../../common/vm/seg_kmem.c:778:2: note: in expansion of macro 'SEGKMEM_BADOP' 
       SEGKMEM_BADOP(int),    /* dup */ 
       ^~~~~~~~~~~~~ 
     ../../common/vm/seg_kmem.c:438:26: error: cast between incompatible function types from 'void (*)()' to 'int (*)()' [-Werror=cast-function-type] 
      #define SEGKMEM_BADOP(t) (t(*)())segkmem_badop 
                               ^ 
     ../../common/vm/seg_kmem.c:779:2: note: in expansion of macro 'SEGKMEM_BADOP' 
       SEGKMEM_BADOP(int),    /* unmap */ 
       ^~~~~~~~~~~~~ 
     ../../common/vm/seg_kmem.c:438:26: error: cast between incompatible function types from 'void (*)()' to 'faultcode_t (*)()' {aka 'int (*)()'} [-Werror=cast-function-type] 
      #define SEGKMEM_BADOP(t) (t(*)())segkmem_badop 
                               ^ 
     ../../common/vm/seg_kmem.c:782:2: note: in expansion of macro 'SEGKMEM_BADOP' 
       SEGKMEM_BADOP(faultcode_t), /* faulta */ 
       ^~~~~~~~~~~~~ 
     ../../common/vm/seg_kmem.c:438:26: error: cast between incompatible function types from 'void (*)()' to 'size_t (*)()' {aka 'long unsigned int (*)()'} [-Werror=cast-function-type] 
      #define SEGKMEM_BADOP(t) (t(*)())segkmem_badop 
                               ^ 
     ../../common/vm/seg_kmem.c:786:2: note: in expansion of macro 'SEGKMEM_BADOP' 
       SEGKMEM_BADOP(size_t),    /* swapout */ 
       ^~~~~~~~~~~~~ 
     ../../common/vm/seg_kmem.c:438:26: error: cast between incompatible function types from 'void (*)()' to 'int (*)()' [-Werror=cast-function-type] 
      #define SEGKMEM_BADOP(t) (t(*)())segkmem_badop 
                               ^ 
     ../../common/vm/seg_kmem.c:787:2: note: in expansion of macro 'SEGKMEM_BADOP' 
       SEGKMEM_BADOP(int),    /* sync */ 
       ^~~~~~~~~~~~~ 
     ../../common/vm/seg_kmem.c:438:26: error: cast between incompatible function types from 'void (*)()' to 'size_t (*)()' {aka 'long unsigned int (*)()'} [-Werror=cast-function-type] 
      #define SEGKMEM_BADOP(t) (t(*)())segkmem_badop 
                               ^ 
     ../../common/vm/seg_kmem.c:788:2: note: in expansion of macro 'SEGKMEM_BADOP' 
       SEGKMEM_BADOP(size_t),    /* incore */ 
       ^~~~~~~~~~~~~ 
     ../../common/vm/seg_kmem.c:438:26: error: cast between incompatible function types from 'void (*)()' to 'int (*)()' [-Werror=cast-function-type] 
      #define SEGKMEM_BADOP(t) (t(*)())segkmem_badop 
                               ^ 
     ../../common/vm/seg_kmem.c:789:2: note: in expansion of macro 'SEGKMEM_BADOP' 
       SEGKMEM_BADOP(int),    /* lockop */ 
       ^~~~~~~~~~~~~ 
     ../../common/vm/seg_kmem.c:438:26: error: cast between incompatible function types from 'void (*)()' to 'int (*)()' [-Werror=cast-function-type] 
      #define SEGKMEM_BADOP(t) (t(*)())segkmem_badop 
                               ^ 
     ../../common/vm/seg_kmem.c:790:2: note: in expansion of macro 'SEGKMEM_BADOP' 
       SEGKMEM_BADOP(int),    /* getprot */ 
       ^~~~~~~~~~~~~ 
     ../../common/vm/seg_kmem.c:438:26: error: cast between incompatible function types from 'void (*)()' to 'u_offset_t (*)()' {aka 'long long unsigned int (*)()'} [-Werror=cast-function-type] 
      #define SEGKMEM_BADOP(t) (t(*)())segkmem_badop 
                               ^ 
     ../../common/vm/seg_kmem.c:791:2: note: in expansion of macro 'SEGKMEM_BADOP' 
       SEGKMEM_BADOP(u_offset_t), /* getoffset */ 
       ^~~~~~~~~~~~~ 
     ../../common/vm/seg_kmem.c:438:26: error: cast between incompatible function types from 'void (*)()' to 'int (*)()' [-Werror=cast-function-type] 
      #define SEGKMEM_BADOP(t) (t(*)())segkmem_badop 
                               ^ 
     ../../common/vm/seg_kmem.c:792:2: note: in expansion of macro 'SEGKMEM_BADOP' 
       SEGKMEM_BADOP(int),    /* gettype */ 
       ^~~~~~~~~~~~~ 
     ../../common/vm/seg_kmem.c:438:26: error: cast between incompatible function types from 'void (*)()' to 'int (*)()' [-Werror=cast-function-type] 
      #define SEGKMEM_BADOP(t) (t(*)())segkmem_badop 
                               ^ 
     ../../common/vm/seg_kmem.c:793:2: note: in expansion of macro 'SEGKMEM_BADOP' 
       SEGKMEM_BADOP(int),    /* getvp */ 
       ^~~~~~~~~~~~~ 
     ../../common/vm/seg_kmem.c:438:26: error: cast between incompatible function types from 'void (*)()' to 'int (*)()' [-Werror=cast-function-type] 
      #define SEGKMEM_BADOP(t) (t(*)())segkmem_badop 
                               ^ 
     ../../common/vm/seg_kmem.c:794:2: note: in expansion of macro 'SEGKMEM_BADOP' 
       SEGKMEM_BADOP(int),    /* advise */ 
       ^~~~~~~~~~~~~ 
     ../../common/vm/seg_kmem.c:438:26: error: cast between incompatible function types from 'void (*)()' to 'int (*)()' [-Werror=cast-function-type] 
      #define SEGKMEM_BADOP(t) (t(*)())segkmem_badop 
                               ^ 
     ../../common/vm/seg_kmem.c:797:2: note: in expansion of macro 'SEGKMEM_BADOP' 
       SEGKMEM_BADOP(int),    /* setpgsz */ 
       ^~~~~~~~~~~~~ 
     cc1: all warnings being treated as errors 
 </pre> 

 Testing done: build/install/boot

Back