summaryrefslogtreecommitdiff
path: root/plugins/Weather
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Weather')
-rw-r--r--plugins/Weather/src/weather.cpp10
-rw-r--r--plugins/Weather/src/weather_addstn.cpp10
-rw-r--r--plugins/Weather/src/weather_contacts.cpp8
-rw-r--r--plugins/Weather/src/weather_data.cpp2
-rw-r--r--plugins/Weather/src/weather_info.cpp2
-rw-r--r--plugins/Weather/src/weather_ini.cpp4
-rw-r--r--plugins/Weather/src/weather_mwin.cpp6
-rw-r--r--plugins/Weather/src/weather_svcs.cpp14
-rw-r--r--plugins/Weather/src/weather_update.cpp15
-rw-r--r--plugins/Weather/src/weather_userinfo.cpp2
10 files changed, 36 insertions, 37 deletions
diff --git a/plugins/Weather/src/weather.cpp b/plugins/Weather/src/weather.cpp
index a4481b2605..749ed697cf 100644
--- a/plugins/Weather/src/weather.cpp
+++ b/plugins/Weather/src/weather.cpp
@@ -74,18 +74,18 @@ static const PLUGININFOEX pluginInfoEx =
{0x6b612a34, 0xdcf2, 0x4e32, {0x85, 0xcf, 0xb6, 0xfd, 0x0, 0x6b, 0x74, 0x5e}}
};
-extern "C" __declspec(dllexport) const PLUGININFOEX* MirandaPluginInfoEx(DWORD mirandaVersion)
+extern "C" __declspec(dllexport) const PLUGININFOEX* MirandaPluginInfoEx(DWORD)
{
return &pluginInfoEx;
}
-BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
+BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD, LPVOID)
{
hInst = hinstDLL;
return TRUE;
}
-int WeatherShutdown(WPARAM wParam,LPARAM lParam)
+int WeatherShutdown(WPARAM, LPARAM)
{
KillTimer(NULL, timerId); // kill update timer
@@ -101,7 +101,7 @@ int WeatherShutdown(WPARAM wParam,LPARAM lParam)
return 0;
}
-int OnToolbarLoaded(WPARAM wParam, LPARAM lParam)
+int OnToolbarLoaded(WPARAM, LPARAM)
{
TTBButton ttb = { 0 };
ttb.name = LPGEN("Enable/disable auto update");
@@ -117,7 +117,7 @@ int OnToolbarLoaded(WPARAM wParam, LPARAM lParam)
// weather protocol initialization function
// run after the event ME_SYSTEM_MODULESLOADED occurs
-int WeatherInit(WPARAM wParam,LPARAM lParam)
+int WeatherInit(WPARAM, LPARAM)
{
// initialize netlib
NetlibInit();
diff --git a/plugins/Weather/src/weather_addstn.cpp b/plugins/Weather/src/weather_addstn.cpp
index 85b4be596c..f8d54ad42e 100644
--- a/plugins/Weather/src/weather_addstn.cpp
+++ b/plugins/Weather/src/weather_addstn.cpp
@@ -32,7 +32,7 @@ static TCHAR name1[256];
// protocol service function for adding a new contact onto contact list
// lParam = PROTOSEARCHRESULT
-INT_PTR WeatherAddToList(WPARAM wParam, LPARAM lParam)
+INT_PTR WeatherAddToList(WPARAM, LPARAM lParam)
{
PROTOSEARCHRESULT *psr = (PROTOSEARCHRESULT*)lParam;
if(!psr || !psr->email.t)
@@ -136,7 +136,7 @@ BOOL CheckSearch() {
static TCHAR sID[32];
// A timer process for the ID search (threaded)
-static void __cdecl BasicSearchTimerProc(LPVOID hWnd)
+static void __cdecl BasicSearchTimerProc(LPVOID)
{
int result;
// search only when it's not current updating weather.
@@ -152,7 +152,7 @@ static void __cdecl BasicSearchTimerProc(LPVOID hWnd)
// the service function for ID search
// lParam = ID search string
-INT_PTR WeatherBasicSearch(WPARAM wParam, LPARAM lParam)
+INT_PTR WeatherBasicSearch(WPARAM, LPARAM lParam)
{
if (searchId != -1) return 0; //only one search at a time
_tcsncpy(sID, ( TCHAR* )lParam, _countof(sID));
@@ -166,7 +166,7 @@ INT_PTR WeatherBasicSearch(WPARAM wParam, LPARAM lParam)
// ============ NAME SEARCH ============
// name search timer process (threaded)
-static void __cdecl NameSearchTimerProc(LPVOID hWnd)
+static void __cdecl NameSearchTimerProc(LPVOID)
{
// search only when it's not current updating weather.
if (CheckSearch())
@@ -180,7 +180,7 @@ static void __cdecl NameSearchTimerProc(LPVOID hWnd)
searchId = -1;
}
-static INT_PTR CALLBACK WeatherSearchAdvancedDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
+static INT_PTR CALLBACK WeatherSearchAdvancedDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM)
{
switch (msg) {
case WM_INITDIALOG:
diff --git a/plugins/Weather/src/weather_contacts.cpp b/plugins/Weather/src/weather_contacts.cpp
index 84ced72294..16dcf7d3ce 100644
--- a/plugins/Weather/src/weather_contacts.cpp
+++ b/plugins/Weather/src/weather_contacts.cpp
@@ -55,7 +55,7 @@ INT_PTR ViewLog(WPARAM wParam, LPARAM lParam)
// read complete forecast
// wParam = current contact
-INT_PTR LoadForecast(WPARAM wParam, LPARAM lParam)
+INT_PTR LoadForecast(WPARAM wParam, LPARAM)
{
TCHAR id[256], loc2[256];
GetStationID(wParam, id, _countof(id));
@@ -73,7 +73,7 @@ INT_PTR LoadForecast(WPARAM wParam, LPARAM lParam)
// load weather map
// wParam = current contact
-INT_PTR WeatherMap(WPARAM wParam, LPARAM lParam)
+INT_PTR WeatherMap(WPARAM wParam, LPARAM)
{
TCHAR id[256], loc2[256];
GetStationID(wParam, id, _countof(id));
@@ -95,7 +95,7 @@ INT_PTR WeatherMap(WPARAM wParam, LPARAM lParam)
// show edit settings dialog
// wParam = current contact
-INT_PTR EditSettings(WPARAM wParam, LPARAM lParam)
+INT_PTR EditSettings(WPARAM wParam, LPARAM)
{
HWND hEditDlg = WindowList_Find(hWindowList, wParam);
@@ -426,7 +426,7 @@ INT_PTR CALLBACK DlgProcChange(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPa
// when a contact is deleted, make sure some other contact take over the default station
// wParam = deleted contact
-int ContactDeleted(WPARAM wParam, LPARAM lParam)
+int ContactDeleted(WPARAM wParam, LPARAM)
{
if (!IsMyContact(wParam))
return 0;
diff --git a/plugins/Weather/src/weather_data.cpp b/plugins/Weather/src/weather_data.cpp
index c49194e720..d9aac9ab94 100644
--- a/plugins/Weather/src/weather_data.cpp
+++ b/plugins/Weather/src/weather_data.cpp
@@ -424,7 +424,7 @@ int GetWeatherDataFromDB(const char *szSetting, LPARAM lparam)
// remove or display the weather information for a contact
// hContact - the contact in which the info is going to be removed
-void DBDataManage(MCONTACT hContact, WORD Mode, WPARAM wParam, LPARAM lParam)
+void DBDataManage(MCONTACT hContact, WORD Mode, WPARAM wParam, LPARAM)
{
LIST<char> arSettings(10);
diff --git a/plugins/Weather/src/weather_info.cpp b/plugins/Weather/src/weather_info.cpp
index 7b24cbc804..4e865b42aa 100644
--- a/plugins/Weather/src/weather_info.cpp
+++ b/plugins/Weather/src/weather_info.cpp
@@ -103,7 +103,7 @@ columns[] =
};
-INT_PTR CALLBACK DlgProcINIPage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
+INT_PTR CALLBACK DlgProcINIPage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM)
{
switch (msg)
{
diff --git a/plugins/Weather/src/weather_ini.cpp b/plugins/Weather/src/weather_ini.cpp
index 3a55f8554d..946f98cf8f 100644
--- a/plugins/Weather/src/weather_ini.cpp
+++ b/plugins/Weather/src/weather_ini.cpp
@@ -94,9 +94,7 @@ void WIItemListAdd(WIDATAITEM *DataItem, WIDATA *Data)
// name = the string to store in the "name" field
void ResetDataItem(WIDATAITEM *Item, const TCHAR *name)
{
- TCHAR str[] = _T("ID Search - Station Name");
- Item->Name = ( TCHAR* )mir_alloc( sizeof(str));
- mir_tstrcpy(Item->Name, str);
+ Item->Name = mir_tstrdup(name);
Item->Start = _T("");
Item->End = _T("");
Item->Unit = _T("");
diff --git a/plugins/Weather/src/weather_mwin.cpp b/plugins/Weather/src/weather_mwin.cpp
index 7d24297c9f..4390e86058 100644
--- a/plugins/Weather/src/weather_mwin.cpp
+++ b/plugins/Weather/src/weather_mwin.cpp
@@ -291,7 +291,7 @@ void UpdateMwinData(MCONTACT hContact)
}
-INT_PTR Mwin_MenuClicked(WPARAM wParam,LPARAM lParam)
+INT_PTR Mwin_MenuClicked(WPARAM wParam, LPARAM)
{
BOOL addwnd = WindowList_Find(hMwinWindowList, wParam) == NULL;
if (addwnd)
@@ -302,7 +302,7 @@ INT_PTR Mwin_MenuClicked(WPARAM wParam,LPARAM lParam)
}
-int BuildContactMenu(WPARAM wparam,LPARAM lparam)
+int BuildContactMenu(WPARAM wparam,LPARAM)
{
int flags = db_get_dw((MCONTACT)wparam, WEATHERPROTONAME, "mwin", 0) ? CMIF_CHECKED : 0;
Menu_ModifyItem(hMwinMenu, NULL, INVALID_HANDLE_VALUE, flags);
@@ -310,7 +310,7 @@ int BuildContactMenu(WPARAM wparam,LPARAM lparam)
}
-int RedrawFrame(WPARAM wParam, LPARAM lParam)
+int RedrawFrame(WPARAM, LPARAM)
{
WindowList_Broadcast(hMwinWindowList, WM_REDRAWWIN, 0, 0);
return 0;
diff --git a/plugins/Weather/src/weather_svcs.cpp b/plugins/Weather/src/weather_svcs.cpp
index 972670128e..09af852326 100644
--- a/plugins/Weather/src/weather_svcs.cpp
+++ b/plugins/Weather/src/weather_svcs.cpp
@@ -32,7 +32,7 @@ static HGENMENU hEnableDisableMenu;
//============ MIRANDA PROTOCOL SERVICES ============
// protocol service function for setting weather protocol status
-INT_PTR WeatherSetStatus(WPARAM new_status, LPARAM lParam)
+INT_PTR WeatherSetStatus(WPARAM new_status, LPARAM)
{
new_status = new_status != ID_STATUS_OFFLINE ? ID_STATUS_ONLINE : ID_STATUS_OFFLINE;
@@ -51,7 +51,7 @@ INT_PTR WeatherSetStatus(WPARAM new_status, LPARAM lParam)
}
// get capabilities protocol service function
-INT_PTR WeatherGetCaps(WPARAM wParam, LPARAM lParam)
+INT_PTR WeatherGetCaps(WPARAM wParam, LPARAM)
{
INT_PTR ret = 0;
@@ -96,13 +96,13 @@ INT_PTR WeatherGetName(WPARAM wParam,LPARAM lParam)
}
// protocol service function to get the current status of the protocol
-INT_PTR WeatherGetStatus(WPARAM wParam,LPARAM lParam)
+INT_PTR WeatherGetStatus(WPARAM, LPARAM)
{
return status;
}
// protocol service function to get the icon of the protocol
-INT_PTR WeatherLoadIcon(WPARAM wParam,LPARAM lParam)
+INT_PTR WeatherLoadIcon(WPARAM wParam,LPARAM)
{
return (LOWORD(wParam) == PLI_PROTOCOL) ? (INT_PTR)CopyIcon(LoadIconEx("main", FALSE)) : 0;
}
@@ -126,7 +126,7 @@ INT_PTR WeatherGetInfo(WPARAM,LPARAM lParam)
static const TCHAR *statusStr[] = { _T("Light"), _T("Fog"), _T("SShower"), _T("Snow"), _T("RShower"), _T("Rain"), _T("PCloudy"), _T("Cloudy"), _T("Sunny"), _T("NA") };
static const WORD statusValue[] = { LIGHT, FOG, SSHOWER, SNOW, RSHOWER, RAIN, PCLOUDY, CLOUDY, SUNNY, NA };
-INT_PTR WeatherGetAvatarInfo(WPARAM wParam, LPARAM lParam)
+INT_PTR WeatherGetAvatarInfo(WPARAM, LPARAM lParam)
{
TCHAR szSearchPath[MAX_PATH], *chop;
WORD status;
@@ -187,7 +187,7 @@ static void __cdecl WeatherGetAwayMsgThread(void *hContact)
else ProtoBroadcastAck(WEATHERPROTONAME, (MCONTACT)hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, (HANDLE)1, 0);
}
-static INT_PTR WeatherGetAwayMsg(WPARAM wParam, LPARAM lParam)
+static INT_PTR WeatherGetAwayMsg(WPARAM, LPARAM lParam)
{
CCSDATA* ccs = (CCSDATA*)lParam;
if (ccs == NULL)
@@ -258,7 +258,7 @@ INT_PTR EnableDisableCmd(WPARAM wParam,LPARAM lParam)
}
// update the weather popup menu item when click on it
-INT_PTR MenuitemNotifyCmd(WPARAM wParam,LPARAM lParam)
+INT_PTR MenuitemNotifyCmd(WPARAM, LPARAM)
{
UpdatePopupMenu(!opt.UsePopup);
return 0;
diff --git a/plugins/Weather/src/weather_update.cpp b/plugins/Weather/src/weather_update.cpp
index 97fbfe48d0..78bf4c6a10 100644
--- a/plugins/Weather/src/weather_update.cpp
+++ b/plugins/Weather/src/weather_update.cpp
@@ -302,7 +302,7 @@ void UpdateAll(BOOL AutoUpdate, BOOL RemoveData)
// update a single station
// wParam = handle for the weather station that is going to be updated
-INT_PTR UpdateSingleStation(WPARAM wParam, LPARAM lParam)
+INT_PTR UpdateSingleStation(WPARAM wParam, LPARAM)
{
if (IsMyContact(wParam)) {
// add the station to the end of the update queue
@@ -320,7 +320,7 @@ INT_PTR UpdateSingleStation(WPARAM wParam, LPARAM lParam)
// update a single station with removing the old data
// wParam = handle for the weather station that is going to be updated
-INT_PTR UpdateSingleRemove(WPARAM wParam, LPARAM lParam)
+INT_PTR UpdateSingleRemove(WPARAM wParam, LPARAM)
{
if (IsMyContact(wParam)) {
// add the station to the end of the update queue, and also remove old data
@@ -338,7 +338,7 @@ INT_PTR UpdateSingleRemove(WPARAM wParam, LPARAM lParam)
// update all weather thread
// this thread update each weather station from the queue
-void UpdateThreadProc(LPVOID hWnd)
+void UpdateThreadProc(LPVOID)
{
WaitForSingleObject(hUpdateMutex, INFINITE);
if (ThreadRunning) {
@@ -359,7 +359,7 @@ void UpdateThreadProc(LPVOID hWnd)
}
// the "Update All" menu item in main menu
-INT_PTR UpdateAllInfo(WPARAM wParam,LPARAM lParam)
+INT_PTR UpdateAllInfo(WPARAM, LPARAM)
{
if (!ThreadRunning)
UpdateAll(FALSE, FALSE);
@@ -367,7 +367,8 @@ INT_PTR UpdateAllInfo(WPARAM wParam,LPARAM lParam)
}
// the "Update All" menu item in main menu and remove the old data
-INT_PTR UpdateAllRemove(WPARAM wParam,LPARAM lParam) {
+INT_PTR UpdateAllRemove(WPARAM, LPARAM)
+{
if (!ThreadRunning)
UpdateAll(FALSE, TRUE);
return 0;
@@ -586,7 +587,7 @@ int GetWeatherData(MCONTACT hContact)
//============ UPDATE TIMERS ============
// main auto-update timer
-void CALLBACK timerProc(HWND hwnd, UINT uMsg, UINT_PTR idEvent, DWORD dwTime)
+void CALLBACK timerProc(HWND, UINT, UINT_PTR, DWORD)
{
// only run if it is not current updating and the auto update option is enabled
if ( !ThreadRunning && opt.CAutoUpdate && !Miranda_Terminated() && (opt.NoProtoCondition || status == ID_STATUS_ONLINE))
@@ -595,7 +596,7 @@ void CALLBACK timerProc(HWND hwnd, UINT uMsg, UINT_PTR idEvent, DWORD dwTime)
// temporary timer for first run
// when this is run, it kill the old startup timer and create the permenant one above
-void CALLBACK timerProc2(HWND hwnd, UINT uMsg, UINT_PTR idEvent, DWORD dwTime)
+void CALLBACK timerProc2(HWND, UINT, UINT_PTR, DWORD)
{
KillTimer(NULL, timerId);
ThreadRunning = FALSE;
diff --git a/plugins/Weather/src/weather_userinfo.cpp b/plugins/Weather/src/weather_userinfo.cpp
index 8e0fc7116f..ba96ef88c7 100644
--- a/plugins/Weather/src/weather_userinfo.cpp
+++ b/plugins/Weather/src/weather_userinfo.cpp
@@ -132,7 +132,7 @@ INT_PTR CALLBACK DlgProcUIPage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPa
//============ BRIEF INFORMATION ============
-static int BriefDlgResizer(HWND hwnd, LPARAM lParam, UTILRESIZECONTROL *urc)
+static int BriefDlgResizer(HWND, LPARAM, UTILRESIZECONTROL *urc)
{
switch (urc->wId) {
case IDC_HEADERBAR: