From 2a19aab1a5eaafeaab7887a288613096493a64e6 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Sun, 16 Sep 2018 10:11:51 -0600 Subject: [PATCH] Eliminate some warnings found in build testing. --- graphics/NxWidgets/libnxwidgets/src/cnxtoolbar.cxx | 3 ++- graphics/NxWidgets/libnxwidgets/src/cstringiterator.cxx | 4 ++-- graphics/NxWidgets/libnxwidgets/src/ctext.cxx | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/graphics/NxWidgets/libnxwidgets/src/cnxtoolbar.cxx b/graphics/NxWidgets/libnxwidgets/src/cnxtoolbar.cxx index 4f71cdcf5..8f5198a7e 100644 --- a/graphics/NxWidgets/libnxwidgets/src/cnxtoolbar.cxx +++ b/graphics/NxWidgets/libnxwidgets/src/cnxtoolbar.cxx @@ -247,7 +247,8 @@ bool CNxToolbar::setPixel(FAR const struct nxgl_point_s *pPos, return nxtk_setpixel(m_hNxTkWindow, pPos, &color) == OK; #else -# warning "Revisit" + // REVISIT + return false; #endif } diff --git a/graphics/NxWidgets/libnxwidgets/src/cstringiterator.cxx b/graphics/NxWidgets/libnxwidgets/src/cstringiterator.cxx index 368fe0756..bd0b4d54a 100644 --- a/graphics/NxWidgets/libnxwidgets/src/cstringiterator.cxx +++ b/graphics/NxWidgets/libnxwidgets/src/cstringiterator.cxx @@ -148,7 +148,7 @@ bool CStringIterator::moveToLast(void) bool CStringIterator::moveToNext(void) { - if (m_currentIndex < m_pString->getLength() - 1) + if ((unsigned int)m_currentIndex < m_pString->getLength() - 1) { m_pCurrentChar++; m_currentIndex++; @@ -186,7 +186,7 @@ bool CStringIterator::moveTo(int index) { // Abort if index exceeds the size of the string - if (index < m_pString->getLength()) + if ((unsigned int)index < m_pString->getLength()) { // Move to the requested position diff --git a/graphics/NxWidgets/libnxwidgets/src/ctext.cxx b/graphics/NxWidgets/libnxwidgets/src/ctext.cxx index a8f345321..65baa9e9b 100644 --- a/graphics/NxWidgets/libnxwidgets/src/ctext.cxx +++ b/graphics/NxWidgets/libnxwidgets/src/ctext.cxx @@ -578,7 +578,7 @@ void CText::wrap(int charIndex) // Add marker indicating end of text // If we reached the end of the text, append the stopping point - if (m_linePositions[m_linePositions.size() - 1] != getLength() + 1) + if ((unsigned int)m_linePositions[m_linePositions.size() - 1] != getLength() + 1) { m_linePositions.push_back(getLength()); }