diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2014-07-24 20:02:12 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2014-07-24 20:02:12 -0600 |
commit | ff01122e52ae194dd186c30bfa9b0f41cd71539e (patch) | |
tree | ca1f09af8113d46ecee670b4f479743728236ac4 /NxWidgets/libnxwidgets | |
parent | 6fed6af821797ef101b7e8f549439b5d3db3d639 (diff) | |
download | nuttx-ff01122e52ae194dd186c30bfa9b0f41cd71539e.tar.gz nuttx-ff01122e52ae194dd186c30bfa9b0f41cd71539e.tar.bz2 nuttx-ff01122e52ae194dd186c30bfa9b0f41cd71539e.zip |
Remove some warnings
Diffstat (limited to 'NxWidgets/libnxwidgets')
-rw-r--r-- | NxWidgets/libnxwidgets/src/cnxstring.cxx | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/NxWidgets/libnxwidgets/src/cnxstring.cxx b/NxWidgets/libnxwidgets/src/cnxstring.cxx index 4962858fa..512b68134 100644 --- a/NxWidgets/libnxwidgets/src/cnxstring.cxx +++ b/NxWidgets/libnxwidgets/src/cnxstring.cxx @@ -274,7 +274,8 @@ void CNxString::append(const CNxString &text) FAR nxwidget_char_t *dest = &m_text[m_stringLength]; FAR const nxwidget_char_t *src = text.getCharArray(); - for (int i = 0; i < text.getLength(); i++) + + for (unsigned int i = 0; i < text.getLength(); i++) { *dest++ = *src++; } @@ -328,6 +329,7 @@ void CNxString::insert(const CNxString &text, int index) FAR nxwidget_char_t *dest = newText; FAR const nxwidget_char_t *src = m_text; + for (int i = 0; i < index; i++) { *dest++ = *src++; @@ -336,7 +338,8 @@ void CNxString::insert(const CNxString &text, int index) // Insert the additional text into the new string src = text.getCharArray(); - for (int i = 0; i < text.getLength(); i++) + + for (unsigned int i = 0; i < text.getLength(); i++) { *dest++ = *src++; } @@ -344,6 +347,7 @@ void CNxString::insert(const CNxString &text, int index) // Copy the end of the existing text the the newly allocated string src = &m_text[index]; + for (int i = index; i < m_stringLength; i++) { *dest++ = *src++; @@ -375,7 +379,8 @@ void CNxString::insert(const CNxString &text, int index) dest = &m_text[index]; src = text.getCharArray(); - for (int i = 0; i < text.getLength(); i++) + + for (unsigned int i = 0; i < text.getLength(); i++) { *dest++ = *src++; } @@ -436,6 +441,7 @@ void CNxString::remove(const int startIndex, const int count) FAR nxwidget_char_t *dest = &m_text[startIndex]; FAR const nxwidget_char_t *src = &m_text[endIndex]; + for (int i = m_stringLength - endIndex; i > 0; i--) { *dest++ = *src++; |