Author: gschneider
Date: Sun May 30 22:36:20 2010
New Revision: 47461
URL:
http://svn.reactos.org/svn/reactos?rev=47461&view=rev
Log:
Various application fixes by Jan Roeloffzen, bug #5182, part 4/4
dxdiag: tabs -> spaces, UINT -> UINT_PTR, remove unused assignments, simplify code,
fix compiler warnings
Modified:
trunk/reactos/base/applications/dxdiag/ddtest.c
trunk/reactos/base/applications/dxdiag/input.c
trunk/reactos/base/applications/dxdiag/network.c
trunk/reactos/base/applications/dxdiag/sound.c
Modified: trunk/reactos/base/applications/dxdiag/ddtest.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/dxdiag/d…
==============================================================================
--- trunk/reactos/base/applications/dxdiag/ddtest.c [iso-8859-1] (original)
+++ trunk/reactos/base/applications/dxdiag/ddtest.c [iso-8859-1] Sun May 30 22:36:20 2010
@@ -151,7 +151,7 @@
{
if (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE))
{
- if (msg.message == WM_TIMER && TimerID == msg.wParam)
+ if (msg.message == WM_TIMER && TimerID == msg.wParam)
break;
TranslateMessage(&msg);
DispatchMessage(&msg);
@@ -200,7 +200,7 @@
BOOL DDOffscreenBufferTest(HWND hWnd, BOOL Fullscreen){
- UINT TimerID, TimerIDUpdate;
+ UINT_PTR TimerID, TimerIDUpdate;
LPDIRECTDRAW lpDD;
LPDIRECTDRAWSURFACE lpDDPrimarySurface;
LPDIRECTDRAWSURFACE lpDDBackBuffer;
@@ -288,6 +288,7 @@
/* set our timers, TimerID - for test timeout, TimerIDUpdate - for frame updating */
TimerID = SetTimer(hWnd, -1, (UINT)TEST_DURATION, NULL);
TimerIDUpdate = SetTimer(hWnd, 2, (UINT)10, NULL);
+ (void)TimerIDUpdate;
while (TRUE)
{
Modified: trunk/reactos/base/applications/dxdiag/input.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/dxdiag/i…
==============================================================================
--- trunk/reactos/base/applications/dxdiag/input.c [iso-8859-1] (original)
+++ trunk/reactos/base/applications/dxdiag/input.c [iso-8859-1] Sun May 30 22:36:20 2010
@@ -129,13 +129,13 @@
ZeroMemory(&GuidPath, sizeof(DIPROPGUIDANDPATH));
GuidPath.diph.dwSize = sizeof(DIPROPGUIDANDPATH);
GuidPath.diph.dwHeaderSize = sizeof(DIPROPHEADER);
- GuidPath.diph.dwHow = DIPH_DEVICE;
+ GuidPath.diph.dwHow = DIPH_DEVICE;
hResult = pDev->lpVtbl->GetProperty(pDev, DIPROP_GUIDANDPATH,
(LPDIPROPHEADER)&GuidPath);
ZeroMemory(&TypeName, sizeof(TypeName));
TypeName.diph.dwSize = sizeof(TypeName);
TypeName.diph.dwHeaderSize = sizeof(DIPROPHEADER);
- TypeName.diph.dwHow = DIPH_DEVICE;
+ TypeName.diph.dwHow = DIPH_DEVICE;
hResult = pDev->lpVtbl->GetProperty(pDev, DIPROP_GETPORTDISPLAYNAME,
(LPDIPROPHEADER)&TypeName);
@@ -191,7 +191,7 @@
Context.pObj = pObj;
Context.hwndDlg = hwndDlg;
InitListViewColumns(&Context);
- hResult = pObj->lpVtbl->EnumDevices(pObj, DI8DEVCLASS_ALL,
DirectInputEnumDevCb, (PVOID)&Context, DIEDFL_ALLDEVICES);
+ pObj->lpVtbl->EnumDevices(pObj, DI8DEVCLASS_ALL, DirectInputEnumDevCb,
(PVOID)&Context, DIEDFL_ALLDEVICES);
pObj->lpVtbl->Release(pObj);
}
Modified: trunk/reactos/base/applications/dxdiag/network.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/dxdiag/n…
==============================================================================
--- trunk/reactos/base/applications/dxdiag/network.c [iso-8859-1] (original)
+++ trunk/reactos/base/applications/dxdiag/network.c [iso-8859-1] Sun May 30 22:36:20
2010
@@ -178,10 +178,10 @@
{
DWORD dwIndex = 0;
LONG result;
- WCHAR szName[50];
+ WCHAR szName[50];
WCHAR szGUID[40];
WCHAR szTemp[63];
- WCHAR szResult[MAX_PATH+20] = {0};
+ WCHAR szResult[MAX_PATH+20] = {0};
DWORD RegProviders = 0;
DWORD ProviderIndex;
DWORD dwName;
@@ -203,13 +203,12 @@
szResult[0] = L'\0';
LoadStringW(hInst, PreDefProviders[dwIndex].ResourceID, szResult,
sizeof(szResult)/sizeof(WCHAR));
szResult[(sizeof(szResult)/sizeof(WCHAR))-1] = L'\0';
- lResult = SendMessageW(hDlgCtrl, LVM_INSERTITEM, 0, (LPARAM)&Item);
+ Item.iItem = SendMessageW(hDlgCtrl, LVM_INSERTITEM, 0, (LPARAM)&Item);
+ Item.iSubItem = 1;
szResult[0] = L'\0';
LoadStringW(hInst, IDS_REG_FAIL, szResult, sizeof(szResult)/sizeof(WCHAR));
szResult[(sizeof(szResult)/sizeof(WCHAR))-1] = L'\0';
- Item.iItem = lResult;
- Item.iSubItem = 1;
- lResult = SendMessageW(hDlgCtrl, LVM_SETITEM, 0, (LPARAM)&Item);
+ SendMessageW(hDlgCtrl, LVM_SETITEM, 0, (LPARAM)&Item);
}
dwIndex = 0;
@@ -228,8 +227,7 @@
if (ProviderIndex == UINT_MAX)
{
/* a custom service provider was found */
- lResult = ListView_GetItemCount(hDlgCtrl);
- Item.iItem = lResult;
+ Item.iItem = ListView_GetItemCount(hDlgCtrl);
/* FIXME
* on Windows Vista we need to use RegLoadMUIString which is not
available for older systems
@@ -291,7 +289,7 @@
}
}
dwIndex++;
- }while(result != ERROR_NO_MORE_ITEMS);
+ }while(result != ERROR_NO_MORE_ITEMS);
/* check if all providers have been registered */
// if (RegProviders == 15)
@@ -330,7 +328,7 @@
return;
/* enumerate providers */
- result = EnumerateServiceProviders(hKey, hDlgCtrl, DirectPlaySP);
+ EnumerateServiceProviders(hKey, hDlgCtrl, DirectPlaySP);
RegCloseKey(hKey);
}
Modified: trunk/reactos/base/applications/dxdiag/sound.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/dxdiag/s…
==============================================================================
--- trunk/reactos/base/applications/dxdiag/sound.c [iso-8859-1] (original)
+++ trunk/reactos/base/applications/dxdiag/sound.c [iso-8859-1] Sun May 30 22:36:20 2010
@@ -275,6 +275,7 @@
/* release the DSound object */
// pObj->lpVtbl->Release(pObj);
+ (void)hResult;
}