Page MenuHomeFreeBSD

Fix arm builds of updated libedit
ClosedPublic

Authored by dim on Sep 14 2019, 10:33 AM.

Details

Summary

On arm and arm64, where chars are unsigned by default, buildworld dies with:

--- terminal.o ---
/usr/src/contrib/libedit/terminal.c:569:41: error: comparison of integers of different signs: 'wint_t' (aka 'int') and 'wchar_t' (aka 'unsigned int') [-Werror,-Wsign-compare]
                                           el->el_cursor.v][where & 0370] !=
                                           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
/usr/src/contrib/libedit/terminal.c:659:28: error: comparison of integers of different signs: 'wint_t' (aka 'int') and 'wchar_t' (aka 'unsigned int') [-Werror,-Wsign-compare]
                                           [el->el_cursor.h] == MB_FILL_CHAR)
                                           ~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~
2 errors generated.
*** [terminal.o] Error code 1

Fix this by making MB_FILL_CHAR a wint_t, so no casting is needed.

Diff Detail

Repository
rS FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

dim created this revision.Sep 14 2019, 10:33 AM
dim edited the summary of this revision. (Show Details)Sep 14 2019, 10:34 AM
bapt accepted this revision.Sep 14 2019, 7:34 PM
bapt added a subscriber: naito.yuichiro_gmail.com.

Note that the same patch was provided by @naito.yuichiro_gmail.com in D21584 (and he contacted upstream for it to be committed in.) Please mention him also in the commit log

This revision is now accepted and ready to land.Sep 14 2019, 7:34 PM
This revision was automatically updated to reflect the committed changes.