diff options
| author | George Hazan <george.hazan@gmail.com> | 2014-12-13 21:45:17 +0000 | 
|---|---|---|
| committer | George Hazan <george.hazan@gmail.com> | 2014-12-13 21:45:17 +0000 | 
| commit | bd9841778fdcf06c87ddcad19669779ea15c6111 (patch) | |
| tree | 755f73a8a48c86df66d2b15f9b481203bcba1672 | |
| parent | 80773d07115cf8d2874d49f6e2378f736db771f6 (diff) | |
Scriver: warning level 4
git-svn-id: http://svn.miranda-ng.org/main/trunk@11382 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
| -rw-r--r-- | plugins/Scriver/scriver_12.vcxproj | 8 | ||||
| -rw-r--r-- | plugins/Scriver/src/chat/main.cpp | 34 | ||||
| -rw-r--r-- | plugins/Scriver/src/chat/message.cpp | 10 | ||||
| -rw-r--r-- | plugins/Scriver/src/chat/options.cpp | 2 | ||||
| -rw-r--r-- | plugins/Scriver/src/chat/window.cpp | 15 | ||||
| -rw-r--r-- | plugins/Scriver/src/globals.cpp | 15 | ||||
| -rw-r--r-- | plugins/Scriver/src/input.cpp | 4 | ||||
| -rw-r--r-- | plugins/Scriver/src/msgdialog.cpp | 21 | ||||
| -rw-r--r-- | plugins/Scriver/src/msglog.cpp | 12 | ||||
| -rw-r--r-- | plugins/Scriver/src/msgoptions.cpp | 17 | ||||
| -rw-r--r-- | plugins/Scriver/src/msgs.cpp | 34 | ||||
| -rw-r--r-- | plugins/Scriver/src/msgs.h | 2 | ||||
| -rw-r--r-- | plugins/Scriver/src/msgwindow.cpp | 6 | ||||
| -rw-r--r-- | plugins/Scriver/src/srmm.cpp | 4 | ||||
| -rw-r--r-- | plugins/Scriver/src/utils.cpp | 6 | ||||
| -rw-r--r-- | plugins/Scriver/src/utils.h | 2 | 
16 files changed, 61 insertions, 131 deletions
| diff --git a/plugins/Scriver/scriver_12.vcxproj b/plugins/Scriver/scriver_12.vcxproj index a5561c6056..c3ce7c7125 100644 --- a/plugins/Scriver/scriver_12.vcxproj +++ b/plugins/Scriver/scriver_12.vcxproj @@ -86,7 +86,7 @@        <FloatingPointModel>Fast</FloatingPointModel>
        <PrecompiledHeader>Use</PrecompiledHeader>
        <PrecompiledHeaderFile>commonheaders.h</PrecompiledHeaderFile>
 -      <WarningLevel>Level3</WarningLevel>
 +      <WarningLevel>Level4</WarningLevel>
        <ExceptionHandling>false</ExceptionHandling>
      </ClCompile>
      <ResourceCompile>
 @@ -118,7 +118,7 @@        <FloatingPointModel>Fast</FloatingPointModel>
        <PrecompiledHeader>Use</PrecompiledHeader>
        <PrecompiledHeaderFile>commonheaders.h</PrecompiledHeaderFile>
 -      <WarningLevel>Level3</WarningLevel>
 +      <WarningLevel>Level4</WarningLevel>
        <ExceptionHandling>false</ExceptionHandling>
      </ClCompile>
      <ResourceCompile>
 @@ -148,7 +148,7 @@        <FunctionLevelLinking>true</FunctionLevelLinking>
        <PrecompiledHeader>Use</PrecompiledHeader>
        <PrecompiledHeaderFile>commonheaders.h</PrecompiledHeaderFile>
 -      <WarningLevel>Level3</WarningLevel>
 +      <WarningLevel>Level4</WarningLevel>
        <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
        <ExceptionHandling>false</ExceptionHandling>
      </ClCompile>
 @@ -178,7 +178,7 @@        <FunctionLevelLinking>true</FunctionLevelLinking>
        <PrecompiledHeader>Use</PrecompiledHeader>
        <PrecompiledHeaderFile>commonheaders.h</PrecompiledHeaderFile>
 -      <WarningLevel>Level3</WarningLevel>
 +      <WarningLevel>Level4</WarningLevel>
        <ExceptionHandling>false</ExceptionHandling>
      </ClCompile>
      <ResourceCompile>
 diff --git a/plugins/Scriver/src/chat/main.cpp b/plugins/Scriver/src/chat/main.cpp index c164c00b48..0efe6a8526 100644 --- a/plugins/Scriver/src/chat/main.cpp +++ b/plugins/Scriver/src/chat/main.cpp @@ -101,7 +101,7 @@ static void OnNewUser(SESSION_INFO *si, USERINFO*)  		SendMessage(si->hWnd, GC_UPDATENICKLIST, 0, 0);
  }
 -static void OnSetStatus(SESSION_INFO *si, int wStatus)
 +static void OnSetStatus(SESSION_INFO *si, int)
  {
  	PostMessage(si->hWnd, GC_FIXTABICONS, 0, 0);
  }
 @@ -157,34 +157,6 @@ static void OnLoadSettings()  	g_Settings.MessageBoxFont = CreateFontIndirect(&lf);
  }
 -static void RegisterFonts()
 -{
 -	ColourIDT colourid = { sizeof(colourid) };
 -	strncpy(colourid.dbSettingsGroup, CHAT_MODULE, sizeof(colourid.dbSettingsGroup));
 -	_tcsncpy(colourid.group, LPGENT("Messaging")_T("/")LPGENT("Group chats"), SIZEOF(colourid.group));
 -
 -	strncpy(colourid.setting, "ColorLogBG", SIZEOF(colourid.setting));
 -	_tcsncpy(colourid.name, LPGENT("Group chat log background"), SIZEOF(colourid.name));
 -	mir_sntprintf(colourid.group, SIZEOF(colourid.group), _T("%s/%s"), LPGENT("Messaging"), LPGENT("Group chats"));
 -	colourid.defcolour = GetSysColor(COLOR_WINDOW);
 -	ColourRegisterT(&colourid);
 -
 -	strncpy(colourid.setting, "ColorNicklistBG", SIZEOF(colourid.setting));
 -	_tcsncpy(colourid.name, LPGENT("Nick list background"), SIZEOF(colourid.name));
 -	colourid.defcolour = GetSysColor(COLOR_WINDOW);
 -	ColourRegisterT(&colourid);
 -
 -	strncpy(colourid.setting, "ColorNicklistLines", SIZEOF(colourid.setting));
 -	_tcsncpy(colourid.name, LPGENT("Nick list lines"), SIZEOF(colourid.name));
 -	colourid.defcolour = GetSysColor(COLOR_INACTIVEBORDER);
 -	ColourRegisterT(&colourid);
 -
 -	strncpy(colourid.setting, "ColorNicklistSelectedBG", SIZEOF(colourid.setting));
 -	_tcsncpy(colourid.name, LPGENT("Nick list background (selected)"), SIZEOF(colourid.name));
 -	colourid.defcolour = GetSysColor(COLOR_HIGHLIGHT);
 -	ColourRegisterT(&colourid);
 -}
 -
  int Chat_Load()
  {
  	CHAT_MANAGER_INITDATA data = { &g_Settings, sizeof(MODULEINFO), sizeof(SESSION_INFO), LPGENT("Messaging")_T("/")LPGENT("Group chats"), FONTMODE_SKIP };
 @@ -228,8 +200,8 @@ int Chat_Unload(void)  	return 0;
  }
 -int Chat_ModulesLoaded(WPARAM wParam,LPARAM lParam)
 +int Chat_ModulesLoaded(WPARAM, LPARAM)
  {
  	OptionsInit();
 - 	return 0;
 +	return 0;
  }
 diff --git a/plugins/Scriver/src/chat/message.cpp b/plugins/Scriver/src/chat/message.cpp index a417f3a51f..fe57ca5b57 100644 --- a/plugins/Scriver/src/chat/message.cpp +++ b/plugins/Scriver/src/chat/message.cpp @@ -21,16 +21,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.  #include "../commonheaders.h"
 -static int RTFColorToIndex(int *pIndex, int iCol, SESSION_INFO *si)
 -{
 -	MODULEINFO *pMod = pci->MM_FindModule(si->pszModule);
 -	for (int i = 0; i < pMod->nColorCount; i++)
 -		if (pIndex[i] == iCol)
 -			return i;
 -
 -	return -1;
 -}
 -
  static void CreateColorMap(char* Text, int *pIndex, SESSION_INFO *si)
  {
  	static const char* lpszFmt = "\\red%[^ \x5b\\]\\green%[^ \x5b\\]\\blue%[^ \x5b;];";
 diff --git a/plugins/Scriver/src/chat/options.cpp b/plugins/Scriver/src/chat/options.cpp index 09b24b9483..51e9fd2d51 100644 --- a/plugins/Scriver/src/chat/options.cpp +++ b/plugins/Scriver/src/chat/options.cpp @@ -728,7 +728,7 @@ static INT_PTR CALLBACK DlgProcOptionsPopup(HWND hwndDlg,UINT uMsg,WPARAM wParam  	return FALSE;
  }
 -static int OptionsInitialize(WPARAM wParam, LPARAM lParam)
 +static int OptionsInitialize(WPARAM wParam, LPARAM)
  {
  	if (g_dat.popupInstalled) {
  		OPTIONSDIALOGPAGE odp = { sizeof(odp) };
 diff --git a/plugins/Scriver/src/chat/window.cpp b/plugins/Scriver/src/chat/window.cpp index 9b1d60e7d5..baa47093a2 100644 --- a/plugins/Scriver/src/chat/window.cpp +++ b/plugins/Scriver/src/chat/window.cpp @@ -54,9 +54,8 @@ static LRESULT CALLBACK SplitterSubclassProc(HWND hwnd, UINT msg, WPARAM wParam,  			RECT rc;
  			GetClientRect(hwnd, &rc);
  			SetCursor(rc.right > rc.bottom ? hCurSplitNS : hCurSplitWE);
 -			return TRUE;
  		}
 -		return 0;
 +		return TRUE;
  	case WM_LBUTTONDOWN:
  		SetCapture(hwnd);
 @@ -758,7 +757,7 @@ static LRESULT CALLBACK LogSubclassProc(HWND hwnd, UINT msg, WPARAM wParam, LPAR  	return mir_callNextSubclass(hwnd, LogSubclassProc, msg, wParam, lParam);
  }
 -static void ProcessNickListHovering(HWND hwnd, int hoveredItem, POINT * pt, SESSION_INFO * parentdat)
 +static void ProcessNickListHovering(HWND hwnd, int hoveredItem, SESSION_INFO * parentdat)
  {
  	static int currentHovered = -1;
  	static HWND hwndToolTip = NULL;
 @@ -1024,9 +1023,9 @@ static LRESULT CALLBACK NicklistSubclassProc(HWND hwnd, UINT msg, WPARAM wParam,  			else
  				nItemUnderMouse &= 0xFFFF;
 -			ProcessNickListHovering(hwnd, (int)nItemUnderMouse, &pt, si);
 +			ProcessNickListHovering(hwnd, (int)nItemUnderMouse, si);
  		}
 -		else ProcessNickListHovering(hwnd, -1, &pt, NULL);
 +		else ProcessNickListHovering(hwnd, -1, NULL);
  	}
  	return mir_callNextSubclass(hwnd, NicklistSubclassProc, msg, wParam, lParam);
 @@ -1041,7 +1040,7 @@ int GetTextPixelSize(TCHAR* pszText, HFONT hFont, BOOL bWidth)  	HFONT hOldFont = (HFONT)SelectObject(hdc, hFont);
  	RECT rc = { 0 };
 -	int i = DrawText(hdc, pszText, -1, &rc, DT_CALCRECT);
 +	DrawText(hdc, pszText, -1, &rc, DT_CALCRECT);
  	SelectObject(hdc, hOldFont);
  	ReleaseDC(NULL, hdc);
  	return bWidth ? rc.right - rc.left : rc.bottom - rc.top;
 @@ -1530,7 +1529,6 @@ LABEL_SHOWWINDOW:  			pt.x = wParam; pt.y = 0;
  			ScreenToClient(hwndDlg, &pt);
 -			int oldSplitterX = si->iSplitterX;
  			si->iSplitterX = rc.right - pt.x + 1;
  			if (si->iSplitterX < 35)
  				si->iSplitterX = 35;
 @@ -1543,7 +1541,6 @@ LABEL_SHOWWINDOW:  			GetClientRect(hwndDlg, &rc);
  			pt.x = 0; pt.y = wParam;
  			ScreenToClient(hwndDlg, &pt);
 -			int oldSplitterY = si->iSplitterY;
  			si->iSplitterY = rc.bottom - pt.y;
  			g_Settings.iSplitterY = si->iSplitterY;
  		}
 @@ -2012,7 +2009,7 @@ LABEL_SHOWWINDOW:  	return FALSE;
  }
 -void ShowRoom(SESSION_INFO *si, WPARAM wp, BOOL bSetForeground)
 +void ShowRoom(SESSION_INFO *si, WPARAM, BOOL)
  {
  	if (si == NULL)
  		return;
 diff --git a/plugins/Scriver/src/globals.cpp b/plugins/Scriver/src/globals.cpp index ca0174e65e..8bf0853259 100644 --- a/plugins/Scriver/src/globals.cpp +++ b/plugins/Scriver/src/globals.cpp @@ -104,7 +104,7 @@ void RegisterIcons(void)  /////////////////////////////////////////////////////////////////////////////////////////
 -static int ackevent(WPARAM wParam, LPARAM lParam)
 +static int ackevent(WPARAM, LPARAM lParam)
  {
  	ACKDATA *pAck = (ACKDATA *)lParam;
  	if (!pAck)
 @@ -275,19 +275,6 @@ static struct { UINT cpId; const TCHAR *cpName; } cpTable[] =  	{ 1361, LPGENT("Korean (Johab)") }
  };
 -static BOOL CALLBACK LangAddCallback(CHAR * str)
 -{
 -	int i, count;
 -	UINT cp;
 -	cp = atoi(str);
 -	count = sizeof(cpTable) / sizeof(cpTable[0]);
 -	for (i = 0; i < count && cpTable[i].cpId != cp; i++);
 -	if (i < count)
 -		AppendMenu(g_dat.hMenuANSIEncoding, MF_STRING, cp, TranslateTS(cpTable[i].cpName));
 -
 -	return TRUE;
 -}
 -
  void LoadInfobarFonts()
  {
  	LOGFONT lf;
 diff --git a/plugins/Scriver/src/input.cpp b/plugins/Scriver/src/input.cpp index a0c3ba5d3b..b0febe51b2 100644 --- a/plugins/Scriver/src/input.cpp +++ b/plugins/Scriver/src/input.cpp @@ -29,7 +29,7 @@ enum KB_ACTIONS {KB_PREV_TAB = 1, KB_NEXT_TAB, KB_SWITCHTOOLBAR,  				 KB_SWITCHSTATUSBAR, KB_SWITCHTITLEBAR, KB_SWITCHINFOBAR, KB_MINIMIZE, KB_CLOSE, KB_CLEAR_LOG,
  				 KB_TAB1, KB_TAB2, KB_TAB3, KB_TAB4, KB_TAB5, KB_TAB6, KB_TAB7, KB_TAB8, KB_TAB9, KB_SEND_ALL, KB_PASTESEND, KB_QUOTE};
 -void InputAreaContextMenu(HWND hwnd, WPARAM wParam, LPARAM lParam, MCONTACT hContact)
 +void InputAreaContextMenu(HWND hwnd, WPARAM, LPARAM lParam, MCONTACT hContact)
  {
  	POINT pt;
  	CHARRANGE sel, all = { 0, -1 };
 @@ -239,7 +239,7 @@ int InputAreaShortcuts(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam, Common  					if (windowData->flags & CWDF_RTF_INPUT)
  						iLen = SetRichTextRTF(hwnd, cmdListNew->szCmd);
  					else
 -						iLen = SetRichTextEncoded(hwnd, cmdListNew->szCmd, windowData->codePage);
 +						iLen = SetRichTextEncoded(hwnd, cmdListNew->szCmd);
  					SendMessage(hwnd, EM_SCROLLCARET, 0, 0);
  					SendMessage(hwnd, WM_SETREDRAW, TRUE, 0);
 diff --git a/plugins/Scriver/src/msgdialog.cpp b/plugins/Scriver/src/msgdialog.cpp index e86b95068a..c0bc5bfa8c 100644 --- a/plugins/Scriver/src/msgdialog.cpp +++ b/plugins/Scriver/src/msgdialog.cpp @@ -45,17 +45,6 @@ static ToolbarButton toolbarButtons[] = {  	{LPGENT("Send"), IDOK, 1, 0, 38}
  };
 -static DWORD CALLBACK StreamOutCallback(DWORD_PTR dwCookie, LPBYTE pbBuff, LONG cb, LONG * pcb)
 -{
 -	MessageSendQueueItem *msi = (MessageSendQueueItem *) dwCookie;
 -	msi->sendBuffer = (char*)mir_realloc(msi->sendBuffer, msi->sendBufferSize + cb + 2);
 -	memcpy (msi->sendBuffer + msi->sendBufferSize, pbBuff, cb);
 -	msi->sendBufferSize += cb;
 -	*((TCHAR*)(msi->sendBuffer+msi->sendBufferSize)) = '\0';
 -	*pcb = cb;
 -    return 0;
 -}
 -
  static TCHAR* GetIEViewSelection(SrmmWindowData *dat)
  {
  	IEVIEWEVENT evt = { sizeof(evt) };
 @@ -668,7 +657,7 @@ static void NotifyTyping(SrmmWindowData *dat, int mode)  	CallService(MS_PROTO_SELFISTYPING, dat->windowData.hContact, dat->nTypeMode);
  }
 -static INT_PTR CALLBACK ConfirmSendAllDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
 +static INT_PTR CALLBACK ConfirmSendAllDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM)
  {
  	switch (msg) {
  	case WM_INITDIALOG:
 @@ -805,7 +794,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP  			else if (g_dat.flags & SMF_SAVEDRAFTS) {
  				TCmdList *draft = tcmdlist_get2(g_dat.draftList, dat->windowData.hContact);
  				if (draft != NULL)
 -					len = SetRichTextEncoded(GetDlgItem(hwndDlg, IDC_MESSAGE), draft->szCmd, dat->windowData.codePage);
 +					len = SetRichTextEncoded(GetDlgItem(hwndDlg, IDC_MESSAGE), draft->szCmd);
  				PostMessage(GetDlgItem(hwndDlg, IDC_MESSAGE), EM_SETSEL, len, len);
  			}
 @@ -883,7 +872,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP  						dbei.cbBlob = 0;
  						dat->hDbEventFirst = hPrevEvent;
  						db_event_get(dat->hDbEventFirst, &dbei);
 -						if (!DbEventIsShown(&dbei, dat))
 +						if (!DbEventIsShown(dbei))
  							i++;
  					}
  					break;
 @@ -905,7 +894,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP  						db_event_get(hPrevEvent, &dbei);
  						if (dbei.timestamp < firstTime)
  							break;
 -						if (DbEventIsShown(&dbei, dat))
 +						if (DbEventIsShown(dbei))
  							dat->hDbEventFirst = hPrevEvent;
  						hPrevEvent = db_event_prev(dat->windowData.hContact, hPrevEvent);
  					}
 @@ -1365,7 +1354,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP  			db_event_get(hDbEvent, &dbei);
  			if (dat->hDbEventFirst == NULL)
  				dat->hDbEventFirst = hDbEvent;
 -			if (DbEventIsShown(&dbei, dat)) {
 +			if (DbEventIsShown(dbei)) {
  				if (dbei.eventType == EVENTTYPE_MESSAGE && !(dbei.flags & (DBEF_SENT))) {
  					/* store the event when the container is hidden so that clist notifications can be removed */
  					if (!IsWindowVisible(GetParent(hwndDlg)) && dat->hDbUnreadEventFirst == NULL)
 diff --git a/plugins/Scriver/src/msglog.cpp b/plugins/Scriver/src/msglog.cpp index 333e373db4..378e0d38fa 100644 --- a/plugins/Scriver/src/msglog.cpp +++ b/plugins/Scriver/src/msglog.cpp @@ -133,9 +133,9 @@ int DbEventIsMessageOrCustom(DBEVENTINFO* dbei)  	return dbei->eventType == EVENTTYPE_MESSAGE || DbEventIsCustomForMsgWindow(dbei);
  }
 -int DbEventIsShown(DBEVENTINFO * dbei, SrmmWindowData *dat)
 +int DbEventIsShown(DBEVENTINFO &dbei)
  {
 -	switch (dbei->eventType) {
 +	switch (dbei.eventType) {
  	case EVENTTYPE_MESSAGE:
  		return 1;
 @@ -148,7 +148,7 @@ int DbEventIsShown(DBEVENTINFO * dbei, SrmmWindowData *dat)  		return 1;
  	}
 -	return DbEventIsCustomForMsgWindow(dbei);
 +	return DbEventIsCustomForMsgWindow(&dbei);
  }
  EventData* getEventFromDB(SrmmWindowData *dat, MCONTACT hContact, HANDLE hDbEvent)
 @@ -159,7 +159,7 @@ EventData* getEventFromDB(SrmmWindowData *dat, MCONTACT hContact, HANDLE hDbEven  		return NULL;
  	dbei.pBlob = (PBYTE)mir_alloc(dbei.cbBlob);
  	db_event_get(hDbEvent, &dbei);
 -	if (!DbEventIsShown(&dbei, dat)) {
 +	if (!DbEventIsShown(dbei)) {
  		mir_free(dbei.pBlob);
  		return NULL;
  	}
 @@ -327,7 +327,7 @@ static int AppendUnicodeToBuffer(char *&buffer, size_t &cbBufferEnd, size_t &cbB  }
  // mir_free() the return value
 -static char* CreateRTFHeader(SrmmWindowData *dat, GlobalMessageData *gdat)
 +static char* CreateRTFHeader()
  {
  	HDC hdc = GetDC(NULL);
  	logPixelSY = GetDeviceCaps(hdc, LOGPIXELSY);
 @@ -744,7 +744,7 @@ static DWORD CALLBACK LogStreamInEvents(DWORD_PTR dwCookie, LPBYTE pbBuff, LONG  		dat->bufferOffset = 0;
  		switch (dat->stage) {
  		case STREAMSTAGE_HEADER:
 -			dat->buffer = CreateRTFHeader(dat->dlgDat, dat->gdat);
 +			dat->buffer = CreateRTFHeader();
  			dat->stage = STREAMSTAGE_EVENTS;
  			break;
  		case STREAMSTAGE_EVENTS:
 diff --git a/plugins/Scriver/src/msgoptions.cpp b/plugins/Scriver/src/msgoptions.cpp index 682bf76cbe..45f515f07a 100644 --- a/plugins/Scriver/src/msgoptions.cpp +++ b/plugins/Scriver/src/msgoptions.cpp @@ -95,7 +95,7 @@ static const colourOptionsList[] = {  	{ LPGENT("Line between messages"), SRMSGSET_LINECOLOUR, 0, COLOR_3DLIGHT},
  };
 -int FontServiceFontsChanged(WPARAM wParam, LPARAM lParam)
 +int FontServiceFontsChanged(WPARAM, LPARAM)
  {
  	LoadMsgLogIcons();
  	LoadInfobarFonts();
 @@ -103,11 +103,6 @@ int FontServiceFontsChanged(WPARAM wParam, LPARAM lParam)  	return 0;
  }
 -static BYTE MsgDlgGetFontDefaultCharset(const TCHAR *szFont)
 -{
 -	return DEFAULT_CHARSET;
 -}
 -
  void RegisterFontServiceFonts()
  {
  	int i;
 @@ -126,7 +121,7 @@ void RegisterFontServiceFonts()  		fid.deffontsettings.colour = fontOptionsList[i].defColour;
  		fid.deffontsettings.size = fontOptionsList[i].defSize;
  		fid.deffontsettings.style = fontOptionsList[i].defStyle;
 -		fid.deffontsettings.charset = MsgDlgGetFontDefaultCharset(fontOptionsList[i].szDefFace);
 +		fid.deffontsettings.charset = DEFAULT_CHARSET;
  		_tcsncpy(fid.deffontsettings.szFace, fontOptionsList[i].szDefFace, SIZEOF(fid.deffontsettings.szFace));
  		_tcsncpy(fid.backgroundName, fontOptionsList[i].szBkgName, SIZEOF(fid.backgroundName));
  		FontRegisterT(&fid);
 @@ -149,7 +144,7 @@ void RegisterFontServiceFonts()  	}
  }
 -int IconsChanged(WPARAM wParam, LPARAM lParam)
 +int IconsChanged(WPARAM, LPARAM)
  {
  	ReleaseIcons();
  	LoadGlobalIcons();
 @@ -161,7 +156,7 @@ int IconsChanged(WPARAM wParam, LPARAM lParam)  	return 0;
  }
 -int SmileySettingsChanged(WPARAM wParam, LPARAM lParam)
 +int SmileySettingsChanged(WPARAM wParam, LPARAM)
  {
  	WindowList_Broadcast(g_dat.hMessageWindowList, DM_REMAKELOG, wParam, 0);
  	return 0;
 @@ -201,7 +196,7 @@ void LoadMsgDlgFont(int i, LOGFONT *lf, COLORREF *colour)  			_tcsncpy(lf->lfFaceName, tszFace, SIZEOF(lf->lfFaceName));
  		mir_snprintf(str, SIZEOF(str), "%s%dSet", "SRMFont", i);
 -		lf->lfCharSet = db_get_b(NULL, SRMMMOD, str, MsgDlgGetFontDefaultCharset(lf->lfFaceName));
 +		lf->lfCharSet = db_get_b(NULL, SRMMMOD, str, DEFAULT_CHARSET);
  	}
  }
 @@ -956,7 +951,7 @@ static INT_PTR CALLBACK DlgProcTypeOptions(HWND hwndDlg, UINT msg, WPARAM wParam  	return FALSE;
  }
 -int OptInitialise(WPARAM wParam, LPARAM lParam)
 +int OptInitialise(WPARAM wParam, LPARAM)
  {
  	OPTIONSDIALOGPAGE odp = { sizeof(odp) };
  	odp.position = 910000000;
 diff --git a/plugins/Scriver/src/msgs.cpp b/plugins/Scriver/src/msgs.cpp index 9d2938f0ac..7f982177e8 100644 --- a/plugins/Scriver/src/msgs.cpp +++ b/plugins/Scriver/src/msgs.cpp @@ -72,7 +72,7 @@ int IsAutoPopup(MCONTACT hContact) {  	return 0;
  }
 -static INT_PTR ReadMessageCommand(WPARAM wParam, LPARAM lParam)
 +static INT_PTR ReadMessageCommand(WPARAM, LPARAM lParam)
  {
  	CLISTEVENT *pcle = (CLISTEVENT*)lParam;
  	MCONTACT hContact = db_mc_tryMeta(pcle->hContact);
 @@ -184,7 +184,7 @@ static INT_PTR SendMessageCommand(WPARAM hContact, LPARAM lParam)  /////////////////////////////////////////////////////////////////////////////////////////
 -static INT_PTR TypingMessageCommand(WPARAM wParam, LPARAM lParam)
 +static INT_PTR TypingMessageCommand(WPARAM, LPARAM lParam)
  {
  	CLISTEVENT *cle = (CLISTEVENT*)lParam;
  	if (cle)
 @@ -242,7 +242,7 @@ static int MessageSettingChanged(WPARAM hContact, LPARAM lParam)  	return 0;
  }
 -static int ContactDeleted(WPARAM wParam, LPARAM lParam)
 +static int ContactDeleted(WPARAM wParam, LPARAM)
  {
  	HWND hwnd;
  	if ((hwnd = WindowList_Find(g_dat.hMessageWindowList, wParam)))
 @@ -291,7 +291,7 @@ static void RestoreUnreadMessageAlerts(void)  	}
  }
 -static INT_PTR GetWindowAPI(WPARAM wParam, LPARAM lParam)
 +static INT_PTR GetWindowAPI(WPARAM, LPARAM)
  {
  	return PLUGIN_MAKE_VERSION(0,0,0,3);
  }
 @@ -346,7 +346,7 @@ static INT_PTR SetStatusText(WPARAM wParam, LPARAM lParam)  	return 0;
  }
 -static int PrebuildContactMenu(WPARAM hContact, LPARAM lParam)
 +static int PrebuildContactMenu(WPARAM hContact, LPARAM)
  {
  	if (hContact == 0)
  		return 0;
 @@ -432,7 +432,7 @@ int StatusIconPressed(WPARAM wParam, LPARAM lParam)  	return 0;
  }
 -static int ModuleLoad(WPARAM wParam, LPARAM lParam)
 +static int ModuleLoad(WPARAM, LPARAM)
  {
  	g_dat.smileyAddInstalled = ServiceExists(MS_SMILEYADD_SHOWSELECTION) && ServiceExists(MS_SMILEYADD_REPLACESMILEYS);
  	g_dat.popupInstalled = ServiceExists(MS_POPUP_ADDPOPUPT);
 @@ -604,37 +604,37 @@ STDMETHODIMP_(ULONG) CREOleCallback::Release()  	return refCount;
  }
 -STDMETHODIMP CREOleCallback::ContextSensitiveHelp(BOOL fEnterMode)
 +STDMETHODIMP CREOleCallback::ContextSensitiveHelp(BOOL)
  {
  	return S_OK;
  }
 -STDMETHODIMP CREOleCallback::DeleteObject(LPOLEOBJECT lpoleobj)
 +STDMETHODIMP CREOleCallback::DeleteObject(LPOLEOBJECT)
  {
  	return S_OK;
  }
 -STDMETHODIMP CREOleCallback::GetClipboardData(CHARRANGE * lpchrg, DWORD reco, LPDATAOBJECT * lplpdataobj)
 +STDMETHODIMP CREOleCallback::GetClipboardData(CHARRANGE*, DWORD, LPDATAOBJECT*)
  {
  	return E_NOTIMPL;
  }
 -STDMETHODIMP CREOleCallback::GetContextMenu(WORD seltype, LPOLEOBJECT lpoleobj, CHARRANGE * lpchrg, HMENU * lphmenu)
 +STDMETHODIMP CREOleCallback::GetContextMenu(WORD, LPOLEOBJECT, CHARRANGE*, HMENU*)
  {
  	return E_INVALIDARG;
  }
 -STDMETHODIMP CREOleCallback::GetDragDropEffect(BOOL fDrag, DWORD grfKeyState, LPDWORD pdwEffect)
 +STDMETHODIMP CREOleCallback::GetDragDropEffect(BOOL, DWORD, LPDWORD)
  {
  	return S_OK;
  }
 -STDMETHODIMP CREOleCallback::GetInPlaceContext(LPOLEINPLACEFRAME * lplpFrame, LPOLEINPLACEUIWINDOW * lplpDoc, LPOLEINPLACEFRAMEINFO lpFrameInfo)
 +STDMETHODIMP CREOleCallback::GetInPlaceContext(LPOLEINPLACEFRAME*, LPOLEINPLACEUIWINDOW*, LPOLEINPLACEFRAMEINFO)
  {
  	return E_INVALIDARG;
  }
 -STDMETHODIMP CREOleCallback::GetNewStorage(LPSTORAGE * lplpstg)
 +STDMETHODIMP CREOleCallback::GetNewStorage(LPSTORAGE *lplpstg)
  {
  	TCHAR sztName[64];
  	mir_sntprintf(sztName, SIZEOF(sztName), _T("s%u"), nextStgId++);
 @@ -643,22 +643,22 @@ STDMETHODIMP CREOleCallback::GetNewStorage(LPSTORAGE * lplpstg)  	return pictStg->CreateStorage(sztName, STGM_READWRITE | STGM_SHARE_EXCLUSIVE | STGM_CREATE, 0, 0, lplpstg);
  }
 -STDMETHODIMP CREOleCallback::QueryAcceptData(LPDATAOBJECT lpdataobj, CLIPFORMAT * lpcfFormat, DWORD reco, BOOL fReally, HGLOBAL hMetaPict)
 +STDMETHODIMP CREOleCallback::QueryAcceptData(LPDATAOBJECT, CLIPFORMAT*, DWORD, BOOL, HGLOBAL)
  {
  	return S_OK;
  }
 -STDMETHODIMP CREOleCallback::QueryInsertObject(LPCLSID lpclsid, LPSTORAGE lpstg, LONG cp)
 +STDMETHODIMP CREOleCallback::QueryInsertObject(LPCLSID, LPSTORAGE, LONG)
  {
  	return S_OK;
  }
 -STDMETHODIMP CREOleCallback::ShowContainerUI(BOOL fShow)
 +STDMETHODIMP CREOleCallback::ShowContainerUI(BOOL)
  {
  	return S_OK;
  }
 -STDMETHODIMP CREOleCallback2::QueryAcceptData(LPDATAOBJECT lpdataobj, CLIPFORMAT * lpcfFormat, DWORD reco, BOOL fReally, HGLOBAL hMetaPict)
 +STDMETHODIMP CREOleCallback2::QueryAcceptData(LPDATAOBJECT, CLIPFORMAT *lpcfFormat, DWORD, BOOL, HGLOBAL)
  {
  	*lpcfFormat = CF_TEXT;
  	return S_OK;
 diff --git a/plugins/Scriver/src/msgs.h b/plugins/Scriver/src/msgs.h index aa2fcda2f9..f73587fc04 100644 --- a/plugins/Scriver/src/msgs.h +++ b/plugins/Scriver/src/msgs.h @@ -223,7 +223,7 @@ struct CREOleCallback2 : public CREOleCallback  INT_PTR CALLBACK DlgProcParentWindow(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
  INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
  INT_PTR CALLBACK ErrorDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
 -int DbEventIsShown(DBEVENTINFO *dbei, SrmmWindowData *dat);
 +int DbEventIsShown(DBEVENTINFO &dbei);
  int DbEventIsCustomForMsgWindow(DBEVENTINFO *dbei);
  int DbEventIsMessageOrCustom(DBEVENTINFO *dbei);
  void StreamInEvents(HWND hwndDlg, HANDLE hDbEventFirst, int count, int fAppend);
 diff --git a/plugins/Scriver/src/msgwindow.cpp b/plugins/Scriver/src/msgwindow.cpp index 2e76de9cdf..a65d4d5b1a 100644 --- a/plugins/Scriver/src/msgwindow.cpp +++ b/plugins/Scriver/src/msgwindow.cpp @@ -332,7 +332,7 @@ static void AddChild(ParentWindowData *dat, HWND hwnd, MCONTACT hContact)  	tci.lParam = (LPARAM)mwtd;
  	tci.iImage = -1;
  	tci.pszText = _T("");
 -	int tabId = TabCtrl_InsertItem(dat->hwndTabs, dat->childrenCount - 1, &tci);
 +	TabCtrl_InsertItem(dat->hwndTabs, dat->childrenCount - 1, &tci);
  	SetWindowPos(mwtd->hwnd, HWND_TOP, dat->childRect.left, dat->childRect.top, dat->childRect.right - dat->childRect.left, dat->childRect.bottom - dat->childRect.top, SWP_HIDEWINDOW);
  	SendMessage(dat->hwnd, WM_SIZE, 0, 0);
 @@ -1386,7 +1386,7 @@ INT_PTR CALLBACK DlgProcParentWindow(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR  	return FALSE;
  }
 -static void DrawTab(ParentWindowData *dat, HWND hwnd, WPARAM wParam, LPARAM lParam)
 +static void DrawTab(ParentWindowData *dat, HWND hwnd, WPARAM, LPARAM lParam)
  {
  	LPDRAWITEMSTRUCT lpDIS = (LPDRAWITEMSTRUCT)lParam;
  	int iTabIndex = lpDIS->itemID;
 @@ -1395,7 +1395,7 @@ static void DrawTab(ParentWindowData *dat, HWND hwnd, WPARAM wParam, LPARAM lPar  	TabCtrlData *tcdat = (TabCtrlData*)GetWindowLongPtr(hwnd, GWLP_USERDATA);
  	HANDLE hTheme = NULL;
 -	int tstate;
 +	int tstate = 0;
  	TCHAR szLabel[1024];
  	TCITEM tci;
  	tci.mask = TCIF_TEXT | TCIF_IMAGE | TCIF_STATE;
 diff --git a/plugins/Scriver/src/srmm.cpp b/plugins/Scriver/src/srmm.cpp index c36b95736d..33d51c4722 100644 --- a/plugins/Scriver/src/srmm.cpp +++ b/plugins/Scriver/src/srmm.cpp @@ -47,13 +47,13 @@ PLUGININFOEX pluginInfo = {  	{ 0x84636f78, 0x2057, 0x4302, { 0x8a, 0x65, 0x23, 0xa1, 0x6d, 0x46, 0x84, 0x4c } }
  };
 -BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
 +BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD, LPVOID)
  {
  	g_hInst = hinstDLL;
  	return TRUE;
  }
 -extern "C" __declspec(dllexport) PLUGININFOEX *MirandaPluginInfoEx(DWORD mirandaVersion)
 +extern "C" __declspec(dllexport) PLUGININFOEX *MirandaPluginInfoEx(DWORD)
  {
  	return &pluginInfo;
  }
 diff --git a/plugins/Scriver/src/utils.cpp b/plugins/Scriver/src/utils.cpp index 0ac1589bc7..b40a5272fe 100644 --- a/plugins/Scriver/src/utils.cpp +++ b/plugins/Scriver/src/utils.cpp @@ -124,7 +124,7 @@ char *GetRichTextEncoded(HWND hwnd, int codepage)  	return textUtf;
  }
 -int SetRichTextEncoded(HWND hwnd, const char *text, int codepage)
 +int SetRichTextEncoded(HWND hwnd, const char *text)
  {
  	TCHAR *textToSet;
  	SETTEXTEX  st;
 @@ -287,7 +287,7 @@ void AppendToBuffer(char *&buffer, size_t &cbBufferEnd, size_t &cbBufferAlloced,  }
 -int MeasureMenuItem(WPARAM wParam, LPARAM lParam)
 +int MeasureMenuItem(WPARAM, LPARAM lParam)
  {
  	LPMEASUREITEMSTRUCT mis = (LPMEASUREITEMSTRUCT)lParam;
  	if (mis->itemData != (ULONG_PTR)g_dat.hButtonIconList && mis->itemData != (ULONG_PTR)g_dat.hSearchEngineIconList && mis->itemData != (ULONG_PTR)g_dat.hChatButtonIconList) {
 @@ -298,7 +298,7 @@ int MeasureMenuItem(WPARAM wParam, LPARAM lParam)  	return TRUE;
  }
 -int DrawMenuItem(WPARAM wParam, LPARAM lParam)
 +int DrawMenuItem(WPARAM, LPARAM lParam)
  {
  	int y;
  	int id;
 diff --git a/plugins/Scriver/src/utils.h b/plugins/Scriver/src/utils.h index bcb81d4a49..bd5464e7f2 100644 --- a/plugins/Scriver/src/utils.h +++ b/plugins/Scriver/src/utils.h @@ -44,7 +44,7 @@ char* GetRichTextRTF(HWND hwnd);  char* GetRichTextEncoded(HWND hwnd, int codepage);
  TCHAR *GetRichTextWord(HWND hwnd, POINTL *pt);
  int SetRichTextRTF(HWND hwnd, const char *text);
 -int SetRichTextEncoded(HWND hwnd, const char *text, int codepage);
 +int SetRichTextEncoded(HWND hwnd, const char *text);
  void SearchWord(TCHAR * word, int engine);
  HDWP ResizeToolbar(HWND hwnd, HDWP hdwp, int width, int vPos, int height, int cControls, const ToolbarButton * buttons, int controlVisibility);
  void ShowToolbarControls(HWND hwndDlg, int cControls, const ToolbarButton * buttons, int controlVisibility, int state);
 | 
