various warning fixes for icc 9.1 compilation
- variable shadowing - unused code and variables - extra semicolons git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48864 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -379,22 +379,15 @@ int wxIFFDecoder::ReadIFF()
|
||||
// main decoding loop. searches IFF chunks and handles them.
|
||||
// terminates when BODY chunk was found or dataptr ran over end of file
|
||||
//
|
||||
bool BMHDok = false, CMAPok = false, CAMGok = false;
|
||||
bool BMHDok = false, CAMGok = false;
|
||||
int bmhd_width = 0, bmhd_height = 0, bmhd_bitplanes = 0, bmhd_transcol = -1;
|
||||
byte bmhd_masking = 0, bmhd_compression = 0;
|
||||
byte bmhd_compression = 0;
|
||||
long camg_viewmode = 0;
|
||||
int colors = 0;
|
||||
while (dataptr + 8 <= dataend) {
|
||||
// get chunk length and make even
|
||||
size_t chunkLen = (iff_getlong(dataptr + 4) + 1) & 0xfffffffe;
|
||||
#ifdef __VMS
|
||||
// Silence compiler warning
|
||||
int chunkLen_;
|
||||
chunkLen_ = chunkLen;
|
||||
if (chunkLen_ < 0) { // format error?
|
||||
#else
|
||||
if (chunkLen < 0) { // format error?
|
||||
#endif
|
||||
long chunkLen = (iff_getlong(dataptr + 4) + 1) & 0xfffffffe;
|
||||
if (chunkLen < 0) { // format error?
|
||||
break;
|
||||
}
|
||||
bool truncated = (dataptr + 8 + chunkLen > dataend);
|
||||
@@ -406,7 +399,7 @@ int wxIFFDecoder::ReadIFF()
|
||||
bmhd_width = iff_getword(dataptr + 8); // width of picture
|
||||
bmhd_height= iff_getword(dataptr + 8 + 2); // height of picture
|
||||
bmhd_bitplanes = *(dataptr + 8 + 8); // # of bitplanes
|
||||
bmhd_masking = *(dataptr + 8 + 9);
|
||||
// bmhd_masking = *(dataptr + 8 + 9); -- unused currently
|
||||
bmhd_compression = *(dataptr + 8 + 10); // get compression
|
||||
bmhd_transcol = iff_getword(dataptr + 8 + 12);
|
||||
BMHDok = true; // got BMHD
|
||||
@@ -440,7 +433,6 @@ int wxIFFDecoder::ReadIFF()
|
||||
wxLogTrace(_T("iff"), _T("Read %d colors from IFF file."),
|
||||
colors);
|
||||
|
||||
CMAPok = true; // got CMAP
|
||||
dataptr += 8 + chunkLen; // to next chunk
|
||||
} else if (strncmp((char *)dataptr, "CAMG", 4) == 0) { // CAMG ?
|
||||
if (chunkLen < 4 || truncated) {
|
||||
|
@@ -1376,8 +1376,8 @@ wxFlexGridSizer::~wxFlexGridSizer()
|
||||
|
||||
void wxFlexGridSizer::RecalcSizes()
|
||||
{
|
||||
int nitems, nrows, ncols;
|
||||
if ( (nitems = CalcRowsCols(nrows, ncols)) == 0 )
|
||||
int nrows, ncols;
|
||||
if ( !CalcRowsCols(nrows, ncols) )
|
||||
return;
|
||||
|
||||
const wxPoint pt(GetPosition());
|
||||
|
@@ -184,11 +184,11 @@ void wxGenericCollapsiblePane::OnStateChange(const wxSize& sz)
|
||||
if (top->GetSizer())
|
||||
{
|
||||
// we have just set the size hints...
|
||||
wxSize sz = top->GetSizer()->CalcMin();
|
||||
wxSize szClient = top->GetSizer()->CalcMin();
|
||||
|
||||
// use SetClientSize() and not SetSize() otherwise the size for
|
||||
// e.g. a wxFrame with a menubar wouldn't be correctly set
|
||||
top->SetClientSize(sz);
|
||||
top->SetClientSize(szClient);
|
||||
}
|
||||
else
|
||||
top->Layout();
|
||||
|
@@ -393,9 +393,6 @@ void wxFileData::MakeItem( wxListItem &item )
|
||||
// wxFileListCtrl
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
// FIXME: what is this for? It's never read
|
||||
static bool ignoreChanges = false;
|
||||
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxFileListCtrl,wxListCtrl)
|
||||
|
||||
BEGIN_EVENT_TABLE(wxFileListCtrl,wxListCtrl)
|
||||
@@ -722,10 +719,8 @@ void wxFileListCtrl::GoToParentDir()
|
||||
long id = FindItem( 0, fname );
|
||||
if (id != wxNOT_FOUND)
|
||||
{
|
||||
ignoreChanges = true;
|
||||
SetItemState( id, wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED );
|
||||
EnsureVisible( id );
|
||||
ignoreChanges = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -743,9 +738,7 @@ void wxFileListCtrl::GoToDir( const wxString &dir )
|
||||
m_dirName = dir;
|
||||
UpdateFiles();
|
||||
|
||||
ignoreChanges = true;
|
||||
SetItemState( 0, wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED );
|
||||
ignoreChanges = false;
|
||||
|
||||
EnsureVisible( 0 );
|
||||
}
|
||||
@@ -818,9 +811,7 @@ void wxFileListCtrl::OnListEndLabelEdit( wxListEvent &event )
|
||||
{
|
||||
fd->SetNewName( new_name, event.GetLabel() );
|
||||
|
||||
ignoreChanges = true;
|
||||
SetItemState( event.GetItem(), wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED );
|
||||
ignoreChanges = false;
|
||||
|
||||
UpdateItem( event.GetItem() );
|
||||
EnsureVisible( event.GetItem() );
|
||||
|
@@ -1188,18 +1188,18 @@ void wxScrollHelper::HandleOnChar(wxKeyEvent& event)
|
||||
|
||||
if ( m_xScrollPosition != xScrollOld )
|
||||
{
|
||||
wxScrollWinEvent event(wxEVT_SCROLLWIN_THUMBTRACK, m_xScrollPosition,
|
||||
wxScrollWinEvent evt(wxEVT_SCROLLWIN_THUMBTRACK, m_xScrollPosition,
|
||||
wxHORIZONTAL);
|
||||
event.SetEventObject(m_win);
|
||||
m_win->GetEventHandler()->ProcessEvent(event);
|
||||
evt.SetEventObject(m_win);
|
||||
m_win->GetEventHandler()->ProcessEvent(evt);
|
||||
}
|
||||
|
||||
if ( m_yScrollPosition != yScrollOld )
|
||||
{
|
||||
wxScrollWinEvent event(wxEVT_SCROLLWIN_THUMBTRACK, m_yScrollPosition,
|
||||
wxScrollWinEvent evt(wxEVT_SCROLLWIN_THUMBTRACK, m_yScrollPosition,
|
||||
wxVERTICAL);
|
||||
event.SetEventObject(m_win);
|
||||
m_win->GetEventHandler()->ProcessEvent(event);
|
||||
evt.SetEventObject(m_win);
|
||||
m_win->GetEventHandler()->ProcessEvent(evt);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -342,8 +342,6 @@ bool wxSearchCtrl::Create(wxWindow *parent, wxWindowID id,
|
||||
m_text = new wxSearchTextCtrl(this, value, style & ~wxBORDER_MASK);
|
||||
m_text->SetDescriptiveText(_("Search"));
|
||||
|
||||
wxSize sizeText = m_text->GetBestSize();
|
||||
|
||||
m_searchButton = new wxSearchButton(this,
|
||||
wxEVT_COMMAND_SEARCHCTRL_SEARCH_BTN,
|
||||
m_searchBitmap);
|
||||
|
@@ -96,7 +96,7 @@ static void gtk_collapsiblepane_expanded_callback (GObject *object,
|
||||
// fire an event
|
||||
wxCollapsiblePaneEvent ev(p, p->GetId(), p->IsCollapsed());
|
||||
p->GetEventHandler()->ProcessEvent(ev);
|
||||
|
||||
|
||||
// the user asked to explicitely handle the resizing itself...
|
||||
return;
|
||||
}
|
||||
@@ -106,7 +106,7 @@ static void gtk_collapsiblepane_expanded_callback (GObject *object,
|
||||
if ( top && top->GetSizer() )
|
||||
{
|
||||
// 2) recalculate minimal size of the top window
|
||||
wxSize sz = top->GetSizer()->CalcMin();
|
||||
sz = top->GetSizer()->CalcMin();
|
||||
|
||||
if (top->m_mainWidget)
|
||||
{
|
||||
|
@@ -775,8 +775,6 @@ unsigned int wxComboBox::GetCount() const
|
||||
}
|
||||
return count;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void wxComboBox::SetSelection( int n )
|
||||
|
@@ -194,7 +194,7 @@ int wxGtkFileChooser::GetFilterIndex() const
|
||||
}
|
||||
else
|
||||
return index;
|
||||
};
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// end wxGtkFileChooser Implementation
|
||||
|
@@ -1031,10 +1031,10 @@ void wxGnomePrintDC::DoDrawArc(wxCoord x1,wxCoord y1,wxCoord x2,wxCoord y2,wxCoo
|
||||
alpha1 = 0.0;
|
||||
alpha2 = 360.0;
|
||||
}
|
||||
else
|
||||
if (radius == 0.0)
|
||||
else if ( wxIsNullDouble(radius) )
|
||||
{
|
||||
alpha1 = alpha2 = 0.0;
|
||||
alpha1 =
|
||||
alpha2 = 0.0;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1161,8 +1161,8 @@ void wxGnomePrintDC::DoDrawPolygon(int n, wxPoint points[], wxCoord xoffset, wxC
|
||||
int i;
|
||||
for (i = 1; i < n; i++)
|
||||
{
|
||||
int x = points[i].x + xoffset;
|
||||
int y = points[i].y + yoffset;
|
||||
x = points[i].x + xoffset;
|
||||
y = points[i].y + yoffset;
|
||||
gs_libGnomePrint->gnome_print_lineto( m_gpc, XLOG2DEV(x), YLOG2DEV(y) );
|
||||
CalcBoundingBox( x, y );
|
||||
}
|
||||
@@ -1181,8 +1181,8 @@ void wxGnomePrintDC::DoDrawPolygon(int n, wxPoint points[], wxCoord xoffset, wxC
|
||||
int i;
|
||||
for (i = 1; i < n; i++)
|
||||
{
|
||||
int x = points[i].x + xoffset;
|
||||
int y = points[i].y + yoffset;
|
||||
x = points[i].x + xoffset;
|
||||
y = points[i].y + yoffset;
|
||||
gs_libGnomePrint->gnome_print_lineto( m_gpc, XLOG2DEV(x), YLOG2DEV(y) );
|
||||
CalcBoundingBox( x, y );
|
||||
}
|
||||
|
@@ -33,14 +33,19 @@ gtk_value_changed(GtkRange* range, wxScrollBar* win)
|
||||
{
|
||||
const int orient = win->HasFlag(wxSB_VERTICAL) ? wxVERTICAL : wxHORIZONTAL;
|
||||
const int value = win->GetThumbPosition();
|
||||
wxScrollEvent event(eventType, win->GetId(), value, orient);
|
||||
event.SetEventObject(win);
|
||||
win->GetEventHandler()->ProcessEvent(event);
|
||||
const int id = win->GetId();
|
||||
|
||||
// first send the specific event for the user action
|
||||
wxScrollEvent evtSpec(eventType, id, value, orient);
|
||||
evtSpec.SetEventObject(win);
|
||||
win->GetEventHandler()->ProcessEvent(evtSpec);
|
||||
|
||||
if (!win->m_isScrolling)
|
||||
{
|
||||
wxScrollEvent event(wxEVT_SCROLL_CHANGED, win->GetId(), value, orient);
|
||||
event.SetEventObject(win);
|
||||
win->GetEventHandler()->ProcessEvent(event);
|
||||
// and if it's over also send a general "changed" event
|
||||
wxScrollEvent evtChanged(wxEVT_SCROLL_CHANGED, id, value, orient);
|
||||
evtChanged.SetEventObject(win);
|
||||
win->GetEventHandler()->ProcessEvent(evtChanged);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -73,14 +78,15 @@ gtk_event_after(GtkRange* range, GdkEvent* event, wxScrollBar* win)
|
||||
|
||||
const int value = win->GetThumbPosition();
|
||||
const int orient = win->HasFlag(wxSB_VERTICAL) ? wxVERTICAL : wxHORIZONTAL;
|
||||
const int id = win->GetId();
|
||||
|
||||
wxScrollEvent event(wxEVT_SCROLL_THUMBRELEASE, win->GetId(), value, orient);
|
||||
event.SetEventObject(win);
|
||||
win->GetEventHandler()->ProcessEvent(event);
|
||||
wxScrollEvent evtRel(wxEVT_SCROLL_THUMBRELEASE, id, value, orient);
|
||||
evtRel.SetEventObject(win);
|
||||
win->GetEventHandler()->ProcessEvent(evtRel);
|
||||
|
||||
wxScrollEvent event2(wxEVT_SCROLL_CHANGED, win->GetId(), value, orient);
|
||||
event2.SetEventObject(win);
|
||||
win->GetEventHandler()->ProcessEvent(event2);
|
||||
wxScrollEvent evtChanged(wxEVT_SCROLL_CHANGED, id, value, orient);
|
||||
evtChanged.SetEventObject(win);
|
||||
win->GetEventHandler()->ProcessEvent(evtChanged);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -527,8 +527,8 @@ bool wxToolBar::DoInsertTool(size_t pos, wxToolBarToolBase *toolBase)
|
||||
|
||||
// if we have a dropdown menu, we use 2 GTK tools internally
|
||||
wxToolBarToolsList::compatibility_iterator node = m_tools.Item( i );
|
||||
wxToolBarTool *tool = (wxToolBarTool*) node->GetData();
|
||||
if ( tool->IsButton() && (tool->GetKind() == wxITEM_DROPDOWN) )
|
||||
wxToolBarTool * const tool2 = (wxToolBarTool*) node->GetData();
|
||||
if ( tool2->IsButton() && tool2->GetKind() == wxITEM_DROPDOWN )
|
||||
posGtk++;
|
||||
}
|
||||
}
|
||||
|
@@ -251,10 +251,10 @@ static void wxGtkTextApplyTagsFromAttr(GtkWidget *text,
|
||||
for (size_t i = 0; i < tabs.GetCount(); i++)
|
||||
tagname += wxString::Format(_T(" %d"), tabs[i]);
|
||||
|
||||
const wxWX2MBbuf buf = tagname.mb_str(wxConvUTF8);
|
||||
const wxWX2MBbuf buftag = tagname.utf8_str();
|
||||
|
||||
tag = gtk_text_tag_table_lookup( gtk_text_buffer_get_tag_table( text_buffer ),
|
||||
buf );
|
||||
buftag );
|
||||
if (!tag)
|
||||
{
|
||||
// Factor to convert from 1/10th of a mm into pixels
|
||||
@@ -270,7 +270,7 @@ static void wxGtkTextApplyTagsFromAttr(GtkWidget *text,
|
||||
PangoTabArray* tabArray = pango_tab_array_new(tabs.GetCount(), TRUE);
|
||||
for (size_t i = 0; i < tabs.GetCount(); i++)
|
||||
pango_tab_array_set_tab(tabArray, i, PANGO_TAB_LEFT, (gint)(tabs[i] * factor));
|
||||
tag = gtk_text_buffer_create_tag( text_buffer, buf,
|
||||
tag = gtk_text_buffer_create_tag( text_buffer, buftag,
|
||||
"tabs", tabArray, NULL );
|
||||
pango_tab_array_free(tabArray);
|
||||
}
|
||||
@@ -951,7 +951,6 @@ wxString wxTextCtrl::GetValue() const
|
||||
{
|
||||
wxCHECK_MSG( m_text != NULL, wxEmptyString, wxT("invalid text ctrl") );
|
||||
|
||||
wxString tmp;
|
||||
if ( IsMultiLine() )
|
||||
{
|
||||
GtkTextIter start;
|
||||
@@ -967,8 +966,6 @@ wxString wxTextCtrl::GetValue() const
|
||||
const gchar *text = gtk_entry_get_text( GTK_ENTRY(m_text) );
|
||||
return wxGTK_CONV_BACK(text);
|
||||
}
|
||||
|
||||
return tmp;
|
||||
}
|
||||
|
||||
wxFontEncoding wxTextCtrl::GetTextEncoding() const
|
||||
|
@@ -2002,9 +2002,10 @@ gtk_scrollbar_event_after(GtkRange* range, GdkEvent* event, wxWindow* win)
|
||||
|
||||
const int orient = wxWindow::OrientFromScrollDir(
|
||||
win->ScrollDirFromRange(range));
|
||||
wxScrollWinEvent event(wxEVT_SCROLLWIN_THUMBRELEASE, win->GetScrollPos(orient), orient);
|
||||
event.SetEventObject(win);
|
||||
win->GTKProcessEvent(event);
|
||||
wxScrollWinEvent evt(wxEVT_SCROLLWIN_THUMBRELEASE,
|
||||
win->GetScrollPos(orient), orient);
|
||||
evt.SetEventObject(win);
|
||||
win->GTKProcessEvent(evt);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -8,8 +8,17 @@
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "wx/app.h"
|
||||
#include "wx/log.h"
|
||||
#include "wx/wxprec.h"
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
#include "wx/app.h"
|
||||
#include "wx/log.h"
|
||||
#endif
|
||||
|
||||
#include "wx/evtloop.h"
|
||||
|
||||
#include <signal.h>
|
||||
|
Reference in New Issue
Block a user