Project

General

Profile

Actions

Bug #11978

closed

libnsl: cast between incompatible function types

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

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

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:

Description

Build error with gcc 8:

    ../rpc/xdr_sizeof.c: In function 'xdr_sizeof':
    ../rpc/xdr_sizeof.c:136:19: error: cast between incompatible function types from
     'int (*)(void)' to 'bool_t (*)(XDR *, long int *)' {aka 'int (*)(struct XDR *,
    long int *)'} [-Werror=cast-function-type]
      ops.x_getlong =  (dummyfunc1) harmless;
                       ^
    ../rpc/xdr_sizeof.c:148:19: error: cast between incompatible function types from
     'int (*)(void)' to 'bool_t (*)(XDR *, char *, int)' {aka 'int (*)(struct XDR *,
     char *, int)'} [-Werror=cast-function-type]
      ops.x_getbytes = (dummyfunc2) harmless;
                       ^
    cc1: all warnings being treated as errors

Add proper callbacks.

Testing done: build/install/boot

Actions #1

Updated by Toomas Soome almost 2 years ago

  • Description updated (diff)
Actions #2

Updated by Electric Monk almost 2 years ago

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

git commit 3665ce8aeee26b1a84fb98951ef011e0779e1ae2

commit  3665ce8aeee26b1a84fb98951ef011e0779e1ae2
Author: Toomas Soome <tsoome@me.com>
Date:   2019-12-16T16:23:15.000Z

    11978 libnsl: cast between incompatible function types
    Reviewed by: Robert Mustacchi <rm@fingolfin.org>
    Approved by: Dan McDonald <danmcd@joyent.com>

Actions

Also available in: Atom PDF