From bd7d06f23d25df834c30d386dcf3b561c4c79a27 Mon Sep 17 00:00:00 2001 From: Robert Roebling Date: Sat, 25 Jul 1998 08:31:39 +0000 Subject: [PATCH] Removed warnings mesgs Doesn't compile due to missing bufstream git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@373 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- samples/dynamic/minimal.cpp | 4 ++-- samples/grid/test.cpp | 28 ++++++++++++------------ samples/internat/internat.cpp | 6 +++--- samples/layout/layout.cpp | 30 +++++++++++++------------- samples/memcheck/memcheck.cpp | 10 ++++----- samples/minimal/minimal.cpp | 4 ++-- src/Makefile.in | 2 +- src/common/memory.cpp | 18 +++++++++------- src/common/objstrm.cpp | 2 +- src/gdk_imlib/load.c | 40 +++++++++++++++++++---------------- src/gdk_imlib/misc.c | 4 ++-- src/gdk_imlib/rend.c | 34 ++++++++++++++--------------- src/gdk_imlib/save.c | 2 +- src/gdk_imlib/utils.c | 37 +++++++++++++++++--------------- src/generic/treectrl.cpp | 4 ++-- src/iodbc/connect.c | 12 ++++++----- src/iodbc/dlproc.c | 2 +- src/iodbc/herr.c | 2 ++ src/iodbc/info.c | 5 ++++- src/iodbc/misc.c | 7 +++--- 20 files changed, 135 insertions(+), 118 deletions(-) diff --git a/samples/dynamic/minimal.cpp b/samples/dynamic/minimal.cpp index 71359b2952..e96dbd4578 100644 --- a/samples/dynamic/minimal.cpp +++ b/samples/dynamic/minimal.cpp @@ -95,12 +95,12 @@ MyFrame::MyFrame(wxFrame *frame, char *title, int x, int y, int w, int h): wxFrame(frame, -1, title, wxPoint(x, y), wxSize(w, h)) {} -void MyFrame::OnQuit(wxCommandEvent& event) +void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event) ) { Close(TRUE); } -void MyFrame::OnAbout(wxCommandEvent& event) +void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event) ) { wxMessageDialog dialog(this, "This is a minimal sample\nA second line in the message box", "About Minimal", wxYES_NO|wxCANCEL); diff --git a/samples/grid/test.cpp b/samples/grid/test.cpp index 013983c366..1f48aeec87 100644 --- a/samples/grid/test.cpp +++ b/samples/grid/test.cpp @@ -184,13 +184,13 @@ BEGIN_EVENT_TABLE(MyFrame, wxFrame) EVT_MENU(GRID_QUIT, MyFrame::Quit) END_EVENT_TABLE() -void MyFrame::ToggleEditable(wxCommandEvent& event) +void MyFrame::ToggleEditable(wxCommandEvent& WXUNUSED(event)) { grid->SetEditable(!grid->GetEditable()); grid->Refresh(); } -void MyFrame::ToggleRowLabel(wxCommandEvent& event) +void MyFrame::ToggleRowLabel(wxCommandEvent& WXUNUSED(event)) { if (grid->GetLabelSize(wxVERTICAL) > 0) grid->SetLabelSize(wxVERTICAL, 0); @@ -199,7 +199,7 @@ void MyFrame::ToggleRowLabel(wxCommandEvent& event) grid->Refresh(); } -void MyFrame::ToggleColLabel(wxCommandEvent& event) +void MyFrame::ToggleColLabel(wxCommandEvent& WXUNUSED(event)) { if (grid->GetLabelSize(wxHORIZONTAL) > 0) grid->SetLabelSize(wxHORIZONTAL, 0); @@ -208,7 +208,7 @@ void MyFrame::ToggleColLabel(wxCommandEvent& event) grid->Refresh(); } -void MyFrame::ToggleDividers(wxCommandEvent& event) +void MyFrame::ToggleDividers(wxCommandEvent& WXUNUSED(event)) { if (!grid->GetDividerPen()) grid->SetDividerPen(wxThePenList->FindOrCreatePen("LIGHT GREY", 1, wxSOLID)); @@ -217,25 +217,25 @@ void MyFrame::ToggleDividers(wxCommandEvent& event) grid->Refresh(); } -void MyFrame::LeftCell(wxCommandEvent& event) +void MyFrame::LeftCell(wxCommandEvent& WXUNUSED(event)) { grid->SetCellAlignment(wxLEFT); grid->Refresh(); } -void MyFrame::CentreCell(wxCommandEvent& event) +void MyFrame::CentreCell(wxCommandEvent& WXUNUSED(event)) { grid->SetCellAlignment(wxCENTRE); grid->Refresh(); } -void MyFrame::RightCell(wxCommandEvent& event) +void MyFrame::RightCell(wxCommandEvent& WXUNUSED(event)) { grid->SetCellAlignment(wxRIGHT); grid->Refresh(); } -void MyFrame::ColourLabelBackground(wxCommandEvent& event) +void MyFrame::ColourLabelBackground(wxCommandEvent& WXUNUSED(event)) { wxColourData data; data.SetChooseFull(TRUE); @@ -249,7 +249,7 @@ void MyFrame::ColourLabelBackground(wxCommandEvent& event) } } -void MyFrame::ColourLabelText(wxCommandEvent& event) +void MyFrame::ColourLabelText(wxCommandEvent& WXUNUSED(event)) { wxColourData data; data.SetChooseFull(TRUE); @@ -263,14 +263,14 @@ void MyFrame::ColourLabelText(wxCommandEvent& event) } } -void MyFrame::NormalLabelColouring(wxCommandEvent& event) +void MyFrame::NormalLabelColouring(wxCommandEvent& WXUNUSED(event)) { grid->SetLabelBackgroundColour(*wxLIGHT_GREY); grid->SetLabelTextColour(*wxBLACK); grid->Refresh(); } -void MyFrame::ColourCellBackground(wxCommandEvent& event) +void MyFrame::ColourCellBackground(wxCommandEvent& WXUNUSED(event)) { wxColourData data; data.SetChooseFull(TRUE); @@ -284,7 +284,7 @@ void MyFrame::ColourCellBackground(wxCommandEvent& event) } } -void MyFrame::ColourCellText(wxCommandEvent& event) +void MyFrame::ColourCellText(wxCommandEvent& WXUNUSED(event)) { wxColourData data; data.SetChooseFull(TRUE); @@ -298,14 +298,14 @@ void MyFrame::ColourCellText(wxCommandEvent& event) } } -void MyFrame::NormalCellColouring(wxCommandEvent& event) +void MyFrame::NormalCellColouring(wxCommandEvent& WXUNUSED(event)) { grid->SetCellBackgroundColour(*wxWHITE); grid->SetCellTextColour(*wxBLACK); grid->Refresh(); } -void MyFrame::Quit(wxCommandEvent& event) +void MyFrame::Quit(wxCommandEvent& WXUNUSED(event)) { this->Close(TRUE); } diff --git a/samples/internat/internat.cpp b/samples/internat/internat.cpp index ef1bb02576..265dd57e67 100644 --- a/samples/internat/internat.cpp +++ b/samples/internat/internat.cpp @@ -133,18 +133,18 @@ MyFrame::MyFrame(wxFrame *frame, const char *title, int x, int y, int w, int h) { } -void MyFrame::OnQuit(wxCommandEvent& event) +void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event) ) { Close(TRUE); } -void MyFrame::OnAbout(wxCommandEvent& event) +void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event)) { wxMessageDialog(this, _("I18n sample\n© Vadim Zeitlin & Julian Smart"), _("About Internat"), wxOK | wxICON_INFORMATION).ShowModal(); } -void MyFrame::OnPlay(wxCommandEvent& event) +void MyFrame::OnPlay(wxCommandEvent& WXUNUSED(event)) { wxString str = wxGetTextFromUser(_("Enter your number:"), _("Try to guess my number!"), diff --git a/samples/layout/layout.cpp b/samples/layout/layout.cpp index c5318f1abd..1e660df2ac 100644 --- a/samples/layout/layout.cpp +++ b/samples/layout/layout.cpp @@ -181,7 +181,7 @@ BEGIN_EVENT_TABLE(MyFrame, wxFrame) EVT_SIZE(MyFrame::OnSize) END_EVENT_TABLE() -void MyFrame::LoadFile(wxCommandEvent& event) +void MyFrame::LoadFile(wxCommandEvent& WXUNUSED(event) ) { char *s = wxFileSelector("Load text file", NULL, NULL, NULL, "*.txt"); if (s) @@ -192,47 +192,47 @@ void MyFrame::LoadFile(wxCommandEvent& event) } } -void MyFrame::Quit(wxCommandEvent& event) +void MyFrame::Quit(wxCommandEvent& WXUNUSED(event) ) { this->Close(TRUE); } -void MyFrame::TestSizers(wxCommandEvent& event) +void MyFrame::TestSizers(wxCommandEvent& WXUNUSED(event) ) { SizerFrame *newFrame = new SizerFrame(NULL, "Sizer Test Frame", 50, 50, 500, 500); newFrame->Show(TRUE); } -void MyFrame::About(wxCommandEvent& event) +void MyFrame::About(wxCommandEvent& WXUNUSED(event) ) { (void)wxMessageBox("wxWindows GUI library layout demo\n", "About Layout Demo", wxOK|wxCENTRE); } // Size the subwindows when the frame is resized -void MyFrame::OnSize(wxSizeEvent& event) +void MyFrame::OnSize(wxSizeEvent& WXUNUSED(event) ) { Layout(); } -void MyFrame::Draw(wxDC& dc, bool draw_bitmaps) +void MyFrame::Draw(wxDC& dc, bool WXUNUSED(draw_bitmaps) ) { dc.SetPen(wxGREEN_PEN); - dc.DrawLine(0.0, 0.0, 200.0, 200.0); - dc.DrawLine(200.0, 0.0, 0.0, 200.0); + dc.DrawLine(0, 0, 200, 200); + dc.DrawLine(200, 0, 0, 200); dc.SetBrush(wxCYAN_BRUSH); dc.SetPen(wxRED_PEN); - dc.DrawRectangle(100.0, 100.0, 100.0, 50.0); - dc.DrawRoundedRectangle(150.0, 150.0, 100.0, 50.0,20.0); + dc.DrawRectangle(100, 100, 100, 50); + dc.DrawRoundedRectangle(150, 150, 100, 50, 20); - dc.DrawEllipse(250.0, 250.0, 100.0, 50.0); - dc.DrawSpline(50.0, 200.0, 50.0, 100.0, 200.0, 10.0); - dc.DrawLine(50.0, 230.0, 200.0, 230.0); + dc.DrawEllipse(250, 250, 100, 50); + dc.DrawSpline(50, 200, 50, 100, 200, 10); + dc.DrawLine(50, 230, 200, 230); dc.SetPen(wxBLACK_PEN); - dc.DrawArc(50.0, 300.0, 100.0, 250.0, 100.0, 300.0); + dc.DrawArc(50, 300, 100, 250, 100, 300 ); } BEGIN_EVENT_TABLE(MyWindow, wxWindow) @@ -250,7 +250,7 @@ MyWindow::~MyWindow(void) } // Define the repainting behaviour -void MyWindow::OnPaint(wxPaintEvent& event) +void MyWindow::OnPaint(wxPaintEvent& WXUNUSED(event) ) { wxPaintDC dc(this); frame->Draw(dc,TRUE); diff --git a/samples/memcheck/memcheck.cpp b/samples/memcheck/memcheck.cpp index 4b1be5acf3..5ccb6165a8 100644 --- a/samples/memcheck/memcheck.cpp +++ b/samples/memcheck/memcheck.cpp @@ -80,8 +80,8 @@ bool MyApp::OnInit(void) // Show the frame frame->Show(TRUE); -// wxDebugContext::SetCheckpoint(); -// wxDebugContext::SetFile("debug.log"); + wxDebugContext::SetCheckpoint(); + wxDebugContext::SetFile("debug.log"); wxString *thing = new wxString; // WXDEBUG_NEW wxString; wxDate* date = new wxDate; @@ -92,9 +92,9 @@ bool MyApp::OnInit(void) const char *data = (const char*) thing ; -// wxDebugContext::PrintClasses(); -// wxDebugContext::Dump(); -// wxDebugContext::PrintStatistics(); + wxDebugContext::PrintClasses(); + wxDebugContext::Dump(); + wxDebugContext::PrintStatistics(); // Don't delete these two objects, to force wxApp to flag a memory leak. // delete thing; diff --git a/samples/minimal/minimal.cpp b/samples/minimal/minimal.cpp index 623245f6ae..4bbae39331 100644 --- a/samples/minimal/minimal.cpp +++ b/samples/minimal/minimal.cpp @@ -100,12 +100,12 @@ MyFrame::MyFrame(wxFrame *frame, char *title, int x, int y, int w, int h): wxFrame(frame, -1, title, wxPoint(x, y), wxSize(w, h)) {} -void MyFrame::OnQuit(wxCommandEvent& event) +void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event) ) { Close(TRUE); } -void MyFrame::OnAbout(wxCommandEvent& event) +void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event) ) { wxMessageDialog dialog(this, "This is a minimal sample\nA second line in the message box", "About Minimal", wxYES_NO|wxCANCEL); diff --git a/src/Makefile.in b/src/Makefile.in index 63246d44f5..7ea8c41e02 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -57,10 +57,10 @@ LIB_CPP_SRC=\ common/timercmn.cpp \ common/utilscmn.cpp \ common/stream.cpp \ + common/datstrm.cpp \ common/fstream.cpp \ common/mstream.cpp \ common/zstream.cpp \ - common/datstrm.cpp \ common/objstrm.cpp \ \ gtk/app.cpp \ diff --git a/src/common/memory.cpp b/src/common/memory.cpp index 4e84584d70..f219387d42 100644 --- a/src/common/memory.cpp +++ b/src/common/memory.cpp @@ -387,7 +387,9 @@ int wxMemStruct::ValidateNode () ErrorMsg ("Object already deleted"); else { // Can't use the error routines as we have no recognisable object. - // wxTrace("Can't verify memory struct - all bets are off!\n"); +#ifndef __WXGTK__ + wxTrace("Can't verify memory struct - all bets are off!\n"); +#endif } return 0; } @@ -627,7 +629,7 @@ bool wxDebugContext::PrintList (void) if (!HasStream()) return FALSE; - TraverseList ((PmSFV)&wxMemStruct::PrintNode, (checkPoint ? checkPoint->m_next : NULL)); + TraverseList ((PmSFV)&wxMemStruct::PrintNode, (checkPoint ? checkPoint->m_next : (wxMemStruct*)NULL)); return TRUE; #else @@ -649,10 +651,10 @@ bool wxDebugContext::Dump(void) { appNameStr = wxTheApp->GetAppName(); appName = (char*) (const char*) appNameStr; - wxTrace("Memory dump of %s at %s:\n", appName, wxNow()); + wxTrace("Memory dump of %s at %s:\n", appName, WXSTRINGCAST wxNow() ); } } - TraverseList ((PmSFV)&wxMemStruct::Dump, (checkPoint ? checkPoint->m_next : NULL)); + TraverseList ((PmSFV)&wxMemStruct::Dump, (checkPoint ? checkPoint->m_next : (wxMemStruct*)NULL)); return TRUE; #else @@ -700,7 +702,7 @@ bool wxDebugContext::PrintStatistics(bool detailed) wxDebugStatsStruct *list = NULL; - wxMemStruct *from = (checkPoint ? checkPoint->m_next : NULL); + wxMemStruct *from = (checkPoint ? checkPoint->m_next : (wxMemStruct*)NULL ); if (!from) from = wxDebugContext::GetHead (); @@ -819,7 +821,7 @@ int wxDebugContext::Check(bool checkAll) { int nFailures = 0; - wxMemStruct *from = (checkPoint ? checkPoint->m_next : NULL); + wxMemStruct *from = (checkPoint ? checkPoint->m_next : (wxMemStruct*)NULL ); if (!from || checkAll) from = wxDebugContext::GetHead (); @@ -918,7 +920,7 @@ void operator delete[] (void * buf) #endif // TODO: store whether this is a vector or not. -void * wxDebugAlloc(size_t size, char * fileName, int lineNum, bool isObject, bool isVect) +void * wxDebugAlloc(size_t size, char * fileName, int lineNum, bool isObject, bool WXUNUSED(isVect) ) { // If not in debugging allocation mode, do the normal thing // so we don't leave any trace of ourselves in the node list. @@ -969,7 +971,7 @@ void * wxDebugAlloc(size_t size, char * fileName, int lineNum, bool isObject, bo } // TODO: check whether was allocated as a vector -void wxDebugFree(void * buf, bool isVect) +void wxDebugFree(void * buf, bool WXUNUSED(isVect) ) { if (!buf) return; diff --git a/src/common/objstrm.cpp b/src/common/objstrm.cpp index 1d2b01d01a..07210b388a 100644 --- a/src/common/objstrm.cpp +++ b/src/common/objstrm.cpp @@ -159,7 +159,7 @@ bool wxObjectInputStream::ReadObjectDef(wxObjectStreamInfo *info) sig[WXOBJ_BEG_LEN] = 0; if (wxString(sig) != WXOBJ_BEGIN) return FALSE; - info->object = wxCreateDynamicObject((char *)data_s.ReadString()); + info->object = wxCreateDynamicObject( WXSTRINGCAST data_s.ReadString()); info->object_name = data_s.ReadString(); info->n_children = data_s.Read8(); info->children = wxList(); diff --git a/src/gdk_imlib/load.c b/src/gdk_imlib/load.c index 6be12ea80a..ef5913da87 100644 --- a/src/gdk_imlib/load.c +++ b/src/gdk_imlib/load.c @@ -483,7 +483,7 @@ g_LoadXPM(char *f, int *w, int *h, int *t) FILE *file; unsigned char *data, *ptr; int pc, c, i, j, k, ncolors, cpp, comment, transp, quote, - context, len, token, done; + context, len, /*token,*/ done; char line[65536], s[65536], tok[65536], col[65536]; XColor xcol; struct _cmap @@ -495,8 +495,12 @@ g_LoadXPM(char *f, int *w, int *h, int *t) *cmap; int lookup[128][128]; + i = 0; + j = 0; + transp = 0; done = 0; + cmap = NULL; file = fopen(f, "r"); if (!file) @@ -574,7 +578,7 @@ g_LoadXPM(char *f, int *w, int *h, int *t) /* Color Table */ if (j < ncolors) { - int colptr = 0; + /* int colptr = 0; not used */ int slen; tok[0] = 0; @@ -645,10 +649,10 @@ g_LoadXPM(char *f, int *w, int *h, int *t) { if (cpp == 1) for (i = 0; i < ncolors; i++) - lookup[cmap[i].str[0]][cmap[i].str[1]] = i; + lookup[(int)cmap[i].str[0]][(int)cmap[i].str[1]] = i; if (cpp == 2) for (i = 0; i < ncolors; i++) - lookup[cmap[i].str[0]][cmap[i].str[1]] = i; + lookup[(int)cmap[i].str[0]][(int)cmap[i].str[1]] = i; context++; } } @@ -667,7 +671,7 @@ g_LoadXPM(char *f, int *w, int *h, int *t) for (i = 0; ((i < 65536) && (line[i])); i++) { col[0] = line[i]; - if (cmap[lookup[col[0]][0]].transp) + if (cmap[lookup[(int)col[0]][0]].transp) { *ptr++ = 255; *ptr++ = 0; @@ -675,9 +679,9 @@ g_LoadXPM(char *f, int *w, int *h, int *t) } else { - *ptr++ = (unsigned char)cmap[lookup[col[0]][0]].r; - *ptr++ = (unsigned char)cmap[lookup[col[0]][0]].g; - *ptr++ = (unsigned char)cmap[lookup[col[0]][0]].b; + *ptr++ = (unsigned char)cmap[lookup[(int)col[0]][0]].r; + *ptr++ = (unsigned char)cmap[lookup[(int)col[0]][0]].g; + *ptr++ = (unsigned char)cmap[lookup[(int)col[0]][0]].b; } } } @@ -686,9 +690,9 @@ g_LoadXPM(char *f, int *w, int *h, int *t) for (i = 0; ((i < 65536) && (line[i])); i++) { col[0] = line[i]; - *ptr++ = (unsigned char)cmap[lookup[col[0]][0]].r; - *ptr++ = (unsigned char)cmap[lookup[col[0]][0]].g; - *ptr++ = (unsigned char)cmap[lookup[col[0]][0]].b; + *ptr++ = (unsigned char)cmap[lookup[(int)col[0]][0]].r; + *ptr++ = (unsigned char)cmap[lookup[(int)col[0]][0]].g; + *ptr++ = (unsigned char)cmap[lookup[(int)col[0]][0]].b; } } } @@ -700,7 +704,7 @@ g_LoadXPM(char *f, int *w, int *h, int *t) { col[0] = line[i++]; col[1] = line[i]; - if (cmap[lookup[col[0]][col[1]]].transp) + if (cmap[lookup[(int)col[0]][(int)col[1]]].transp) { *ptr++ = 255; *ptr++ = 0; @@ -708,9 +712,9 @@ g_LoadXPM(char *f, int *w, int *h, int *t) } else { - *ptr++ = (unsigned char)cmap[lookup[col[0]][col[1]]].r; - *ptr++ = (unsigned char)cmap[lookup[col[0]][col[1]]].g; - *ptr++ = (unsigned char)cmap[lookup[col[0]][col[1]]].b; + *ptr++ = (unsigned char)cmap[lookup[(int)col[0]][(int)col[1]]].r; + *ptr++ = (unsigned char)cmap[lookup[(int)col[0]][(int)col[1]]].g; + *ptr++ = (unsigned char)cmap[lookup[(int)col[0]][(int)col[1]]].b; } } } @@ -720,9 +724,9 @@ g_LoadXPM(char *f, int *w, int *h, int *t) { col[0] = line[i++]; col[1] = line[i]; - *ptr++ = (unsigned char)cmap[lookup[col[0]][col[1]]].r; - *ptr++ = (unsigned char)cmap[lookup[col[0]][col[1]]].g; - *ptr++ = (unsigned char)cmap[lookup[col[0]][col[1]]].b; + *ptr++ = (unsigned char)cmap[lookup[(int)col[0]][(int)col[1]]].r; + *ptr++ = (unsigned char)cmap[lookup[(int)col[0]][(int)col[1]]].g; + *ptr++ = (unsigned char)cmap[lookup[(int)col[0]][(int)col[1]]].b; } } } diff --git a/src/gdk_imlib/misc.c b/src/gdk_imlib/misc.c index 92939bf56c..d18964373c 100644 --- a/src/gdk_imlib/misc.c +++ b/src/gdk_imlib/misc.c @@ -524,7 +524,7 @@ gdk_imlib_init_params(GdkImlibInitParams * p) XWindowAttributes xwa; XVisualInfo xvi, *xvir; char *homedir; - char file[4096]; +/* char file[4096]; */ char s[4096], *s1, *s2; FILE *f; int override = 0; @@ -533,7 +533,7 @@ gdk_imlib_init_params(GdkImlibInitParams * p) int num; int i, max, maxn; int clas; - char *palfile; + char *palfile = NULL; int loadpal; int vis; int newcm; diff --git a/src/gdk_imlib/rend.c b/src/gdk_imlib/rend.c index 5b77e1f5b1..09b277ee9c 100644 --- a/src/gdk_imlib/rend.c +++ b/src/gdk_imlib/rend.c @@ -204,7 +204,7 @@ grender_shaped_15_fast_dither_ordered(GdkImlibImage * im, int w, int h, XImage * XImage * sxim, int *er1, int *er2, int *xarray, unsigned char **yarray) { - int x, y, val, r, g, b, *ter, ex, er, eg, eb; + int x, y, val, r, g, b, /* *ter, ex,*/ er, eg, eb; unsigned char *ptr2; unsigned short *img; int jmp; @@ -262,7 +262,7 @@ grender_15_fast_dither(GdkImlibImage * im, int w, int h, XImage * xim, XImage * sxim, int *er1, int *er2, int *xarray, unsigned char **yarray) { - int x, y, val, r, g, b, *ter, ex, er, eg, eb; + int x, y, val, r, g, b, *ter, ex, er, eg, eb; unsigned char *ptr2; unsigned short *img; int jmp; @@ -308,7 +308,7 @@ grender_15_fast_dither_ordered(GdkImlibImage * im, int w, int h, XImage * xim, XImage * sxim, int *er1, int *er2, int *xarray, unsigned char **yarray) { - int x, y, val, r, g, b, *ter, ex, er, eg, eb; + int x, y, val, r, g, b, /* *ter, ex,*/ er, eg, eb; unsigned char *ptr2; unsigned short *img; @@ -414,7 +414,7 @@ grender_shaped_16_fast_dither_ordered(GdkImlibImage * im, int w, int h, XImage * XImage * sxim, int *er1, int *er2, int *xarray, unsigned char **yarray) { - int x, y, val, r, g, b, *ter, ex, er, eg, eb; + int x, y, val, r, g, b, /* *ter, ex,*/ er, eg, eb; unsigned char *ptr2; unsigned short *img; int jmp; @@ -519,7 +519,7 @@ grender_16_fast_dither_ordered(GdkImlibImage * im, int w, int h, XImage * xim, XImage * sxim, int *er1, int *er2, int *xarray, unsigned char **yarray) { - int x, y, val, r, g, b, *ter, ex, er, eg, eb; + int x, y, val, r, g, b, /* *ter, ex, */ er, eg, eb; unsigned char *ptr2; unsigned short *img; @@ -635,7 +635,7 @@ grender_shaped_15_dither_ordered(GdkImlibImage * im, int w, int h, XImage * xim, XImage * sxim, int *er1, int *er2, int *xarray, unsigned char **yarray) { - int x, y, val, r, g, b, *ter, ex, er, eg, eb; + int x, y, val, r, g, b, /* *ter, ex,*/ er, eg, eb; unsigned char *ptr2; unsigned char dither[4][4] = @@ -728,7 +728,7 @@ grender_15_dither_ordered(GdkImlibImage * im, int w, int h, XImage * xim, XImage * sxim, int *er1, int *er2, int *xarray, unsigned char **yarray) { - int x, y, val, r, g, b, *ter, ex, er, eg, eb; + int x, y, val, r, g, b, /* *ter, ex, */ er, eg, eb; unsigned char *ptr2; unsigned char dither[4][4] = @@ -822,7 +822,7 @@ grender_shaped_16_dither_ordered(GdkImlibImage * im, int w, int h, XImage * xim, XImage * sxim, int *er1, int *er2, int *xarray, unsigned char **yarray) { - int x, y, val, r, g, b, *ter, ex, er, eg, eb; + int x, y, val, r, g, b, /* *ter, ex, */ er, eg, eb; unsigned char *ptr2; unsigned char dither[4][4] = @@ -915,7 +915,7 @@ grender_16_dither_ordered(GdkImlibImage * im, int w, int h, XImage * xim, XImage * sxim, int *er1, int *er2, int *xarray, unsigned char **yarray) { - int x, y, val, r, g, b, *ter, ex, er, eg, eb; + int x, y, val, r, g, b, /* *ter, ex,*/ er, eg, eb; unsigned char *ptr2; unsigned char dither[4][4] = @@ -2816,7 +2816,7 @@ grender_shaped_15_fast_dither_mod_ordered(GdkImlibImage * im, int w, int h, XIma XImage * sxim, int *er1, int *er2, int *xarray, unsigned char **yarray) { - int x, y, val, r, g, b, *ter, ex, er, eg, eb; + int x, y, val, r, g, b, /* *ter, ex,*/ er, eg, eb; unsigned char *ptr2; unsigned short *img; int jmp; @@ -2926,7 +2926,7 @@ grender_15_fast_dither_mod_ordered(GdkImlibImage * im, int w, int h, XImage * xi XImage * sxim, int *er1, int *er2, int *xarray, unsigned char **yarray) { - int x, y, val, r, g, b, *ter, ex, er, eg, eb; + int x, y, val, r, g, b, /* *ter, ex,*/ er, eg, eb; unsigned char *ptr2; unsigned short *img; @@ -3038,7 +3038,7 @@ grender_shaped_16_fast_dither_mod_ordered(GdkImlibImage * im, int w, int h, XIma XImage * sxim, int *er1, int *er2, int *xarray, unsigned char **yarray) { - int x, y, val, r, g, b, *ter, ex, er, eg, eb; + int x, y, val, r, g, b, /* *ter, ex,*/ er, eg, eb; unsigned char *ptr2; unsigned short *img; int jmp; @@ -3149,7 +3149,7 @@ grender_16_fast_dither_mod_ordered(GdkImlibImage * im, int w, int h, XImage * xi XImage * sxim, int *er1, int *er2, int *xarray, unsigned char **yarray) { - int x, y, val, r, g, b, *ter, ex, er, eg, eb; + int x, y, val, r, g, b, /* *ter, ex,*/ er, eg, eb; unsigned char *ptr2; unsigned short *img; @@ -3200,7 +3200,7 @@ grender_shaped_15_dither_mod_ordered(GdkImlibImage * im, int w, int h, XImage * XImage * sxim, int *er1, int *er2, int *xarray, unsigned char **yarray) { - int x, y, val, r, g, b, *ter, ex, er, eg, eb; + int x, y, val, r, g, b, /* *ter, ex, */ er, eg, eb; unsigned char *ptr2; unsigned char dither[4][4] = @@ -3255,7 +3255,7 @@ grender_15_dither_mod_ordered(GdkImlibImage * im, int w, int h, XImage * xim, XImage * sxim, int *er1, int *er2, int *xarray, unsigned char **yarray) { - int x, y, val, r, g, b, *ter, ex, er, eg, eb; + int x, y, val, r, g, b, /* *ter, ex, */ er, eg, eb; unsigned char *ptr2; unsigned char dither[4][4] = @@ -3300,7 +3300,7 @@ grender_shaped_16_dither_mod_ordered(GdkImlibImage * im, int w, int h, XImage * XImage * sxim, int *er1, int *er2, int *xarray, unsigned char **yarray) { - int x, y, val, r, g, b, *ter, ex, er, eg, eb; + int x, y, val, r, g, b, /* *ter, ex,*/ er, eg, eb; unsigned char *ptr2; unsigned char dither[4][4] = @@ -3355,7 +3355,7 @@ grender_16_dither_mod_ordered(GdkImlibImage * im, int w, int h, XImage * xim, XImage * sxim, int *er1, int *er2, int *xarray, unsigned char **yarray) { - int x, y, val, r, g, b, *ter, ex, er, eg, eb; + int x, y, val, r, g, b, /* *ter, ex, */ er, eg, eb; unsigned char *ptr2; unsigned char dither[4][4] = diff --git a/src/gdk_imlib/save.c b/src/gdk_imlib/save.c index 5f009b22c7..59d4e9c5bc 100644 --- a/src/gdk_imlib/save.c +++ b/src/gdk_imlib/save.c @@ -83,7 +83,7 @@ gdk_imlib_save_image(GdkImlibImage * im, char *file, GdkImlibSaveInfo * info) { int bx, by, bxx, byy; int w, h; - int sx, sy; + int sx = 0, sy = 0; int tx = 35, ty = 35; int x, y; unsigned char *ptr; diff --git a/src/gdk_imlib/utils.c b/src/gdk_imlib/utils.c index 2f0510e7b9..039e93c4ea 100644 --- a/src/gdk_imlib/utils.c +++ b/src/gdk_imlib/utils.c @@ -935,7 +935,7 @@ gdk_imlib_create_image_from_xpm_data(char **data) { GdkImlibImage *im; unsigned char *ptr; - int pc, c, i, j, k, ncolors, cpp, comment, transp, quote, + int /* pc, */ c, i, j, k, ncolors, cpp, comment, transp, quote, context, len, count, done; int w, h; char *line, s[65536], tok[65536], col[65536]; @@ -947,8 +947,11 @@ gdk_imlib_create_image_from_xpm_data(char **data) int r, g, b; } *cmap; + int lookup[128][128]; + cmap = NULL; + j = 0; if (!data) return NULL; im = malloc(sizeof(GdkImlibImage)); @@ -1133,10 +1136,10 @@ gdk_imlib_create_image_from_xpm_data(char **data) { if (cpp == 1) for (i = 0; i < ncolors; i++) - lookup[cmap[i].str[0]][cmap[i].str[1]] = i; + lookup[(int)cmap[i].str[0]][(int)cmap[i].str[1]] = i; if (cpp == 2) for (i = 0; i < ncolors; i++) - lookup[cmap[i].str[0]][cmap[i].str[1]] = i; + lookup[(int)cmap[i].str[0]][(int)cmap[i].str[1]] = i; context++; } } @@ -1154,7 +1157,7 @@ gdk_imlib_create_image_from_xpm_data(char **data) for (i = 0; ((i < 65536) && (line[i])); i++) { col[0] = line[i]; - if (cmap[lookup[col[0]][0]].transp) + if (cmap[lookup[(int)col[0]][0]].transp) { *ptr++ = 255; *ptr++ = 0; @@ -1162,9 +1165,9 @@ gdk_imlib_create_image_from_xpm_data(char **data) } else { - *ptr++ = (unsigned char)cmap[lookup[col[0]][0]].r; - *ptr++ = (unsigned char)cmap[lookup[col[0]][0]].g; - *ptr++ = (unsigned char)cmap[lookup[col[0]][0]].b; + *ptr++ = (unsigned char)cmap[lookup[(int)col[0]][0]].r; + *ptr++ = (unsigned char)cmap[lookup[(int)col[0]][0]].g; + *ptr++ = (unsigned char)cmap[lookup[(int)col[0]][0]].b; } } } @@ -1173,9 +1176,9 @@ gdk_imlib_create_image_from_xpm_data(char **data) for (i = 0; ((i < 65536) && (line[i])); i++) { col[0] = line[i]; - *ptr++ = (unsigned char)cmap[lookup[col[0]][0]].r; - *ptr++ = (unsigned char)cmap[lookup[col[0]][0]].g; - *ptr++ = (unsigned char)cmap[lookup[col[0]][0]].b; + *ptr++ = (unsigned char)cmap[lookup[(int)col[0]][0]].r; + *ptr++ = (unsigned char)cmap[lookup[(int)col[0]][0]].g; + *ptr++ = (unsigned char)cmap[lookup[(int)col[0]][0]].b; } } } @@ -1187,7 +1190,7 @@ gdk_imlib_create_image_from_xpm_data(char **data) { col[0] = line[i++]; col[1] = line[i]; - if (cmap[lookup[col[0]][col[1]]].transp) + if (cmap[lookup[(int)col[0]][(int)col[1]]].transp) { *ptr++ = 255; *ptr++ = 0; @@ -1195,9 +1198,9 @@ gdk_imlib_create_image_from_xpm_data(char **data) } else { - *ptr++ = (unsigned char)cmap[lookup[col[0]][col[1]]].r; - *ptr++ = (unsigned char)cmap[lookup[col[0]][col[1]]].g; - *ptr++ = (unsigned char)cmap[lookup[col[0]][col[1]]].b; + *ptr++ = (unsigned char)cmap[lookup[(int)col[0]][(int)col[1]]].r; + *ptr++ = (unsigned char)cmap[lookup[(int)col[0]][(int)col[1]]].g; + *ptr++ = (unsigned char)cmap[lookup[(int)col[0]][(int)col[1]]].b; } } } @@ -1207,9 +1210,9 @@ gdk_imlib_create_image_from_xpm_data(char **data) { col[0] = line[i++]; col[1] = line[i]; - *ptr++ = (unsigned char)cmap[lookup[col[0]][col[1]]].r; - *ptr++ = (unsigned char)cmap[lookup[col[0]][col[1]]].g; - *ptr++ = (unsigned char)cmap[lookup[col[0]][col[1]]].b; + *ptr++ = (unsigned char)cmap[lookup[(int)col[0]][(int)col[1]]].r; + *ptr++ = (unsigned char)cmap[lookup[(int)col[0]][(int)col[1]]].g; + *ptr++ = (unsigned char)cmap[lookup[(int)col[0]][(int)col[1]]].b; } } } diff --git a/src/generic/treectrl.cpp b/src/generic/treectrl.cpp index a8cb0cfb1a..7e26246c1a 100644 --- a/src/generic/treectrl.cpp +++ b/src/generic/treectrl.cpp @@ -719,7 +719,7 @@ bool wxTreeCtrl::SelectItem(long itemId) return TRUE; }; -void wxTreeCtrl::SelectItem(wxGenericTreeItem *item) +void wxTreeCtrl::SelectItem(wxGenericTreeItem *item, bool bDoEvents ) { if (m_current != item) { @@ -732,7 +732,7 @@ void wxTreeCtrl::SelectItem(wxGenericTreeItem *item) m_current->SetHilight( TRUE ); RefreshLine( m_current ); - m_current->SendSelected( this ); + if (bDoEvents) m_current->SendSelected( this ); } } diff --git a/src/iodbc/connect.c b/src/iodbc/connect.c index c2f37e9f28..88e636aca7 100644 --- a/src/iodbc/connect.c +++ b/src/iodbc/connect.c @@ -26,6 +26,8 @@ #include <../iodbc/hstmt.h> #include <../iodbc/itrace.h> +#include +#include extern char* _iodbcdm_getkeyvalbydsn(); extern char* _iodbcdm_getkeyvalinstr(); @@ -292,7 +294,7 @@ RETCODE _iodbcdm_driverunload( HDBC hdbc ) GENV_t FAR* genv; HPROC hproc; RETCODE retcode = SQL_SUCCESS; - int sqlstat = en_00000; +/* int sqlstat = en_00000; */ if( hdbc == SQL_NULL_HDBC ) { @@ -952,16 +954,16 @@ RETCODE SQL_API SQLBrowseConnect ( SWORD FAR* pcbConnStrOut ) { DBC_t FAR* pdbc = (DBC_t FAR*)hdbc; - HDLL hdll; +/* HDLL hdll; */ char FAR* drv; char drvbuf[1024]; char FAR* dsn; char dsnbuf[SQL_MAX_DSN_LENGTH + 1]; - UCHAR cnstr2drv[1024]; +/* UCHAR cnstr2drv[1024]; */ - HPROC hproc, dialproc; + HPROC hproc /*, dialproc*/ ; - int sqlstat = en_00000; +/* int sqlstat = en_00000; */ RETCODE retcode = SQL_SUCCESS; RETCODE setopterr = SQL_SUCCESS; diff --git a/src/iodbc/dlproc.c b/src/iodbc/dlproc.c index ab102d2174..db23fa2562 100644 --- a/src/iodbc/dlproc.c +++ b/src/iodbc/dlproc.c @@ -32,7 +32,7 @@ HPROC _iodbcdm_getproc( HDBC hdbc, int idx ) { DBC_t FAR* pdbc = (DBC_t FAR*)hdbc; ENV_t FAR* penv; - HDLL hdll; +/* HDLL hdll; */ HPROC FAR* phproc; if( idx <= 0 || idx > SQL_EXT_API_LAST ) diff --git a/src/iodbc/herr.c b/src/iodbc/herr.c index cffbddae65..9c299e6597 100644 --- a/src/iodbc/herr.c +++ b/src/iodbc/herr.c @@ -28,6 +28,8 @@ #include <../iodbc/itrace.h> #include "../iodbc/herr.ci" +#include +#include static HERR _iodbcdm_popsqlerr( HERR herr ) { diff --git a/src/iodbc/info.c b/src/iodbc/info.c index 800418487f..600bcc6a3a 100644 --- a/src/iodbc/info.c +++ b/src/iodbc/info.c @@ -27,6 +27,9 @@ #include <../iodbc/itrace.h> +#include +#include + RETCODE SQL_API SQLDataSources( HENV henv, UWORD fDir, @@ -118,7 +121,7 @@ RETCODE SQL_API SQLGetInfo( HPROC hproc; RETCODE retcode = SQL_SUCCESS; - DWORD dword; + DWORD dword = 0; int size = 0, len = 0; char buf[16] = { '\0' }; diff --git a/src/iodbc/misc.c b/src/iodbc/misc.c index 76becac1b9..4793645a12 100644 --- a/src/iodbc/misc.c +++ b/src/iodbc/misc.c @@ -19,6 +19,7 @@ #include <../iodbc/isqlext.h> #include +#include static int upper_strneq( @@ -26,8 +27,8 @@ upper_strneq( char* s2, int n ) { - int i; - char c1, c2; + int i; + char c1 = 0, c2 = 0; for(i=1;i