summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugins/YARelay/src/main.cpp11
-rw-r--r--plugins/YARelay/src/options.cpp2
-rw-r--r--plugins/YARelay/src/stdafx.h2
3 files changed, 8 insertions, 7 deletions
diff --git a/plugins/YARelay/src/main.cpp b/plugins/YARelay/src/main.cpp
index 668b5adf65..8a7974b621 100644
--- a/plugins/YARelay/src/main.cpp
+++ b/plugins/YARelay/src/main.cpp
@@ -54,7 +54,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL,DWORD fdwReason,LPVOID lpvReserved)
/**
* Protocols àcknowledgement
*/
-int ProtoAck(WPARAM wparam,LPARAM lparam)
+int ProtoAck(WPARAM,LPARAM lparam)
{
ACKDATA *pAck = (ACKDATA *)lparam;
if (pAck->type != ACKTYPE_MESSAGE || pAck->result != ACKRESULT_SUCCESS)
@@ -112,6 +112,7 @@ static int MessageEventAdded(WPARAM hContact, LPARAM hDBEvent)
case ID_STATUS_DND: statMask = STATUS_DND ;break;
case ID_STATUS_FREECHAT: statMask = STATUS_FREECHAT ;break;
case ID_STATUS_INVISIBLE:statMask = STATUS_INVISIBLE;break;
+ default: return 0;
}
if ((iForwardOnStatus & statMask) == 0)
return 0;
@@ -238,10 +239,10 @@ extern "C" int __declspec(dllexport) Load()
iForwardOnStatus = db_get_dw(NULL, "yaRelay", "ForwardOnStatus", STATUS_OFFLINE | STATUS_AWAY | STATUS_NA);
- DBVARIANT dbv;
- if (!db_get_ts(NULL, "yaRelay", "ForwardTemplate", &dbv)){
- _tcsncpy(tszForwardTemplate, dbv.ptszVal, SIZEOF(tszForwardTemplate));
- db_free(&dbv);
+ TCHAR *szForwardTemplate = db_get_tsa(NULL, "yaRelay", "ForwardTemplate");
+ if (szForwardTemplate){
+ _tcsncpy(tszForwardTemplate, szForwardTemplate, SIZEOF(tszForwardTemplate));
+ mir_free(szForwardTemplate);
}
else _tcsncpy(tszForwardTemplate, _T("%u: %m"), MAXTEMPLATESIZE-1);
diff --git a/plugins/YARelay/src/options.cpp b/plugins/YARelay/src/options.cpp
index 5db185b7bd..6a6a42bd98 100644
--- a/plugins/YARelay/src/options.cpp
+++ b/plugins/YARelay/src/options.cpp
@@ -189,7 +189,7 @@ static INT_PTR CALLBACK OptionsFrameProc(HWND hwndDlg, UINT uMsg, WPARAM wParam,
/**
* Init options panel
*/
-int OptionsInit(WPARAM wParam, LPARAM lParam)
+int OptionsInit(WPARAM wParam, LPARAM)
{
OPTIONSDIALOGPAGE odp = { sizeof(odp) };
odp.hInstance = hInst;
diff --git a/plugins/YARelay/src/stdafx.h b/plugins/YARelay/src/stdafx.h
index 5b1543f6c4..c2f40604ce 100644
--- a/plugins/YARelay/src/stdafx.h
+++ b/plugins/YARelay/src/stdafx.h
@@ -61,4 +61,4 @@ struct MESSAGE_PROC
extern LIST<MESSAGE_PROC> arMessageProcs;
-int OptionsInit(WPARAM wParam, LPARAM lParam);
+int OptionsInit(WPARAM wParam, LPARAM);