Patch #2652 2009-01-19 01:05
rhf
Remove GCC 4.3 warnings- Download
- 2652-Remove_GCC_4_3.patch (15.8 KB)
- Category
- Application::Refinement
- Status
- Out of date
- Close date
- 2012-12-14 19:42
- Assigned to
- mortenmacfly
Index: base/tinyxml/tinyxmlparser.cpp
===================================================================
--- base/tinyxml/tinyxmlparser.cpp (revision 5414)
+++ base/tinyxml/tinyxmlparser.cpp (working copy)
@@ -346,7 +346,7 @@
continue;
}
- if ( IsWhiteSpace( *p ) || *p == '\n' || *p =='\r' ) // Still using old rules for white space.
+ if ( IsWhiteSpace( *p ) )
++p;
else
break;
@@ -354,7 +354,7 @@
}
else
{
- while ( *p && IsWhiteSpace( *p ) || *p == '\n' || *p =='\r' )
+ while ( IsWhiteSpace( *p ) )
++p;
}
@@ -1446,7 +1446,7 @@
// its best, even without them.
value = "";
while ( p && *p // existence
- && !IsWhiteSpace( *p ) && *p != '\n' && *p != '\r' // whitespace
+ && !IsWhiteSpace( *p ) // whitespace
&& *p != '/' && *p != '>' ) // tag end
{
if ( *p == SINGLE_QUOTE || *p == DOUBLE_QUOTE ) {
Index: plugins/codecompletion/classbrowserbuilderthread.cpp
===================================================================
--- plugins/codecompletion/classbrowserbuilderthread.cpp (revision 5414)
+++ plugins/codecompletion/classbrowserbuilderthread.cpp (working copy)
@@ -362,7 +362,7 @@
#endif
wxTreeItemId ClassBrowserBuilderThread::AddNodeIfNotThere(wxTreeCtrl* tree, wxTreeItemId parent, const wxString& name, int imgIndex, CBTreeData* data, bool sorted)
{
- sorted = sorted & tree == m_pTreeTop && data; // sorting only for the top tree
+ sorted = sorted & (tree == m_pTreeTop && data); // sorting only for the top tree
SpecialFolder new_type = data->m_SpecialFolder;
bool newIsNamespace = data->m_TokenKind == tkNamespace;
Index: plugins/codecompletion/parser/parserthread.cpp
===================================================================
--- plugins/codecompletion/parser/parserthread.cpp (revision 5414)
+++ plugins/codecompletion/parser/parserthread.cpp (working copy)
@@ -657,7 +657,7 @@
m_EncounteredNamespaces.push(token);
m_Tokenizer.GetToken(); // eat ::
}
- else if ((peek==ParserConsts::semicolon || (m_Options.useBuffer && peek.GetChar(0) == _T('(')) && !m_Str.Contains(ParserConsts::dcolon)) && m_pTokens)
+ else if ((peek==ParserConsts::semicolon || ((m_Options.useBuffer && peek.GetChar(0) == _T('(')) && !m_Str.Contains(ParserConsts::dcolon))) && m_pTokens)
{
// Log("m_Str='"+m_Str+"'");
// Log("token='"+token+"'");
Index: plugins/codecompletion/parser/tokenizer.cpp
===================================================================
--- plugins/codecompletion/parser/tokenizer.cpp (revision 5414)
+++ plugins/codecompletion/parser/tokenizer.cpp (working copy)
@@ -399,7 +399,7 @@
(!m_IsOperator && CurrentChar() == '=') ||
(!m_IsOperator && CurrentChar() == '[') ||
CurrentChar() == '?' ||
- CurrentChar() == '/' && (NextChar() == '/' || NextChar() == '*') )
+ (CurrentChar() == '/' && (NextChar() == '/' || NextChar() == '*') ) )
{
bool skipPreprocessor = false; // used for #include
while (m_Buffer.Mid(m_TokenIndex, 2) == _T("//") ||
Index: plugins/debuggergdb/gdb_driver.cpp
===================================================================
--- plugins/debuggergdb/gdb_driver.cpp (revision 5414)
+++ plugins/debuggergdb/gdb_driver.cpp (working copy)
@@ -783,8 +783,8 @@
}
}
- if (!want_debug_events &&
- output.StartsWith(_T("gdb: ")) ||
+ if ((!want_debug_events &&
+ output.StartsWith(_T("gdb: "))) ||
output.StartsWith(_T("Warning: ")) ||
output.StartsWith(_T("ContinueDebugEvent ")))
{
Index: sdk/scripting/sqstdlib/sqstdrex.cpp
===================================================================
--- sdk/scripting/sqstdlib/sqstdrex.cpp (revision 5414)
+++ sdk/scripting/sqstdlib/sqstdrex.cpp (working copy)
@@ -483,7 +483,7 @@
return cur;
}
case OP_WB:
- if(str == exp->_bol && !isspace(*str)
+ if((str == exp->_bol && !isspace(*str))
|| (str == exp->_eol && !isspace(*(str-1)))
|| (!isspace(*str) && isspace(*(str+1)))
|| (isspace(*str) && !isspace(*(str+1))) ) {
Index: sdk/scripting/squirrel/sqapi.cpp
===================================================================
--- sdk/scripting/squirrel/sqapi.cpp (revision 5414)
+++ sdk/scripting/squirrel/sqapi.cpp (working copy)
@@ -761,8 +761,9 @@
if(_table(*self)->Get(key,t)) {
_table(*self)->Remove(key);
}
- if(pushval != 0)
+ if(pushval != 0) {
if(pushval) v-
download for full patch...
History
This is a patch for modifications to eliminate most of the warnings when compiling with gcc 4.3.
Two warning remain because I was unsure of the intent of the code. The indentions were not consistent with standard c++ 'if ... else' logic, so I left them unchanged hoping that someone would check them out. The remaining two warnings are:
C:\CB\CB_SVN_Mods\src\sdk\wxscintilla\src\scintilla\src\LexAU3.cxx:256: warning: suggest explicit braces to avoid ambiguous 'else'
C:\CB\CB_SVN_Mods\src\sdk\wxscintilla\src\scintilla\src\RESearch.cxx:452: warning: suggest explicit braces to avoid ambiguous 'else'
Made simplification in http://forums.codeblocks.org/index.php/topic,9949.msg69295.html#msg69295
at three places in tinyxmlparser.cpp
I guess this is obsoleted?