From e0538074552ca48f7c994a49dce12be9210f07d4 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Thu, 1 Nov 2018 07:36:31 -0700 Subject: linenoise: fix use of int for wide char. * linenoise/linenoise.c (history_search): The c variable for capturing the input character should be of type wint_t, not int. This was caught by GNU C++, due to a signed/unsigned warning when c was compared to WEOF. --- linenoise/linenoise.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linenoise/linenoise.c b/linenoise/linenoise.c index 817d1698..081533a8 100644 --- a/linenoise/linenoise.c +++ b/linenoise/linenoise.c @@ -681,7 +681,7 @@ static int history_search(lino_t *l) const wchar_t *fmt = L"[%ls]%ls"; int ex = wcslen(fmt) - 2*wcslen(L"%ls"); lino_t *lc = lino_copy(l), *ld = lino_copy(l); - int c = -1; + wint_t c = 0; if (lc == 0 || ld == 0) goto out; -- cgit v1.2.3