Project

General

Profile

Actions

Bug #12124

closed

sort: cast between incompatible function types

Added by Toomas Soome over 3 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
cmd - userland programs
Start date:
Due date:
% Done:

100%

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

Description

Build errors with gcc 8:

    ../common/initialize.c:127:21: error: cast between incompatible function types from 'int (*)(const char *, const char *)' to 'int (*)(void *, void *, flag_t)' {aka 'int (*)(void *, void *, int)'} [-Werror=cast-function-type]
       S->m_compare_fn = (cmp_fcn_t)strcoll;
                         ^
    ../common/initialize.c:156:21: error: cast between incompatible function types from 'int (*)(const wchar_t *, const wchar_t *)' {aka 'int (*)(const long int *, const long int *)'} to 'int (*)(void *, void *, flag_t)' {aka 'int (*)(void *, void *, int)'} [-Werror=cast-function-type]
       S->m_compare_fn = (cmp_fcn_t)wcscoll;
                         ^
    cc1: all warnings being treated as errors

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 ccbce734fa32e42c5bcbf1594753738697898823

commit  ccbce734fa32e42c5bcbf1594753738697898823
Author: Toomas Soome <tsoome@me.com>
Date:   2020-01-10T07:39:18.000Z

    12124 sort: cast between incompatible function types
    Reviewed by: C Fraire <cfraire@me.com>
    Reviewed by: Andy Fiddaman <andy@omniosce.org>
    Approved by: Robert Mustacchi <rm@fingolfin.org>

Actions

Also available in: Atom PDF