mirror of
https://github.com/reactos/reactos.git
synced 2024-08-20 18:35:32 +00:00
-fixed some warnings (msvc)
svn path=/trunk/; revision=22539
This commit is contained in:
parent
0a3f114ae2
commit
c709176c48
|
@ -96,7 +96,7 @@ static int FindActionIndex(POWER_ACTION * lpAction, DWORD dwActionSize, POWER_AC
|
||||||
{
|
{
|
||||||
int Index;
|
int Index;
|
||||||
|
|
||||||
for (Index = 0; Index < dwActionSize; Index++)
|
for (Index = 0; Index < (int) dwActionSize; Index++)
|
||||||
{
|
{
|
||||||
if (lpAction[Index] == poAction)
|
if (lpAction[Index] == poAction)
|
||||||
return Index;
|
return Index;
|
||||||
|
|
|
@ -31,6 +31,8 @@ alarmsProc(
|
||||||
LPARAM lParam
|
LPARAM lParam
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
UNREFERENCED_PARAMETER(lParam)
|
||||||
|
UNREFERENCED_PARAMETER(wParam)
|
||||||
switch(uMsg)
|
switch(uMsg)
|
||||||
{
|
{
|
||||||
case WM_INITDIALOG:
|
case WM_INITDIALOG:
|
||||||
|
|
|
@ -55,6 +55,7 @@ PropSheetProc(
|
||||||
LPARAM lParam
|
LPARAM lParam
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
UNREFERENCED_PARAMETER(hwndDlg)
|
||||||
switch(uMsg)
|
switch(uMsg)
|
||||||
{
|
{
|
||||||
case PSCB_BUTTONPRESSED:
|
case PSCB_BUTTONPRESSED:
|
||||||
|
@ -88,7 +89,12 @@ Applet1(HWND hwnd, UINT uMsg, LONG wParam, LONG lParam)
|
||||||
TCHAR Caption[1024];
|
TCHAR Caption[1024];
|
||||||
SYSTEM_POWER_CAPABILITIES spc;
|
SYSTEM_POWER_CAPABILITIES spc;
|
||||||
INT i=0;
|
INT i=0;
|
||||||
|
|
||||||
|
UNREFERENCED_PARAMETER(hwnd)
|
||||||
|
UNREFERENCED_PARAMETER(uMsg)
|
||||||
|
UNREFERENCED_PARAMETER(wParam)
|
||||||
|
UNREFERENCED_PARAMETER(lParam)
|
||||||
|
|
||||||
memset(Caption, 0x0, sizeof(Caption));
|
memset(Caption, 0x0, sizeof(Caption));
|
||||||
LoadString(hApplet, IDS_CPLNAME_1, Caption, sizeof(Caption) / sizeof(TCHAR));
|
LoadString(hApplet, IDS_CPLNAME_1, Caption, sizeof(Caption) / sizeof(TCHAR));
|
||||||
|
|
||||||
|
@ -104,17 +110,17 @@ Applet1(HWND hwnd, UINT uMsg, LONG wParam, LONG lParam)
|
||||||
psh.ppsp = psp;
|
psh.ppsp = psp;
|
||||||
psh.pfnCallback = PropSheetProc;
|
psh.pfnCallback = PropSheetProc;
|
||||||
|
|
||||||
InitPropSheetPage(&psp[i++], IDD_PROPPAGEPOWERSHEMES, powershemesProc);
|
InitPropSheetPage(&psp[i++], IDD_PROPPAGEPOWERSHEMES, (DLGPROC) powershemesProc);
|
||||||
if (GetPwrCapabilities(&spc))
|
if (GetPwrCapabilities(&spc))
|
||||||
{
|
{
|
||||||
if (spc.SystemBatteriesPresent)
|
if (spc.SystemBatteriesPresent)
|
||||||
{
|
{
|
||||||
InitPropSheetPage(&psp[i++], IDD_PROPPAGEALARMS, alarmsProc);
|
InitPropSheetPage(&psp[i++], IDD_PROPPAGEALARMS, (DLGPROC) alarmsProc);
|
||||||
psh.nPages += 1;
|
psh.nPages += 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
InitPropSheetPage(&psp[i++], IDD_PROPPAGEADVANCED, advancedProc);
|
InitPropSheetPage(&psp[i++], IDD_PROPPAGEADVANCED, (DLGPROC) advancedProc);
|
||||||
InitPropSheetPage(&psp[i++], IDD_PROPPAGEHIBERNATE, hibernateProc);
|
InitPropSheetPage(&psp[i++], IDD_PROPPAGEHIBERNATE, (DLGPROC) hibernateProc);
|
||||||
|
|
||||||
return (LONG)(PropertySheet(&psh) != -1);
|
return (LONG)(PropertySheet(&psh) != -1);
|
||||||
}
|
}
|
||||||
|
@ -165,6 +171,7 @@ DllMain(
|
||||||
DWORD dwReason,
|
DWORD dwReason,
|
||||||
LPVOID lpvReserved)
|
LPVOID lpvReserved)
|
||||||
{
|
{
|
||||||
|
UNREFERENCED_PARAMETER(lpvReserved)
|
||||||
switch(dwReason)
|
switch(dwReason)
|
||||||
{
|
{
|
||||||
case DLL_PROCESS_ATTACH:
|
case DLL_PROCESS_ATTACH:
|
||||||
|
|
|
@ -224,6 +224,12 @@ BOOLEAN CALLBACK callback_EnumPwrScheme(UINT uiIndex, DWORD dwName, LPTSTR sName
|
||||||
LPWSTR sDesc, PPOWER_POLICY pp,LPARAM lParam )
|
LPWSTR sDesc, PPOWER_POLICY pp,LPARAM lParam )
|
||||||
{
|
{
|
||||||
int index;
|
int index;
|
||||||
|
|
||||||
|
UNREFERENCED_PARAMETER(lParam)
|
||||||
|
UNREFERENCED_PARAMETER(sDesc)
|
||||||
|
UNREFERENCED_PARAMETER(dwDesc)
|
||||||
|
UNREFERENCED_PARAMETER(dwName)
|
||||||
|
|
||||||
if (ValidatePowerPolicies(0,pp))
|
if (ValidatePowerPolicies(0,pp))
|
||||||
{
|
{
|
||||||
if (guiIndex >= MAX_POWER_POLICY)
|
if (guiIndex >= MAX_POWER_POLICY)
|
||||||
|
@ -237,7 +243,7 @@ BOOLEAN CALLBACK callback_EnumPwrScheme(UINT uiIndex, DWORD dwName, LPTSTR sName
|
||||||
memcpy(&gPP[guiIndex], pp, sizeof(POWER_POLICY));
|
memcpy(&gPP[guiIndex], pp, sizeof(POWER_POLICY));
|
||||||
guiIndex++;
|
guiIndex++;
|
||||||
|
|
||||||
index = SendMessage(hList,
|
index = (int) SendMessage(hList,
|
||||||
CB_ADDSTRING,
|
CB_ADDSTRING,
|
||||||
0,
|
0,
|
||||||
(LPARAM)sName);
|
(LPARAM)sName);
|
||||||
|
@ -393,7 +399,7 @@ void LoadConfig(HWND hwndDlg)
|
||||||
TCHAR szConfig[MAX_PATH];
|
TCHAR szConfig[MAX_PATH];
|
||||||
POWER_POLICY pp;
|
POWER_POLICY pp;
|
||||||
|
|
||||||
iCurSel = SendMessage(GetDlgItem(hwndDlg, IDC_ENERGYLIST),
|
iCurSel = (INT) SendMessage(GetDlgItem(hwndDlg, IDC_ENERGYLIST),
|
||||||
CB_GETCURSEL,
|
CB_GETCURSEL,
|
||||||
0,
|
0,
|
||||||
0);
|
0);
|
||||||
|
@ -402,7 +408,7 @@ void LoadConfig(HWND hwndDlg)
|
||||||
|
|
||||||
memcpy(&pp, &gPP[iCurSel], sizeof(POWER_POLICY));
|
memcpy(&pp, &gPP[iCurSel], sizeof(POWER_POLICY));
|
||||||
|
|
||||||
uiIndex = SendMessage(GetDlgItem(hwndDlg, IDC_ENERGYLIST), CB_GETCURSEL, 0, 0);
|
uiIndex = (UINT) SendMessage(GetDlgItem(hwndDlg, IDC_ENERGYLIST), CB_GETCURSEL, 0, 0);
|
||||||
if(uiIndex != CB_ERR)
|
if(uiIndex != CB_ERR)
|
||||||
{
|
{
|
||||||
SendMessage(GetDlgItem(hwndDlg, IDC_ENERGYLIST), CB_GETLBTEXT, uiIndex, (LPARAM)szProfile);
|
SendMessage(GetDlgItem(hwndDlg, IDC_ENERGYLIST), CB_GETLBTEXT, uiIndex, (LPARAM)szProfile);
|
||||||
|
@ -479,14 +485,14 @@ void Pos_SaveData(HWND hwndDlg)
|
||||||
{
|
{
|
||||||
INT iCurSel=0,tmp=0;
|
INT iCurSel=0,tmp=0;
|
||||||
|
|
||||||
iCurSel = SendMessage(GetDlgItem(hwndDlg, IDC_ENERGYLIST),
|
iCurSel = (INT) SendMessage(GetDlgItem(hwndDlg, IDC_ENERGYLIST),
|
||||||
CB_GETCURSEL,
|
CB_GETCURSEL,
|
||||||
0,
|
0,
|
||||||
0);
|
0);
|
||||||
if (iCurSel == CB_ERR)
|
if (iCurSel == CB_ERR)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
tmp = SendMessage(GetDlgItem(hwndDlg, IDC_MONITORDCLIST),
|
tmp = (INT) SendMessage(GetDlgItem(hwndDlg, IDC_MONITORDCLIST),
|
||||||
CB_GETCURSEL,
|
CB_GETCURSEL,
|
||||||
0,
|
0,
|
||||||
(LPARAM)0);
|
(LPARAM)0);
|
||||||
|
@ -494,7 +500,7 @@ void Pos_SaveData(HWND hwndDlg)
|
||||||
{
|
{
|
||||||
gPP[iCurSel].user.VideoTimeoutAc = Sec[tmp];
|
gPP[iCurSel].user.VideoTimeoutAc = Sec[tmp];
|
||||||
}
|
}
|
||||||
tmp = SendMessage(GetDlgItem(hwndDlg, IDC_MONITORDCLIST),
|
tmp = (INT) SendMessage(GetDlgItem(hwndDlg, IDC_MONITORDCLIST),
|
||||||
CB_GETCURSEL,
|
CB_GETCURSEL,
|
||||||
0,
|
0,
|
||||||
(LPARAM)0);
|
(LPARAM)0);
|
||||||
|
@ -502,7 +508,7 @@ void Pos_SaveData(HWND hwndDlg)
|
||||||
{
|
{
|
||||||
gPP[iCurSel].user.VideoTimeoutDc = Sec[tmp];
|
gPP[iCurSel].user.VideoTimeoutDc = Sec[tmp];
|
||||||
}
|
}
|
||||||
tmp = SendMessage(GetDlgItem(hwndDlg, IDC_DISKACLIST),
|
tmp = (INT) SendMessage(GetDlgItem(hwndDlg, IDC_DISKACLIST),
|
||||||
CB_GETCURSEL,
|
CB_GETCURSEL,
|
||||||
0,
|
0,
|
||||||
(LPARAM)0);
|
(LPARAM)0);
|
||||||
|
@ -510,7 +516,7 @@ void Pos_SaveData(HWND hwndDlg)
|
||||||
{
|
{
|
||||||
gPP[iCurSel].user.SpindownTimeoutAc = Sec[tmp+2];
|
gPP[iCurSel].user.SpindownTimeoutAc = Sec[tmp+2];
|
||||||
}
|
}
|
||||||
tmp = SendMessage(GetDlgItem(hwndDlg, IDC_DISKDCLIST),
|
tmp = (INT) SendMessage(GetDlgItem(hwndDlg, IDC_DISKDCLIST),
|
||||||
CB_GETCURSEL,
|
CB_GETCURSEL,
|
||||||
0,
|
0,
|
||||||
(LPARAM)0);
|
(LPARAM)0);
|
||||||
|
@ -518,7 +524,7 @@ void Pos_SaveData(HWND hwndDlg)
|
||||||
{
|
{
|
||||||
gPP[iCurSel].user.SpindownTimeoutDc = Sec[tmp+2];
|
gPP[iCurSel].user.SpindownTimeoutDc = Sec[tmp+2];
|
||||||
}
|
}
|
||||||
tmp = SendMessage(GetDlgItem(hwndDlg, IDC_STANDBYACLIST),
|
tmp = (INT) SendMessage(GetDlgItem(hwndDlg, IDC_STANDBYACLIST),
|
||||||
CB_GETCURSEL,
|
CB_GETCURSEL,
|
||||||
0,
|
0,
|
||||||
(LPARAM)0);
|
(LPARAM)0);
|
||||||
|
@ -526,7 +532,7 @@ void Pos_SaveData(HWND hwndDlg)
|
||||||
{
|
{
|
||||||
gPP[iCurSel].user.IdleTimeoutAc = Sec[tmp];
|
gPP[iCurSel].user.IdleTimeoutAc = Sec[tmp];
|
||||||
}
|
}
|
||||||
tmp = SendMessage(GetDlgItem(hwndDlg, IDC_STANDBYDCLIST),
|
tmp = (INT) SendMessage(GetDlgItem(hwndDlg, IDC_STANDBYDCLIST),
|
||||||
CB_GETCURSEL,
|
CB_GETCURSEL,
|
||||||
0,
|
0,
|
||||||
(LPARAM)0);
|
(LPARAM)0);
|
||||||
|
@ -534,7 +540,7 @@ void Pos_SaveData(HWND hwndDlg)
|
||||||
{
|
{
|
||||||
gPP[iCurSel].user.IdleTimeoutDc = Sec[tmp];
|
gPP[iCurSel].user.IdleTimeoutDc = Sec[tmp];
|
||||||
}
|
}
|
||||||
tmp = SendMessage(GetDlgItem(hwndDlg, IDC_HYBERNATEACLIST),
|
tmp = (INT) SendMessage(GetDlgItem(hwndDlg, IDC_HYBERNATEACLIST),
|
||||||
CB_GETCURSEL,
|
CB_GETCURSEL,
|
||||||
0,
|
0,
|
||||||
(LPARAM)0);
|
(LPARAM)0);
|
||||||
|
@ -542,7 +548,7 @@ void Pos_SaveData(HWND hwndDlg)
|
||||||
{
|
{
|
||||||
gPP[iCurSel].mach.DozeS4TimeoutAc = Sec[tmp];
|
gPP[iCurSel].mach.DozeS4TimeoutAc = Sec[tmp];
|
||||||
}
|
}
|
||||||
tmp = SendMessage(GetDlgItem(hwndDlg, IDC_HYBERNATEDCLIST),
|
tmp = (INT) SendMessage(GetDlgItem(hwndDlg, IDC_HYBERNATEDCLIST),
|
||||||
CB_GETCURSEL,
|
CB_GETCURSEL,
|
||||||
0,
|
0,
|
||||||
(LPARAM)0);
|
(LPARAM)0);
|
||||||
|
|
Loading…
Reference in a new issue