I tested building Code::Blocks with Clang, and this was required to get it to compile:
Index: src/plugins/contrib/lib_finder/librariesdlg.cpp
===================================================================
--- src/plugins/contrib/lib_finder/librariesdlg.cpp (revision 8648)
+++ src/plugins/contrib/lib_finder/librariesdlg.cpp (working copy)
@@ -90,10 +90,11 @@
LibrariesDlg::LibrariesDlg(wxWindow* parent, TypedResults& knownLibraries)
: m_KnownLibraries(knownLibraries)
- , m_WorkingCopy(knownLibraries)
, m_SelectedConfig(0)
, m_WhileUpdating(false)
{
+ for (int i = 0; i < rtCount; ++i)
+ m_WorkingCopy[i] = knownLibraries[i];
//(*Initialize(LibrariesDlg)
wxBoxSizer* BoxSizer4;
wxStaticBoxSizer* StaticBoxSizer2;
Index: src/plugins/contrib/profiler/cbprofiler.cpp
===================================================================
--- src/plugins/contrib/profiler/cbprofiler.cpp (revision 8648)
+++ src/plugins/contrib/profiler/cbprofiler.cpp (working copy)
@@ -101,18 +101,18 @@
if (project->GetBuildTargetsCount() > 1)
{
// more than one executable target? ask...
- wxString choices[project->GetBuildTargetsCount()];
+ wxArrayString choices;
wxString active_target = project->GetActiveBuildTarget();
int selected = 0;
for (int i=0; i<project->GetBuildTargetsCount(); ++i)
{
- choices[i] = project->GetBuildTarget(i)->GetTitle();
+ choices.Add(project->GetBuildTarget(i)->GetTitle());
if (choices[i] == active_target)
selected = i;
}
wxSingleChoiceDialog dialog(Manager::Get()->GetAppWindow(),
_("Select the target you want to profile"),
- _("Select Target"),project->GetBuildTargetsCount(),choices);
+ _("Select Target"), choices);
dialog.SetSelection(selected);
if (dialog.ShowModal() != wxID_OK)
return -1;
Index: src/sdk/wxscintilla/src/PlatWX.cpp
===================================================================
--- src/sdk/wxscintilla/src/PlatWX.cpp (revision 8648)
+++ src/sdk/wxscintilla/src/PlatWX.cpp (working copy)
@@ -301,10 +301,11 @@
/* C::B begin */
// Since Point now has float as x and y, it seems no longer to be interchangeable with wxPoint,
// and the polygon is not drawn, so we convert it explicitely
- wxPoint points[npts];
+ wxPoint* points = new wxPoint[npts];
for (int i = 0; i < npts; ++i)
points[i] = wxPoint(pts[i].x, pts[i].y);
hDC->DrawPolygon(npts, points);
+ delete [] points;
/* C::B end */
}
Index: src/plugins/contrib/dragscroll/dragscrollcfg.cpp
===================================================================
--- src/plugins/contrib/dragscroll/dragscrollcfg.cpp (revision 8648)
+++ src/plugins/contrib/dragscroll/dragscrollcfg.cpp (working copy)
@@ -93,15 +93,13 @@
Sensitivity = new wxSlider( this, wxID_ANY, 8, 1, 10, wxDefaultPosition, wxDefaultSize, wxSL_AUTOTICKS|wxSL_HORIZONTAL|wxSL_LABELS|wxSL_TOP );
#if wxCHECK_VERSION(2,9,0)
- if ( 1 ) Sensitivity->SetTickFreq(1);
+ Sensitivity->SetTickFreq(1);
#else
- if ( 1 ) Sensitivity->SetTickFreq(1,0);
+ Sensitivity->SetTickFreq(1,0);
#endif
- if ( 1 ) Sensitivity->SetPageSize(1);
- if ( 0 ) Sensitivity->SetLineSize(0);
- if ( 0 ) Sensitivity->SetThumbLength(0);
- if ( 1 ) Sensitivity->SetTick(1);
- if ( 1 ) Sensitivity->SetSelection(1,10);
+ Sensitivity->SetPageSize(1);
+ Sensitivity->SetTick(1);
+ Sensitivity->SetSelection(1,10);
bSizer7->Add( Sensitivity, 0, wxALIGN_CENTER_HORIZONTAL|wxALL|wxEXPAND, 5 );
bSizer7->Add( 0, 0, 1, wxEXPAND, 0 );
@@ -111,15 +109,13 @@
MouseToLineRatio = new wxSlider( this, wxID_ANY, 30, 10, 100, wxDefaultPosition, wxDefaultSize, wxSL_AUTOTICKS|wxSL_HORIZONTAL|wxSL_LABELS|wxSL_TOP );
#if wxCHECK_VERSION(2,9,0)
- if ( 1 ) MouseToLineRatio->SetTickFreq(10);
+ MouseToLineRatio->SetTickFreq(10);
#else
- if ( 1 ) MouseToLineRatio->SetTickFreq(10,10);
+ MouseToLineRatio->SetTickFreq(10,10);
#endif
- if ( 1 ) MouseToLineRatio->SetPageSize(10);
- if ( 0 ) MouseToLineRatio->SetLineSize(0);
- if ( 0 ) MouseToLineRatio->SetThumbLength(0);
- if ( 1 ) MouseToLineRatio->SetTick(10);
- if ( 1 ) MouseToLineRatio->SetSelection(10,100);
+ MouseToLineRatio->SetPageSize(10);
+ MouseToLineRatio->SetTick(10);
+ MouseToLineRatio->SetSelection(10,100);
bSizer7->Add( MouseToLineRatio, 0, wxALIGN_CENTER_HORIZONTAL|wxALL|wxEXPAND, 5 );
bSizer7->Add( 0, 0, 1, wxEXPAND, 0 );
@@ -130,15 +126,15 @@
MouseContextDelay = new wxSlider( this, wxID_ANY, 50, 10, 500, wxDefaultPosition, wxDefaultSize, wxSL_AUTOTICKS|wxSL_HORIZONTAL|wxSL_LABELS|wxSL_TOP );
// Above values are: default mil delay, min, max
#if wxCHECK_VERSION(2,9,0)
- if ( 1 ) MouseContextDelay->SetTickFreq(10);
+ MouseContextDelay->SetTickFreq(10);
#else
- if ( 1 ) MouseContextDelay->SetTickFreq(10,10);
+ MouseContextDelay->SetTickFreq(10,10);
#endif
- if ( 1 ) MouseContextDelay->SetPageSize(10);
- if ( 1 ) MouseContextDelay->SetLineSize(10);
- if ( 1 ) MouseContextDelay->SetThumbLength(10);
- if ( 1 ) MouseContextDelay->SetTick(100);
- if ( 1 ) MouseContextDelay->SetSelection(10,500);
+ MouseContextDelay->SetPageSize(10);
+ MouseContextDelay->SetLineSize(10);
+ MouseContextDelay->SetThumbLength(10);
+ MouseContextDelay->SetTick(100);
+ MouseContextDelay->SetSelection(10,500);
bSizer7->Add( MouseContextDelay, 0, wxALIGN_CENTER_HORIZONTAL|wxALL|wxEXPAND, 5 );
bSizer7->Add( 0, 0, 1, wxEXPAND, 0 );
Index: src/plugins/contrib/codesnippets/FileImport.h
===================================================================
--- src/plugins/contrib/codesnippets/FileImport.h (revision 8648)
+++ src/plugins/contrib/codesnippets/FileImport.h (working copy)
@@ -43,7 +43,7 @@
// ::wxCopyFile (filename, (destDir + dirname - rootSrcDir))
//wxPrintf(_T("OnFile[%s] to [%s]\n"), filename.c_str(), ConvertToDestinationPath(filename).c_str());
int rc = ::wxCopyFile (filename, ConvertToDestinationPath (filename));
- if (not rc) ; //wxPrintf(_T("Copy failed for[%s]"), filename.c_str());
+ // if (not rc) wxPrintf(_T("Copy failed for[%s]"), filename.c_str());
return wxDIR_CONTINUE;
}
Index: src/plugins/contrib/ToolsPlus/se_globals.cpp
===================================================================
--- src/plugins/contrib/ToolsPlus/se_globals.cpp (revision 8648)
+++ src/plugins/contrib/ToolsPlus/se_globals.cpp (working copy)
@@ -1,15 +1,15 @@
#include "se_globals.h"
-wxString GetParentDir(const wxString &path)
+/*wxString GetParentDir(const wxString& path)
{
- wxString parent=wxFileName(parent).GetPath(0);
+ wxString parent=wxFileName(path).GetPath(0);
if(path==parent||parent.IsEmpty())
return wxEmptyString;
else
return parent;
}
-bool DirIsChildOf(const wxString &path, const wxString &/*child*/)
+bool DirIsChildOf(const wxString& path, const wxString& child)
{
wxString parent=path;
while(!parent.IsEmpty())
@@ -19,7 +19,7 @@
parent=GetParentDir(parent);
}
return false;
-}
+}*/
bool WildCardListMatch(wxString list, wxString name, bool strip)
{
Index: src/plugins/contrib/ToolsPlus/se_globals.h
===================================================================
--- src/plugins/contrib/ToolsPlus/se_globals.h (revision 8648)
+++ src/plugins/contrib/ToolsPlus/se_globals.h (working copy)
@@ -10,7 +10,7 @@
#include <sdk.h>
#ifndef CB_PRECOMP
#include <wx/filename.h>
-
+
#include <editorbase.h>
#include <editormanager.h>
#include <logmanager.h>
@@ -20,9 +20,9 @@
#include <cbproject.h>
#endif
-wxString GetParentDir(const wxString &path);
+//wxString GetParentDir(const wxString &path);
-bool DirIsChildOf(const wxString &path, const wxString &child);
+//bool DirIsChildOf(const wxString &path, const wxString &child);
bool WildCardListMatch(wxString list, wxString name, bool strip=true);
Index: src/plugins/contrib/keybinder/menuutils.cpp
===================================================================
--- src/plugins/contrib/keybinder/menuutils.cpp (revision 8648)
+++ src/plugins/contrib/keybinder/menuutils.cpp (working copy)
@@ -71,7 +71,7 @@
return id;
}
-namespace
+/*namespace
{
// ----------------------------------------------------------------------------
int FindMenuDuplicateCount(wxMenuBar *p, wxString &str)
@@ -90,7 +90,7 @@
return count;
}
-}
+}*/
// ----------------------------------------------------------------------------
int FindMenuDuplicateItems(wxMenu* pMenu, wxString& rStr, int& rCount)
// ----------------------------------------------------------------------------
Index: src/plugins/contrib/keybinder/menuutils.h
===================================================================
--- src/plugins/contrib/keybinder/menuutils.h (revision 8648)
+++ src/plugins/contrib/keybinder/menuutils.h (working copy)
@@ -30,7 +30,7 @@
//int /*-lf-WXDLLIMPEXP_KEYBINDER*/ wxFindMenuItem(wxMenuBar *, const wxString &strMenuItemName);
int wxFindMenuItem(wxMenuBar *, const wxString &strMenuItemName);
-int FindMenuDuplicateCount(wxMenuBar *p, const wxString &str);
+//int FindMenuDuplicateCount(wxMenuBar *p, const wxString &str);
int FindMenuDuplicateItems(wxMenu* pMenu, wxString& rStr, int& rCount);
wxString GetFullMenuPath(int);
Index: src/plugins/contrib/keybinder/keybinder.cpp
===================================================================
--- src/plugins/contrib/keybinder/keybinder.cpp (revision 8648)
+++ src/plugins/contrib/keybinder/keybinder.cpp (working copy)
@@ -2578,7 +2578,7 @@
// This routine is screwing up unix, and its never called on MSW
// so.. forget it //(pecan 2006/9/23)
return ;
-
+/*
wxString oldname = m_kBinder.GetName();
// on unix, this routine is being entered with oldname == ""
// We're not going to save the blank temp profile anyway
@@ -2594,7 +2594,7 @@
// change the name of the current profile
m_kBinder.SetName(newname);
-
+*/
#if 0
// and the string of the combobox...
int n = m_pKeyProfiles->FindString(oldname);
Index: src/plugins/contrib/HexEditor/FileContentDisk.cpp
===================================================================
--- src/plugins/contrib/HexEditor/FileContentDisk.cpp (revision 8648)
+++ src/plugins/contrib/HexEditor/FileContentDisk.cpp (working copy)
@@ -561,9 +561,9 @@
// (I mean to call this: std::lower_bound( .. , offset, cmp() )
struct cmp
{
- static inline bool f( OffsetT offset, const DataBlock* block1 )
+ static inline bool f( OffsetT offset_, const DataBlock* block1 )
{
- return block1->start > offset;
+ return block1->start > offset_;
}
};
Index: src/plugins/contrib/FileManager/se_globals.cpp
===================================================================
--- src/plugins/contrib/FileManager/se_globals.cpp (revision 8648)
+++ src/plugins/contrib/FileManager/se_globals.cpp (working copy)
@@ -1,15 +1,15 @@
#include "se_globals.h"
-wxString GetParentDir(const wxString &path)
+/*wxString GetParentDir(const wxString& path)
{
- wxString parent=wxFileName(parent).GetPath(0);
+ wxString parent=wxFileName(path).GetPath(0);
if(path==parent||parent.IsEmpty())
return wxEmptyString;
else
return parent;
}
-bool DirIsChildOf(const wxString &path, const wxString &/*child*/)
+bool DirIsChildOf(const wxString& path, const wxString& child)
{
wxString parent=path;
while(!parent.IsEmpty())
@@ -19,7 +19,7 @@
parent=GetParentDir(parent);
}
return false;
-}
+}*/
bool WildCardListMatch(wxString list, wxString name, bool strip)
{
Index: src/plugins/contrib/FileManager/se_globals.h
===================================================================
--- src/plugins/contrib/FileManager/se_globals.h (revision 8648)
+++ src/plugins/contrib/FileManager/se_globals.h (working copy)
@@ -19,9 +19,9 @@
#include <manager.h>
#endif
-wxString GetParentDir(const wxString &path);
+//wxString GetParentDir(const wxString &path);
-bool DirIsChildOf(const wxString &path, const wxString &child);
+//bool DirIsChildOf(const wxString &path, const wxString &child);
bool WildCardListMatch(wxString list, wxString name, bool strip=false);
This was also warned about, but I do not quite understand the purpose of the function, so I may not have correctly fixed it: