From ccba5a84f3779625db470d6642a9f42fc0b8907b Mon Sep 17 00:00:00 2001 From: Vadim Dashevskiy Date: Fri, 24 Jul 2015 17:57:08 +0000 Subject: BasicHistory - warning fixes git-svn-id: http://svn.miranda-ng.org/main/trunk@14680 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/BasicHistory/src/BasicHistory.cpp | 12 ++++++------ plugins/BasicHistory/src/BinaryExport.cpp | 6 +++--- plugins/BasicHistory/src/DatExport.cpp | 6 +++--- plugins/BasicHistory/src/ExportManager.cpp | 2 +- plugins/BasicHistory/src/HistoryWindow.cpp | 10 ++-------- plugins/BasicHistory/src/ImageDataObject.h | 20 ++++++++++---------- plugins/BasicHistory/src/Options.cpp | 3 +-- plugins/BasicHistory/src/PlainHtmlExport.cpp | 6 +++--- plugins/BasicHistory/src/RichHtmlExport.cpp | 4 ++-- plugins/BasicHistory/src/Scheduler.cpp | 4 ++-- plugins/BasicHistory/src/TxtExport.cpp | 6 +++--- plugins/BasicHistory/src/codecvt_CodePage.h | 6 +++--- plugins/BasicHistory/src/stdafx.h | 1 - 13 files changed, 39 insertions(+), 47 deletions(-) (limited to 'plugins/BasicHistory/src') diff --git a/plugins/BasicHistory/src/BasicHistory.cpp b/plugins/BasicHistory/src/BasicHistory.cpp index 38cf5d3044..b66b108234 100644 --- a/plugins/BasicHistory/src/BasicHistory.cpp +++ b/plugins/BasicHistory/src/BasicHistory.cpp @@ -54,7 +54,7 @@ PLUGININFOEX pluginInfo = { {0xe25367a2, 0x51ae, 0x4044, {0xbe, 0x28, 0x13, 0x1b, 0xc1, 0x8b, 0x71, 0xa4}} }; -BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) +BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD, LPVOID) { hInst = hinstDLL; return TRUE; @@ -62,7 +62,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) int hLangpack = 0; -extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD mirandaVersion) +extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD) { return &pluginInfo; } @@ -74,7 +74,7 @@ void DeinitScheduler(); int DoLastTask(WPARAM, LPARAM); INT_PTR ExecuteTaskService(WPARAM wParam, LPARAM lParam); -int PrebuildContactMenu(WPARAM hContact, LPARAM lParam) +int PrebuildContactMenu(WPARAM hContact, LPARAM) { bool bHasHistory = db_event_last(hContact) != NULL; bool isInList = HistoryWindow::IsInList(GetForegroundWindow()); @@ -84,7 +84,7 @@ int PrebuildContactMenu(WPARAM hContact, LPARAM lParam) return 0; } -int ToolbarModuleLoaded(WPARAM wParam,LPARAM lParam) +int ToolbarModuleLoaded(WPARAM,LPARAM) { TTBButton ttb = { 0 }; ttb.pszService = MS_HISTORY_SHOWCONTACTHISTORY; @@ -178,7 +178,7 @@ HICON LoadIconEx(int iconId, bool big) return 0; } -INT_PTR ShowContactHistory(WPARAM hContact, LPARAM lParam) +INT_PTR ShowContactHistory(WPARAM hContact, LPARAM) { HistoryWindow::Open(hContact); return 0; @@ -197,7 +197,7 @@ int HistoryContactDelete(WPARAM wParam, LPARAM) return 0; } -int ModulesLoaded(WPARAM wParam, LPARAM lParam) +int ModulesLoaded(WPARAM, LPARAM) { InitMenuItems(); diff --git a/plugins/BasicHistory/src/BinaryExport.cpp b/plugins/BasicHistory/src/BinaryExport.cpp index b1dfa52047..6164e8062b 100644 --- a/plugins/BasicHistory/src/BinaryExport.cpp +++ b/plugins/BasicHistory/src/BinaryExport.cpp @@ -101,7 +101,7 @@ bool BinaryExport::ReadString(std::wstring &str) return true; } -void BinaryExport::WriteHeader(const std::wstring &fileName, const std::wstring &filterName, const std::wstring &myName, const std::wstring &myId, const std::wstring &name1, const std::wstring &proto1, const std::wstring &id1, const std::string& baseProto1, const std::wstring& encoding) +void BinaryExport::WriteHeader(const std::wstring&, const std::wstring &filterName, const std::wstring &myName, const std::wstring &myId, const std::wstring &name1, const std::wstring &proto1, const std::wstring &id1, const std::string&, const std::wstring&) { BinaryFileHeader header; memset(&header, 0, sizeof(BinaryFileHeader)); @@ -126,11 +126,11 @@ void BinaryExport::WriteFooter() { } -void BinaryExport::WriteGroup(bool isMe, const std::wstring &time, const std::wstring &user, const std::wstring &eventText) +void BinaryExport::WriteGroup(bool, const std::wstring&, const std::wstring&, const std::wstring&) { } -void BinaryExport::WriteMessage(bool isMe, const std::wstring &longDate, const std::wstring &shortDate, const std::wstring &user, const std::wstring &message, const DBEVENTINFO& dbei) +void BinaryExport::WriteMessage(bool, const std::wstring&, const std::wstring&, const std::wstring&, const std::wstring &message, const DBEVENTINFO& dbei) { if (dbei.timestamp >= lTime) { BinaryFileMessageHeader header; diff --git a/plugins/BasicHistory/src/DatExport.cpp b/plugins/BasicHistory/src/DatExport.cpp index f11cef9a17..336adcd3e7 100644 --- a/plugins/BasicHistory/src/DatExport.cpp +++ b/plugins/BasicHistory/src/DatExport.cpp @@ -65,7 +65,7 @@ int DatExport::WriteString(const std::wstring &str) return conv; } -void DatExport::WriteHeader(const std::wstring &fileName, const std::wstring &filterName, const std::wstring &myName, const std::wstring &myId, const std::wstring &name1, const std::wstring &proto1, const std::wstring &id1, const std::string& baseProto1, const std::wstring& encoding) +void DatExport::WriteHeader(const std::wstring&, const std::wstring&, const std::wstring&, const std::wstring&, const std::wstring&, const std::wstring&, const std::wstring&, const std::string&, const std::wstring&) { MCHeader header; memset(&header, 0, sizeof(MCHeader)); @@ -86,11 +86,11 @@ void DatExport::WriteFooter() memBuf.shrink_to_fit(); } -void DatExport::WriteGroup(bool isMe, const std::wstring &time, const std::wstring &user, const std::wstring &eventText) +void DatExport::WriteGroup(bool, const std::wstring&, const std::wstring&, const std::wstring&) { } -void DatExport::WriteMessage(bool isMe, const std::wstring &longDate, const std::wstring &shortDate, const std::wstring &user, const std::wstring &message, const DBEVENTINFO& dbei) +void DatExport::WriteMessage(bool, const std::wstring&, const std::wstring&, const std::wstring&, const std::wstring &message, const DBEVENTINFO& dbei) { DBEVENTINFO86 header; header.cbSize = sizeof(DBEVENTINFO86); diff --git a/plugins/BasicHistory/src/ExportManager.cpp b/plugins/BasicHistory/src/ExportManager.cpp index 0800d6ad89..430de416a9 100644 --- a/plugins/BasicHistory/src/ExportManager.cpp +++ b/plugins/BasicHistory/src/ExportManager.cpp @@ -292,7 +292,7 @@ bool ExportManager::Import(IImport::ImportType type, std::vector::iterator it = windows.begin(); it != windows.end(); ++it) { @@ -428,8 +428,6 @@ void HistoryWindow::OptionsSearchingChanged() INT_PTR HistoryWindow::DeleteAllUserHistory(WPARAM hContact, LPARAM) { HWND hWnd = NULL; - int start = 0; - int end = 0; int count = HistoryEventList::GetContactMessageNumber(hContact); if (!count) return FALSE; @@ -715,7 +713,6 @@ INT_PTR CALLBACK HistoryWindow::DlgProcHistory(HWND hwndDlg, UINT msg, WPARAM wP if (msgFilter->msg == WM_RBUTTONUP) { POINT clicked; - LPNMITEMACTIVATE nmlv = (LPNMITEMACTIVATE)lParam; HWND window = historyWindow->editWindow; POINTL p; POINT scrool; @@ -930,7 +927,6 @@ INT_PTR CALLBACK HistoryWindow::DlgProcHistory(HWND hwndDlg, UINT msg, WPARAM wP clicked.y = info.pt.y = nmlv->ptAction.y; ClientToScreen(window, &clicked); int newSel = SendMessage(window, LVM_SUBITEMHITTEST, 0, (LPARAM)&info); - int curSel = historyWindow->selected; if (newSel >= 0) { HMENU hPopupMenu = CreatePopupMenu(); @@ -1328,7 +1324,7 @@ void HistoryWindow::FillHistoryThread(void* param) SetFocus(hwndList); } -void HistoryWindow::AddGroup(bool isMe, const std::wstring &time, const std::wstring &user, const std::wstring &eventText, int ico) +void HistoryWindow::AddGroup(bool, const std::wstring &time, const std::wstring &user, const std::wstring &eventText, int ico) { TCHAR msg[256]; msg[0] = 0; @@ -1537,7 +1533,6 @@ void HistoryWindow::SelectEventGroup(int sel) UpdateWindow(editWindow); if (isStartSelect && !Options::instance->messagesNewOnTop) { - HWND h = SetFocus(editWindow); CHARRANGE ch; ch.cpMin = ch.cpMax = MAXLONG; SendMessage(editWindow, EM_EXSETSEL, 0, (LPARAM)&ch); @@ -1582,7 +1577,6 @@ LRESULT CALLBACK HistoryWindow::SplitterSubclassProc(HWND hwnd, UINT msg, WPARAM return 1; case WM_LBUTTONUP: - HWND hwndCapture = GetCapture(); ReleaseCapture(); SendMessage(hwndParent, WM_SIZE, 0, 0); RedrawWindow(hwndParent, NULL, NULL, RDW_ALLCHILDREN | RDW_INVALIDATE | RDW_UPDATENOW); diff --git a/plugins/BasicHistory/src/ImageDataObject.h b/plugins/BasicHistory/src/ImageDataObject.h index 309c220e36..4909219683 100644 --- a/plugins/BasicHistory/src/ImageDataObject.h +++ b/plugins/BasicHistory/src/ImageDataObject.h @@ -78,7 +78,7 @@ public: } // IDataObject Interface - STDMETHOD(GetData)(FORMATETC *pformatetcIn, STGMEDIUM *pmedium) { + STDMETHOD(GetData)(FORMATETC*, STGMEDIUM *pmedium) { HANDLE hDst; hDst = ::OleDuplicateData(m_stgmed.hBitmap, CF_BITMAP, 0); if (hDst == NULL) @@ -90,39 +90,39 @@ public: return S_OK; } - STDMETHOD(GetDataHere)(FORMATETC* pformatetc, STGMEDIUM* pmedium ) { + STDMETHOD(GetDataHere)(FORMATETC*, STGMEDIUM*) { return E_NOTIMPL; } - STDMETHOD(QueryGetData)(FORMATETC* pformatetc ) { + STDMETHOD(QueryGetData)(FORMATETC*) { return E_NOTIMPL; } - STDMETHOD(GetCanonicalFormatEtc)(FORMATETC* pformatectIn ,FORMATETC* pformatetcOut ) { + STDMETHOD(GetCanonicalFormatEtc)(FORMATETC*, FORMATETC*) { return E_NOTIMPL; } - STDMETHOD(SetData)(FORMATETC* pformatetc , STGMEDIUM* pmedium , BOOL fRelease ) { + STDMETHOD(SetData)(FORMATETC* pformatetc , STGMEDIUM* pmedium , BOOL) { m_format = *pformatetc; m_stgmed = *pmedium; return S_OK; } - STDMETHOD(EnumFormatEtc)(DWORD dwDirection , IEnumFORMATETC** ppenumFormatEtc ) { + STDMETHOD(EnumFormatEtc)(DWORD, IEnumFORMATETC**) { return E_NOTIMPL; } - STDMETHOD(DAdvise)(FORMATETC *pformatetc, DWORD advf, IAdviseSink *pAdvSink, - DWORD *pdwConnection) { + STDMETHOD(DAdvise)(FORMATETC*, DWORD, IAdviseSink*, + DWORD*) { return E_NOTIMPL; } - STDMETHOD(DUnadvise)(DWORD dwConnection) { + STDMETHOD(DUnadvise)(DWORD) { return E_NOTIMPL; } - STDMETHOD(EnumDAdvise)(IEnumSTATDATA **ppenumAdvise) { + STDMETHOD(EnumDAdvise)(IEnumSTATDATA **) { return E_NOTIMPL; } diff --git a/plugins/BasicHistory/src/Options.cpp b/plugins/BasicHistory/src/Options.cpp index 0e472145b7..44fe768616 100644 --- a/plugins/BasicHistory/src/Options.cpp +++ b/plugins/BasicHistory/src/Options.cpp @@ -1291,7 +1291,7 @@ void InitCodepageCB(HWND hwndCB, unsigned int codepage, const std::wstring& name ComboBox_LimitText(hwndCB, 127); } -unsigned int GetCodepageCB(HWND hwndCB, bool errorReport, unsigned int defCp, const std::wstring& defName, std::wstring& name) +unsigned int GetCodepageCB(HWND hwndCB, bool errorReport, unsigned int, const std::wstring& defName, std::wstring& name) { int selCpIdx = ComboBox_GetCurSel(hwndCB); if (selCpIdx < 0) { @@ -1607,7 +1607,6 @@ INT_PTR CALLBACK Options::DlgProcOptsTask(HWND hwndDlg, UINT msg, WPARAM wParam, HWND time = GetDlgItem(hwndDlg, IDC_TRIGER_TIME); HWND name = GetDlgItem(hwndDlg, IDC_TASK_NAME); HWND active = GetDlgItem(hwndDlg, IDC_TASK_ACTIVE); - HWND star = GetDlgItem(hwndDlg, IDC_TASK_STAR); HWND password = GetDlgItem(hwndDlg, IDC_PASSWORD); HWND expImp = GetDlgItem(hwndDlg, IDC_EXPIMP); diff --git a/plugins/BasicHistory/src/PlainHtmlExport.cpp b/plugins/BasicHistory/src/PlainHtmlExport.cpp index 635416695b..006782e96a 100644 --- a/plugins/BasicHistory/src/PlainHtmlExport.cpp +++ b/plugins/BasicHistory/src/PlainHtmlExport.cpp @@ -28,7 +28,7 @@ PlainHtmlExport::~PlainHtmlExport() extern std::wstring MakeTextHtmled(const std::wstring& message, std::queue >* positionMap = NULL); extern std::wstring UrlHighlightHtml(const std::wstring& message, bool& isUrl); -void PlainHtmlExport::WriteHeader(const std::wstring &fileName, const std::wstring &filterName, const std::wstring &myName, const std::wstring &myId, const std::wstring &name1, const std::wstring &proto1, const std::wstring &id1, const std::string& baseProto1, const std::wstring& encoding) +void PlainHtmlExport::WriteHeader(const std::wstring&, const std::wstring &filterName, const std::wstring &myName, const std::wstring &myId, const std::wstring &name1, const std::wstring &proto1, const std::wstring &id1, const std::string&, const std::wstring& encoding) { EXP_FILE << _T("\n"); EXP_FILE << _T("\n\n"); @@ -71,7 +71,7 @@ void PlainHtmlExport::WriteFooter() EXP_FILE << _T("
\n\n"); } -void PlainHtmlExport::WriteGroup(bool isMe, const std::wstring &time, const std::wstring &user, const std::wstring &eventText) +void PlainHtmlExport::WriteGroup(bool, const std::wstring &time, const std::wstring&, const std::wstring&) { TCHAR buf[256]; EXP_FILE << _T("
\n"); @@ -80,7 +80,7 @@ void PlainHtmlExport::WriteGroup(bool isMe, const std::wstring &time, const std: EXP_FILE << _T("
\n"); } -void PlainHtmlExport::WriteMessage(bool isMe, const std::wstring &longDate, const std::wstring &shortDate, const std::wstring &user, const std::wstring &message, const DBEVENTINFO& dbei) +void PlainHtmlExport::WriteMessage(bool isMe, const std::wstring &longDate, const std::wstring &shortDate, const std::wstring &user, const std::wstring &message, const DBEVENTINFO&) { TCHAR *id = isMe ? _T("out") : _T("inc"); TCHAR* ev = (isMe ? _T("1") : _T("0")); diff --git a/plugins/BasicHistory/src/RichHtmlExport.cpp b/plugins/BasicHistory/src/RichHtmlExport.cpp index 2ffda4d7e3..0c08f97368 100644 --- a/plugins/BasicHistory/src/RichHtmlExport.cpp +++ b/plugins/BasicHistory/src/RichHtmlExport.cpp @@ -363,7 +363,7 @@ void RichHtmlExport::WriteFooter() EXP_FILE << _T("
\n\n"); } -void RichHtmlExport::WriteGroup(bool isMe, const std::wstring &time, const std::wstring &user, const std::wstring &eventText) +void RichHtmlExport::WriteGroup(bool isMe, const std::wstring &time, const std::wstring&, const std::wstring &eventText) { TCHAR *id = isMe ? _T("out") : _T("inc"); TCHAR* ev = (isMe ? _T("1") : _T("0")); @@ -381,7 +381,7 @@ void RichHtmlExport::WriteGroup(bool isMe, const std::wstring &time, const std:: ++groupId; } -void RichHtmlExport::WriteMessage(bool isMe, const std::wstring &longDate, const std::wstring &shortDate, const std::wstring &user, const std::wstring &message, const DBEVENTINFO& dbei) +void RichHtmlExport::WriteMessage(bool isMe, const std::wstring &longDate, const std::wstring &shortDate, const std::wstring &user, const std::wstring &message, const DBEVENTINFO&) { TCHAR *id = isMe ? _T("out") : _T("inc"); TCHAR* ev = (isMe ? _T("1") : _T("0")); diff --git a/plugins/BasicHistory/src/Scheduler.cpp b/plugins/BasicHistory/src/Scheduler.cpp index fdd218fa75..4ac0220a21 100644 --- a/plugins/BasicHistory/src/Scheduler.cpp +++ b/plugins/BasicHistory/src/Scheduler.cpp @@ -864,7 +864,7 @@ void GetZipFileTime(const TCHAR *file, uLong *dt) /* calculate the CRC32 of a file, because to encrypt a file, we need known the CRC32 of the file before */ -bool GetFileCrc(const TCHAR* filenameinzip, unsigned char* buf, unsigned long size_buf, unsigned long* result_crc) +bool GetFileCrc(const TCHAR* filenameinzip, unsigned char* buf, unsigned long, unsigned long* result_crc) { unsigned long calculate_crc = 0; bool error = true; @@ -1258,7 +1258,7 @@ void CreatePath(const TCHAR *szDir) CreateDirectory( szTestDir, NULL ); } -INT_PTR ExecuteTaskService(WPARAM wParam, LPARAM lParam) +INT_PTR ExecuteTaskService(WPARAM wParam, LPARAM) { mir_cslock lck(Options::instance->criticalSection); int taskNr = (int)wParam; diff --git a/plugins/BasicHistory/src/TxtExport.cpp b/plugins/BasicHistory/src/TxtExport.cpp index 4009026b14..193772dde7 100644 --- a/plugins/BasicHistory/src/TxtExport.cpp +++ b/plugins/BasicHistory/src/TxtExport.cpp @@ -24,7 +24,7 @@ TxtExport::~TxtExport() { } -void TxtExport::WriteHeader(const std::wstring &fileName, const std::wstring &filterName, const std::wstring &myName, const std::wstring &myId, const std::wstring &name1, const std::wstring &proto1, const std::wstring &id1, const std::string& baseProto1, const std::wstring& encoding) +void TxtExport::WriteHeader(const std::wstring&, const std::wstring &filterName, const std::wstring &myName, const std::wstring &myId, const std::wstring &name1, const std::wstring &proto1, const std::wstring &id1, const std::string&, const std::wstring&) { TCHAR* start = TranslateT("###"); EXP_FILE << start << "\n" << start << _T(" ") << TranslateT("History Log") << _T("\n"); @@ -55,11 +55,11 @@ void TxtExport::WriteFooter() { } -void TxtExport::WriteGroup(bool isMe, const std::wstring &time, const std::wstring &user, const std::wstring &eventText) +void TxtExport::WriteGroup(bool, const std::wstring&, const std::wstring&, const std::wstring&) { } -void TxtExport::WriteMessage(bool isMe, const std::wstring &longDate, const std::wstring &shortDate, const std::wstring &user, const std::wstring &message, const DBEVENTINFO& dbei) +void TxtExport::WriteMessage(bool, const std::wstring &longDate, const std::wstring&, const std::wstring &user, const std::wstring &message, const DBEVENTINFO&) { EXP_FILE << "\n[" << longDate << "] " << user << ":\n" << message << "\n"; } diff --git a/plugins/BasicHistory/src/codecvt_CodePage.h b/plugins/BasicHistory/src/codecvt_CodePage.h index c93a0fdf22..a95fd783ed 100644 --- a/plugins/BasicHistory/src/codecvt_CodePage.h +++ b/plugins/BasicHistory/src/codecvt_CodePage.h @@ -42,12 +42,12 @@ public: } protected: - virtual result do_in(mbstate_t& _State, const _Byte *_First1, const _Byte *_Last1, const _Byte *& _Mid1, _Elem *_First2, _Elem *_Last2, _Elem *& _Mid2) const + virtual result do_in(mbstate_t&, const _Byte *, const _Byte *, const _Byte *&, _Elem *, _Elem *, _Elem *&) const { // convert bytes [_First1, _Last1) to [_First2, _Last) return (_Mybase::error); // not implemented } - virtual result do_out(mbstate_t& _State, const _Elem *_First1, const _Elem *_Last1, const _Elem *& _Mid1, _Byte *_First2, _Byte *_Last2, _Byte *& _Mid2) const + virtual result do_out(mbstate_t&, const _Elem *_First1, const _Elem *_Last1, const _Elem *& _Mid1, _Byte *_First2, _Byte *_Last2, _Byte *& _Mid2) const { // convert [_First1, _Last1) to bytes [_First2, _Last) _Mid1 = _First1; _Mid2 = _First2; @@ -76,7 +76,7 @@ protected: return (_Mybase::ok); } - virtual int do_length(const mbstate_t& _State, const _Byte *_First1, const _Byte *_Last1, size_t _Count) const _THROW0() + virtual int do_length(const mbstate_t&, const _Byte *, const _Byte *, size_t _Count) const _THROW0() { // return min(_Count, converted length of bytes [_First1, _Last1)) return (int)_Count; // not implemented } diff --git a/plugins/BasicHistory/src/stdafx.h b/plugins/BasicHistory/src/stdafx.h index 463edd2d1b..e2cfff2c86 100644 --- a/plugins/BasicHistory/src/stdafx.h +++ b/plugins/BasicHistory/src/stdafx.h @@ -9,7 +9,6 @@ #define _USE_32BIT_TIME_T #endif -#define _CRT_SECURE_NO_WARNINGS #define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers // Windows Header Files: #include -- cgit v1.2.3