From d07685904098b5a872a506b3ae245ca56d88afbb Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Wed, 30 Oct 2019 14:13:22 +0100 Subject: [PATCH] Fix harmless signed/unsigned comparison warning Cast line index to size_t after checking that it is positive to avoid -Wsign-compare from gcc 8.3. --- src/univ/textctrl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/univ/textctrl.cpp b/src/univ/textctrl.cpp index 0b71630f4c..6f94a7a76a 100644 --- a/src/univ/textctrl.cpp +++ b/src/univ/textctrl.cpp @@ -1684,7 +1684,7 @@ int wxTextCtrl::GetLineLength(wxTextCoord line) const } else // multiline { - if ( line < 0 || line >= GetLineCount() ) + if ( line < 0 || (size_t)line >= GetLineCount() ) return -1; return GetLines()[line].length();