Project

General

Profile

Bug #10372

vmem: cast between incompatible function types

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

Status:
Closed
Priority:
Normal
Assignee:
Category:
kernel
Start date:
2019-02-11
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:

Description

Build errors from gcc 8 build:

    ../../common/os/vmem.c: In function 'vmem_xalloc':
    ../../common/os/vmem.c:1107:14: error: cast between incompatible function types from 'void * (*)(vmem_t *, size_t,  int)' {aka 'void * (*)(struct vmem *, long unsigned int,  int)'} to 'void * (*)(vmem_t *, size_t *, size_t,  int)' {aka 'void * (*)(struct vmem *, long unsigned int *, long unsigned int,  int)'} [-Werror=cast-function-type]
         vaddr = ((vmem_ximport_t *)
                  ^
    ../../common/os/vmem.c: In function 'vmem_xcreate':
    ../../common/os/vmem.c:1583:6: error: cast between incompatible function types from 'void * (*)(vmem_t *, size_t *, size_t,  int)' {aka 'void * (*)(struct vmem *, long unsigned int *, long unsigned int,  int)'} to 'void * (*)(vmem_t *, size_t,  int)' {aka 'void * (*)(struct vmem *, long unsigned int,  int)'} [-Werror=cast-function-type]
          (vmem_alloc_t *)afunc, ffunc, source, qcache_max,
          ^
    cc1: all warnings being treated as errors

Cast over uintptr_t.

History

#1

Updated by Electric Monk 5 months ago

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

git commit 735c423ad1b2b03125a2c8d3840540d6b17f7dbf

commit  735c423ad1b2b03125a2c8d3840540d6b17f7dbf
Author: Toomas Soome <tsoome@me.com>
Date:   2019-02-20T19:29:43.000Z

    10372 vmem: cast between incompatible function types
    Reviewed by: Andy Stormont <astormont@racktopsystems.com>
    Reviewed by: Gergő Doma <domag02@gmail.com>ˇ

Also available in: Atom PDF