[lldb] Fix warning: comparison of integers of different signs
authorJonas Devlieghere <jonas@devlieghere.com>
Mon, 15 Aug 2022 18:23:33 +0000 (11:23 -0700)
committerJonas Devlieghere <jonas@devlieghere.com>
Mon, 15 Aug 2022 18:25:46 +0000 (11:25 -0700)
Fixes a warning about comparison of integers of different signs
'wchar_t' and 'int' in Editline.cpp:

      return out != (int)WEOF;
             ~~~ ^  ~~~~~~~~~

lldb/source/Host/common/Editline.cpp

index ea0f06f..cee7a36 100644 (file)
@@ -1609,7 +1609,7 @@ bool Editline::CompleteCharacter(char ch, EditLineGetCharType &out) {
     switch (cvt.in(state, input.begin(), input.end(), from_next, &out, &out + 1,
                    to_next)) {
     case std::codecvt_base::ok:
-      return out != (int)WEOF;
+      return out != (EditLineGetCharType)WEOF;
 
     case std::codecvt_base::error:
     case std::codecvt_base::noconv: