Project

General

Profile

Actions

Bug #11980

closed

libc_db: 'td_sync_setstate' alias between functions of incompatible types

Added by Toomas Soome over 3 years ago. Updated over 3 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 error with gcc 8:

    In file included from ../../libc/inc/thr_uberdata.h:58,
                     from ../common/thread_db.c:35:
    /code/illumos-gate/proto/root_i386/usr/include/thread_db.h:678:1: error: 'td_sync_setstate' alias between functions of incompatible types 'td_err_e(const td_synchandle_t *, int)' {aka 'enum <anonymous>(const struct td_synchandle *, int)'} and 'td_err_e(const td_synchandle_t *, long int)' {aka 'enum <anonymous>(const struct td_synchandle *, long int)'} [-Werror=attribute-alias]
     td_sync_setstate(const td_synchandle_t *, int value);
     ^~~~~~~~~~~~~~~~
    ../common/thread_db.c:2896:1: note: aliased declaration here
     __td_sync_setstate(const td_synchandle_t *sh_p, long lvalue)
     ^~~~~~~~~~~~~~~~~~
    cc1: all warnings being treated as errors

Apparently the td_sync_setstate() should take second argument as int, not long. Also it is not properly documented.

Testing done: build/install/boot.

Actions #1

Updated by Toomas Soome over 3 years ago

  • Description updated (diff)
Actions #2

Updated by Electric Monk over 3 years ago

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

git commit fb79d5292b21ee64c248cf81a28a07cb84b18ba1

commit  fb79d5292b21ee64c248cf81a28a07cb84b18ba1
Author: Toomas Soome <tsoome@me.com>
Date:   2019-12-16T16:10:53.000Z

    11980 libc_db: 'td_sync_setstate' alias between functions of incompatible types
    Reviewed by: Robert Mustacchi <rm+illumos@fingolfin.org>
    Approved by: Dan McDonald <danmcd@joyent.com>

Actions

Also available in: Atom PDF