diff --git a/graphics/nxwidgets/src/cmultilinetextbox.cxx b/graphics/nxwidgets/src/cmultilinetextbox.cxx index 85cfb8e51..2b6b5da12 100644 --- a/graphics/nxwidgets/src/cmultilinetextbox.cxx +++ b/graphics/nxwidgets/src/cmultilinetextbox.cxx @@ -1134,7 +1134,7 @@ bool CMultiLineTextBox::isCursorVisible(void) const nxwidget_char_t CMultiLineTextBox::getCursorChar(void) const { - if (m_cursorPos < m_text->getLength()) + if (m_cursorPos < (int)m_text->getLength()) { return m_text->getCharAt(m_cursorPos); } diff --git a/graphics/nxwidgets/src/cnxstring.cxx b/graphics/nxwidgets/src/cnxstring.cxx index 1504083ce..21491e78a 100644 --- a/graphics/nxwidgets/src/cnxstring.cxx +++ b/graphics/nxwidgets/src/cnxstring.cxx @@ -76,9 +76,9 @@ #include #include #include -#include -#include -#include +#include +#include +#include #include "graphics/nxwidgets/cnxstring.hxx" #include "graphics/nxwidgets/cstringiterator.hxx" @@ -808,7 +808,7 @@ CNxString CNxString::format(const char *fmt, ...) { va_list args; va_start(args, fmt); - size_t len = vsnprintf(nullptr, 0, fmt, args) + 1; + size_t len = std::vsnprintf((FAR char *)0, 0, fmt, args) + 1; va_end(args); va_start(args, fmt); diff --git a/graphics/nxwidgets/src/ctextbox.cxx b/graphics/nxwidgets/src/ctextbox.cxx index b70351125..39bf2822a 100644 --- a/graphics/nxwidgets/src/ctextbox.cxx +++ b/graphics/nxwidgets/src/ctextbox.cxx @@ -306,7 +306,7 @@ void CTextBox::handleCursorControlEvent(const CWidgetEventArgs &e) } else if (control == CURSOR_RIGHT) { - if (m_cursorPos < m_text.getLength()) + if (m_cursorPos < (int)m_text.getLength()) { moveCursorToPosition(m_cursorPos + 1); } @@ -572,7 +572,7 @@ const nxgl_coord_t CTextBox::getCursorXPos(void) const nxgl_coord_t CTextBox::getCursorWidth(void) const { - if (m_cursorPos < m_text.getLength()) + if (m_cursorPos < (int)m_text.getLength()) { // Cursor within the string - get the width of the character @@ -639,7 +639,7 @@ void CTextBox::calculateTextPositionHorizontal(void) // Text is wider than box - view needs to follow the cursor // If cursor is at the end of the text, we can just right-align - if (m_cursorPos == m_text.getLength()) + if (m_cursorPos == (int)m_text.getLength()) { m_align.x = width - stringWidth; return;