From 040e5f77e6f7f177bdc74b90327c22908d56fe59 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 7 Mar 2005 19:50:06 +0000 Subject: [PATCH] harmless warning fixes for WinCE (mostly unused parameters) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32640 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/extended.c | 6 +++--- src/msw/utils.cpp | 23 ++++++++++++++++++++++- src/msw/window.cpp | 10 ++++++++-- 3 files changed, 33 insertions(+), 6 deletions(-) diff --git a/src/common/extended.c b/src/common/extended.c index 863e4878a2..9ff1b19f02 100644 --- a/src/common/extended.c +++ b/src/common/extended.c @@ -8,8 +8,8 @@ *****************************************************************************/ -#if defined(_WIN32_WCE) && (_WIN32_WCE < 400) - // eVC3 cause warnings in its own headers: stdlib.h and winnt.h +#if defined(_WIN32_WCE) + // eVC cause warnings in its own headers: stdlib.h and winnt.h #pragma warning (disable:4115) #pragma warning (disable:4214) #endif @@ -21,7 +21,7 @@ #include #include "wx/defs.h" -#if defined(_WIN32_WCE) && (_WIN32_WCE < 400) +#if defined(_WIN32_WCE) #pragma warning (default:4115) #pragma warning (default:4214) #endif diff --git a/src/msw/utils.cpp b/src/msw/utils.cpp index d2238eaddb..cb4eba0172 100644 --- a/src/msw/utils.cpp +++ b/src/msw/utils.cpp @@ -118,6 +118,9 @@ static const wxChar eUSERNAME[] = wxT("UserName"); bool wxGetHostName(wxChar *buf, int maxSize) { #if defined(__WXWINCE__) + // TODO-CE + wxUnusedVar(buf); + wxUnusedVar(maxSize); return false; #elif defined(__WIN32__) && !defined(__WXMICROWIN__) DWORD nSize = maxSize; @@ -230,6 +233,9 @@ bool wxGetFullHostName(wxChar *buf, int maxSize) bool wxGetUserId(wxChar *buf, int maxSize) { #if defined(__WXWINCE__) + // TODO-CE + wxUnusedVar(buf); + wxUnusedVar(maxSize); return false; #elif defined(__WIN32__) && !defined(__WXMICROWIN__) DWORD nSize = maxSize; @@ -270,6 +276,9 @@ bool wxGetUserId(wxChar *buf, int maxSize) bool wxGetUserName(wxChar *buf, int maxSize) { #if defined(__WXWINCE__) + // TODO-CE + wxUnusedVar(buf); + wxUnusedVar(maxSize); return false; #elif defined(USE_NET_API) CHAR szUserName[256]; @@ -350,9 +359,9 @@ error: { wxStrncpy(buf, wxT("Unknown User"), maxSize); } -#endif // Win32/16 return true; +#endif // Win32/16 } const wxChar* wxGetHomeDir(wxString *pstr) @@ -464,6 +473,10 @@ bool wxDirExists(const wxString& dir) bool wxGetDiskSpace(const wxString& path, wxLongLong *pTotal, wxLongLong *pFree) { #ifdef __WXWINCE__ + // TODO-CE + wxUnusedVar(path); + wxUnusedVar(pTotal); + wxUnusedVar(pFree); return false; #else if ( path.empty() ) @@ -576,6 +589,9 @@ bool wxGetDiskSpace(const wxString& path, wxLongLong *pTotal, wxLongLong *pFree) bool wxGetEnv(const wxString& var, wxString *value) { #ifdef __WXWINCE__ + // no environment variables under CE + wxUnusedVar(var); + wxUnusedVar(value); return false; #else // Win32 // first get the size of the buffer @@ -610,6 +626,9 @@ bool wxSetEnv(const wxString& var, const wxChar *value) return true; #else // no way to set env vars + // no environment variables under CE + wxUnusedVar(var); + wxUnusedVar(value); return false; #endif } @@ -951,6 +970,8 @@ bool wxShell(const wxString& command) bool wxShutdown(wxShutdownFlags wFlags) { #ifdef __WXWINCE__ + // TODO-CE + wxUnusedVar(wFlags); return false; #elif defined(__WIN32__) bool bOK = true; diff --git a/src/msw/window.cpp b/src/msw/window.cpp index 605d60812d..c490f35a05 100644 --- a/src/msw/window.cpp +++ b/src/msw/window.cpp @@ -1052,6 +1052,8 @@ bool wxCheckWindowWndProc(WXHWND hWnd, WXFARPROC wndProc) // On WinCE (at least), the wndproc comparison doesn't work, // so have to use something like this. #ifdef __WXWINCE__ + wxUnusedVar(wndProc); + extern wxChar *wxCanvasClassName; extern wxChar *wxCanvasClassNameNR; extern const wxChar *wxMDIFrameClassName; @@ -3228,7 +3230,7 @@ bool wxWindowMSW::MSWOnNotify(int WXUNUSED(idCtrl), bool wxWindowMSW::HandleQueryEndSession(long logOff, bool *mayEnd) { -#ifndef __WXWINCE__ +#ifdef ENDSESSION_LOGOFF wxCloseEvent event(wxEVT_QUERY_END_SESSION, wxID_ANY); event.SetEventObject(wxTheApp); event.SetCanVeto(true); @@ -3245,13 +3247,15 @@ bool wxWindowMSW::HandleQueryEndSession(long logOff, bool *mayEnd) return rc; #else + wxUnusedVar(logOff); + wxUnusedVar(mayEnd); return false; #endif } bool wxWindowMSW::HandleEndSession(bool endSession, long logOff) { -#ifndef __WXWINCE__ +#ifdef ENDSESSION_LOGOFF // do nothing if the session isn't ending if ( !endSession ) return false; @@ -3267,6 +3271,8 @@ bool wxWindowMSW::HandleEndSession(bool endSession, long logOff) return wxTheApp->ProcessEvent(event); #else + wxUnusedVar(endSession); + wxUnusedVar(logOff); return false; #endif } -- 2.45.2