Warning fixes for WinCE.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27881 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -27,13 +27,17 @@
|
|||||||
# pragma warning(disable:4100)
|
# pragma warning(disable:4100)
|
||||||
|
|
||||||
#ifdef __WXWINCE__
|
#ifdef __WXWINCE__
|
||||||
/*
|
/* windows.h results in tons of warnings at max warning level */
|
||||||
"unreferenced inline function has been removed": this is not
|
# ifdef _MSC_VER
|
||||||
suppressed by push above as it is given at the end of the
|
# pragma warning(push, 1)
|
||||||
compilation unit
|
# endif
|
||||||
*/
|
# include <windows.h>
|
||||||
|
# ifdef _MSC_VER
|
||||||
|
# pragma warning(pop)
|
||||||
# pragma warning(disable:4514)
|
# pragma warning(disable:4514)
|
||||||
#endif /* __WXWINCE__ */
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* _MSC_VER */
|
#endif /* _MSC_VER */
|
||||||
|
|
||||||
#include <winsock.h>
|
#include <winsock.h>
|
||||||
|
@@ -35,16 +35,11 @@
|
|||||||
/* windows.h results in tons of warnings at max warning level */
|
/* windows.h results in tons of warnings at max warning level */
|
||||||
# ifdef _MSC_VER
|
# ifdef _MSC_VER
|
||||||
# pragma warning(push, 1)
|
# pragma warning(push, 1)
|
||||||
/*
|
|
||||||
"unreferenced inline function has been removed": this is not
|
|
||||||
suppressed by push above as it is given at the end of the
|
|
||||||
compilation unit
|
|
||||||
*/
|
|
||||||
# pragma warning(disable:4514)
|
|
||||||
# endif
|
# endif
|
||||||
# include <windows.h>
|
# include <windows.h>
|
||||||
# ifdef _MSC_VER
|
# ifdef _MSC_VER
|
||||||
# pragma warning(pop)
|
# pragma warning(pop)
|
||||||
|
# pragma warning(disable:4514)
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -422,6 +422,7 @@ bool wxTopLevelWindowMSW::CreateFrame(const wxString& title,
|
|||||||
defined(__SMARTPHONE__))
|
defined(__SMARTPHONE__))
|
||||||
// Always expand to fit the screen in PocketPC or SmartPhone
|
// Always expand to fit the screen in PocketPC or SmartPhone
|
||||||
wxSize sz(wxDefaultSize);
|
wxSize sz(wxDefaultSize);
|
||||||
|
wxUnusedVar(size);
|
||||||
#else // other (including normal desktop) Windows
|
#else // other (including normal desktop) Windows
|
||||||
wxSize sz(size);
|
wxSize sz(size);
|
||||||
#endif
|
#endif
|
||||||
|
@@ -918,11 +918,12 @@ bool wxToolBar::MSWOnNotify(int WXUNUSED(idCtrl),
|
|||||||
|
|
||||||
wxToolBarToolBase *tool = FindById(id);
|
wxToolBarToolBase *tool = FindById(id);
|
||||||
if ( !tool )
|
if ( !tool )
|
||||||
return FALSE;
|
return false;
|
||||||
|
|
||||||
return HandleTooltipNotify(code, lParam, tool->GetShortHelp());
|
return HandleTooltipNotify(code, lParam, tool->GetShortHelp());
|
||||||
#else
|
#else
|
||||||
return FALSE;
|
wxUnusedVar(lParam);
|
||||||
|
return false;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1133,7 +1134,7 @@ void wxToolBar::OnMouseEvent(wxMouseEvent& event)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxToolBar::HandleMouseMove(WXWPARAM wParam, WXLPARAM lParam)
|
void wxToolBar::HandleMouseMove(WXWPARAM WXUNUSED(wParam), WXLPARAM lParam)
|
||||||
{
|
{
|
||||||
wxCoord x = GET_X_LPARAM(lParam),
|
wxCoord x = GET_X_LPARAM(lParam),
|
||||||
y = GET_Y_LPARAM(lParam);
|
y = GET_Y_LPARAM(lParam);
|
||||||
|
@@ -52,7 +52,7 @@ long timezone ; // global variable
|
|||||||
////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////
|
||||||
// Common code for localtime and gmtime (static)
|
// Common code for localtime and gmtime (static)
|
||||||
////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////
|
||||||
static struct tm * __cdecl common_localtime(const time_t * t, BOOL bLocal)
|
static struct tm * __cdecl common_localtime(const time_t * WXUNUSED(t), BOOL bLocal)
|
||||||
{
|
{
|
||||||
wxString str ;
|
wxString str ;
|
||||||
SYSTEMTIME SystemTime;
|
SYSTEMTIME SystemTime;
|
||||||
@@ -83,7 +83,7 @@ static struct tm * __cdecl common_localtime(const time_t * t, BOOL bLocal)
|
|||||||
res->tm_sec = SystemTime.wSecond;
|
res->tm_sec = SystemTime.wSecond;
|
||||||
|
|
||||||
res->tm_mday = SystemTime.wDay;
|
res->tm_mday = SystemTime.wDay;
|
||||||
res->tm_mon = SystemTime.wMonth - 1;// this the correct month but localtime returns month aligned to zero
|
res->tm_mon = SystemTime.wMonth - 1; // this the correct month but localtime returns month aligned to zero
|
||||||
res->tm_year = SystemTime.wYear; // this the correct year
|
res->tm_year = SystemTime.wYear; // this the correct year
|
||||||
res->tm_year = res->tm_year - 1900; // but localtime returns the value starting at the 1900
|
res->tm_year = res->tm_year - 1900; // but localtime returns the value starting at the 1900
|
||||||
|
|
||||||
|
@@ -4710,6 +4710,9 @@ int wxWindowMSW::HandleMenuChar(int chAccel, WXLPARAM lParam)
|
|||||||
wxLogLastError(_T("GetMenuItemInfo"));
|
wxLogLastError(_T("GetMenuItemInfo"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
wxUnusedVar(chAccel);
|
||||||
|
wxUnusedVar(lParam);
|
||||||
#endif
|
#endif
|
||||||
return wxNOT_FOUND;
|
return wxNOT_FOUND;
|
||||||
}
|
}
|
||||||
@@ -4798,6 +4801,10 @@ bool wxWindowMSW::HandleJoystickEvent(WXUINT msg, int x, int y, WXUINT flags)
|
|||||||
|
|
||||||
return GetEventHandler()->ProcessEvent(event);
|
return GetEventHandler()->ProcessEvent(event);
|
||||||
#else
|
#else
|
||||||
|
wxUnusedVar(msg);
|
||||||
|
wxUnusedVar(x);
|
||||||
|
wxUnusedVar(y);
|
||||||
|
wxUnusedVar(flags);
|
||||||
return false;
|
return false;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user