Developer forums (C::B DEVELOPMENT STRICTLY!) > Development
unused varibles in manager.cpp - wxAUI
Michael:
Hello,
I have remarked when compiling the wxAUI project that some variables in the manager.cpp are unused:
--- Quote ----------------- Build: wxAUI in Code::Blocks (wx2.6) ---------------
mingw32-g++.exe -Wall -g -pipe -mthreads -fmessage-length=0 -fexceptions -Winvalid-pch -DHAVE_W32API_H -D__WXMSW__ -DWXUSINGDLL -DcbDEBUG -DTIXML_USE_STL -DCB_PRECOMP -DWX_PRECOMP -DwxUSE_UNICODE -D__GNUWIN32__ -DWIN32 -DWXUSINGDLL -IC:\Programme\DANAE\CodeBlocks\CodeBlocks\wx\include -IC:\Programme\DANAE\CodeBlocks\CodeBlocks\wx\lib\gcc_dll\mswu -IC:\Programme\DANAE\CodeBlocks\CodeBlocks\wx\lib\gcc_dll\mswu -IC:\Programme\DANAE\CodeBlocks\CodeBlocks\wx\contrib\include -Isdk\wxscintilla\include -Isdk\propgrid\include -Isrc\wxAUI -IC:\Programme\Resource\C++\CB_10jan2006_rev1707_win32\include -c src\wxAUI\manager.cpp -o .objs\2.6\src\wxAUI\manager.o
src\wxAUI\manager.cpp: In member function `void wxFrameManager::LayoutAddDock(wxSizer*, wxDockInfo&, wxDockUIPartArray&, bool)':
src\wxAUI\manager.cpp:1784: warning: unused variable 'space_left'
src\wxAUI\manager.cpp: In member function `wxSizer* wxFrameManager::LayoutAll(wxPaneInfoArray&, wxDockInfoArray&, wxDockUIPartArray&, bool)':
src\wxAUI\manager.cpp:2146: warning: unused variable 'top'
src\wxAUI\manager.cpp:2148: warning: unused variable 'bottom'
src\wxAUI\manager.cpp: In member function `void wxFrameManager::OnFloatingPaneActivated(wxWindow*)':
src\wxAUI\manager.cpp:3314: warning: unused variable 'pane'
src\wxAUI\manager.cpp: In member function `void wxFrameManager::Render(wxDC*)':
src\wxAUI\manager.cpp:3338: warning: unused variable 'pane_state'
ar.exe -r src\wxAUI\libwxaui.a .objs\2.6\src\wxAUI\manager.o
ranlib src\wxAUI\libwxaui.a
--- End quote ---
Are these variables kept for a further use/re-use or could be deleted without consequences?
Michael
killerbot:
I think they can all go, they drive me crazy. I don't like warnings. I think one is the result of an assignement from a function call.
Dunno if that function call can also go, maybe it alters some state and is needed, bu then don't assign it's return value, or check it to do something usefull with it.
devs .......
Cheers,
Lieven
280Z28:
http://www.kirix.com/en/community/forums/viewtopic.php?t=39
:)
Obviously I wouldn't expect you to have seen this, I'm just saying it's been taken care of at the source and we shouldn't run into that again. :)
killerbot:
but the the devs need to update ;-)
Michael:
Hmm. Strange. The patch just lists 4 variables, but I also get the variable pane as unused:
--- Quote ---src\wxAUI\manager.cpp: In member function `void wxFrameManager::OnFloatingPaneActivated(wxWindow*)':
src\wxAUI\manager.cpp:3314: warning: unused variable 'pane'
--- End quote ---
Anyway, I am not sure that it is unused:
--- Code: ---void wxFrameManager::OnFloatingPaneActivated(wxWindow* wnd)
{
if (GetFlags() & wxAUI_MGR_ALLOW_ACTIVE_PANE)
{
// try to find the pane
wxPaneInfo& pane = GetPane(wnd);
wxASSERT_MSG(pane.IsOk(), wxT("Pane window not found"));
SetActivePane(m_panes, wnd);
Repaint();
}
}
--- End code ---
Michael
Navigation
[0] Message Index
[#] Next page
Go to full version