Project

General

Profile

Bug #10374

watchpoint: 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 error from gcc 8:

    ../../common/os/watchpoint.c: In function 'watch_fuword8':
    ../../common/os/watchpoint.c:1210:34: error: cast between incompatible function types from 'void (*)(const void *, uint8_t *)' {aka 'void (*)(const void *, unsigned char *)'} to 'int (*)(const void *, void *)' [-Werror=cast-function-type]
      return (watch_fuword(addr, dst, (fuword_func)fuword8_noerr,
                                      ^
    ../../common/os/watchpoint.c: In function 'watch_fuword16':
    ../../common/os/watchpoint.c:1217:34: error: cast between incompatible function types from 'void (*)(const void *, uint16_t *)' {aka 'void (*)(const void *, short unsigned int *)'} to 'int (*)(const void *, void *)' [-Werror=cast-function-type]
      return (watch_fuword(addr, dst, (fuword_func)fuword16_noerr,
                                      ^
    ../../common/os/watchpoint.c: In function 'watch_fuword32':
    ../../common/os/watchpoint.c:1224:34: error: cast between incompatible function types from 'void (*)(const void *, uint32_t *)' {aka 'void (*)(const void *, unsigned int *)'} to 'int (*)(const void *, void *)' [-Werror=cast-function-type]
      return (watch_fuword(addr, dst, (fuword_func)fuword32_noerr,
                                      ^
    ../../common/os/watchpoint.c: In function 'watch_fuword64':
    ../../common/os/watchpoint.c:1232:34: error: cast between incompatible function types from 'void (*)(const void *, uint64_t *)' {aka 'void (*)(const void *, long unsigned int *)'} to 'int (*)(const void *, void *)' [-Werror=cast-function-type]
      return (watch_fuword(addr, dst, (fuword_func)fuword64_noerr,
                                      ^
    cc1: all warnings being treated as errors

History

#1

Updated by Electric Monk 5 months ago

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

git commit 1e8ae565d271ff6b153a34f63d6dcada4e81e121

commit  1e8ae565d271ff6b153a34f63d6dcada4e81e121
Author: Toomas Soome <tsoome@me.com>
Date:   2019-02-16T07:31:58.000Z

    10374 watchpoint: cast between incompatible function types
    Reviewed by: Andy Stormont <astormont@racktopsystems.com>
    Reviewed by: Andy Fiddaman <af@citrus-it.net>
    Approved by: Hans Rosenfeld <rosenfeld@grumpf.hope-2000.org>

Also available in: Atom PDF