Page MenuHomeFreeBSD

Fix arm builds of updated libedit
ClosedPublic

Authored by dim on Sep 14 2019, 10:33 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Jan 14, 7:52 PM
Unknown Object (File)
Sat, Jan 11, 1:08 AM
Unknown Object (File)
Sat, Jan 11, 12:23 AM
Unknown Object (File)
Dec 23 2024, 7:46 PM
Unknown Object (File)
Dec 10 2024, 6:15 AM
Unknown Object (File)
Dec 4 2024, 6:54 PM
Unknown Object (File)
Dec 4 2024, 6:54 PM
Unknown Object (File)
Dec 4 2024, 6:53 PM

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 - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

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.