When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.
src\plugins\codecompletion\parser\token.h|96|warning: format '%d' expects type 'int', but argument 4 has type 'long int'|
Index: src/plugins/codecompletion/parser/token.h===================================================================--- src/plugins/codecompletion/parser/token.h (revision 7041)+++ src/plugins/codecompletion/parser/token.h (working copy)@@ -88,7 +88,7 @@ { const long totalTime = it->first->m_StopWatch.Time(); wxString log;- log.Printf(_T("\"%s\" used time is %d minute(s), %ld.%03ld seconds; call times is %d."),+ log.Printf(_T("\"%s\" used time is %ld minute(s), %ld.%03ld seconds; call times is %d."), it->second.wx_str(), (totalTime / 60000), (totalTime / 1000) % 60,
/home/jens/codeblocks-build/codeblocks.trunk/src/plugins/codecompletion/parser/tokenizer.h:358:36: warning: comparison of unsigned expression < 0 is always false
/** Return (peek) the previous character */ wxChar PreviousChar() const { if ( ((m_TokenIndex - 1) < 0) || (m_BufferLen==0) ) // (m_TokenIndex - 1) >= m_BufferLen can never be true return 0; return m_Buffer.GetChar(m_TokenIndex - 1); };
/home/jens/codeblocks-build/codeblocks.trunk/src/plugins/codecompletion/parser/tokenizer.h:391:51: warning: comparison of unsigned expression >= 0 is always true
/** Check the previous char before EOL is a backslash */ inline bool IsBackslashBeforeEOL() { wxChar last = PreviousChar(); // if DOS line endings, we 've hit \r and we skip to \n... if (last == _T('\r') && (m_TokenIndex - 2 >= 0)) return m_Buffer.GetChar(m_TokenIndex - 2) == _T('\\'); return last == _T('\\'); }
unsigned int m_TokenIndex;
There are more (potential dangerous or at least error-prone) warnings (compiled with -Wextra):
/** Return (peek) the previous character */ wxChar PreviousChar() const { if ( (m_TokenIndex==0) || (m_BufferLen==0) ) // (m_TokenIndex - 1) >= m_BufferLen can never be true return 0; return m_Buffer.GetChar(m_TokenIndex - 1); };
/** Check the previous char before EOL is a backslash */ inline bool IsBackslashBeforeEOL() { wxChar last = PreviousChar(); // if DOS line endings, we 've hit \r and we skip to \n... if (last == _T('\r') && (m_TokenIndex > 1)) return m_Buffer.GetChar(m_TokenIndex - 2) == _T('\\'); return last == _T('\\'); }