Project

General

Profile

Actions

Bug #12107

closed

libdiskmgt: cast between incompatible function types

Added by Toomas Soome almost 4 years ago. Updated almost 4 years ago.

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

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:
External Bug:

Description

Build errors with gcc 8:

    ../common/events.c: In function 'dm_init_event_queue':
    ../common/events.c:155:4: error: cast between incompatible function types from 'void (*)()' to 'void * (*)(void *)' [-Werror=cast-function-type]
        (void *(*)(void *))cb_watch_events, NULL, THR_DAEMON,
        ^
    ../common/events.c:175:7: error: cast between incompatible function types from 'void (*)()' to 'void * (*)(void *)' [-Werror=cast-function-type]
           (void *(*)(void *))cb_watch_events, NULL, THR_DAEMON,
           ^
    ../common/events.c: In function 'walk_devtree':
    ../common/events.c:448:33: error: cast between incompatible function types from 'void (*)(void *)' to 'void * (*)(void *)' [-Werror=cast-function-type]
          if (thr_create(NULL, NULL, (void *(*)(void *))walker, NULL,
                                     ^
    ../common/events.c: In function 'walk_devtree':
    ../common/events.c:446:33: error: cast between incompatible function types from 'void (*)(void *)' to 'void * (*)(void *)' [-Werror=cast-function-type]
          if (thr_create(NULL, NULL, (void *(*)(void *))walker, NULL,
                                     ^
    ../common/inuse_mnt.c:94:34: error: cast between incompatible function types from 'void (*)()' to 'void * (*)(void *)' [-Werror=cast-function-type]
       *errp = thr_create(NULL, NULL, (void *(*)(void *))watch_mnttab,
                                      ^

    cc1: all warnings being treated as errors

Testing done: build/install/boot

Actions #1

Updated by Toomas Soome almost 4 years ago

  • Description updated (diff)
Actions #2

Updated by Electric Monk almost 4 years ago

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

git commit 6aa760d176ff3ceaed1f2c3f6c2b45352b83e336

commit  6aa760d176ff3ceaed1f2c3f6c2b45352b83e336
Author: Toomas Soome <tsoome@me.com>
Date:   2019-12-27T16:43:27.000Z

    12107 libdiskmgt: cast between incompatible function types
    Reviewed by: Matthias Scheler <mscheler@tintri.com>
    Approved by: Robert Mustacchi <rm@fingolfin.org>

Actions

Also available in: Atom PDF