Project

General

Profile

Actions

Bug #12124

closed

sort: cast between incompatible function types

Added by Toomas Soome over 1 year ago. Updated over 1 year ago.

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

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:

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

Also available in: Atom PDF