Author: dgorbachev
Date: Sat Jul 25 09:42:15 2009
New Revision: 42193
URL:
http://svn.reactos.org/svn/reactos?rev=42193&view=rev
Log:
Fix some bugs, reported by GCC.
Modified:
trunk/rostests/dxtest/ddraw/DDraw/display_modes.cpp
trunk/rostests/dxtest/ddraw/Surface/misc.cpp
trunk/rostests/tests/regqueryvalue/regqueryvalue.c
Modified: trunk/rostests/dxtest/ddraw/DDraw/display_modes.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/dxtest/ddraw/DDraw/displa…
==============================================================================
--- trunk/rostests/dxtest/ddraw/DDraw/display_modes.cpp [iso-8859-1] (original)
+++ trunk/rostests/dxtest/ddraw/DDraw/display_modes.cpp [iso-8859-1] Sat Jul 25 09:42:15
2009
@@ -24,8 +24,8 @@
DDSURFACEDESC2 DisplayMode = {0};
DisplayMode.dwSize = sizeof(DDSURFACEDESC2);
- TEST ( pDDSD->dwFlags == DDSD_HEIGHT | DDSD_WIDTH | DDSD_PITCH | DDSD_PIXELFORMAT |
DDSD_REFRESHRATE);
- TEST ( pDDSD->ddpfPixelFormat.dwFlags == DDPF_RGB | DDPF_PALETTEINDEXED8 ||
pDDSD->ddpfPixelFormat.dwFlags == DDPF_RGB );
+ TEST ( pDDSD->dwFlags == (DDSD_HEIGHT | DDSD_WIDTH | DDSD_PITCH | DDSD_PIXELFORMAT |
DDSD_REFRESHRATE));
+ TEST ( pDDSD->ddpfPixelFormat.dwFlags == (DDPF_RGB | DDPF_PALETTEINDEXED8) ||
pDDSD->ddpfPixelFormat.dwFlags == DDPF_RGB );
TEST ( Context->DirectDraw->SetDisplayMode (pDDSD->dwWidth, pDDSD->dwHeight,
pDDSD->ddpfPixelFormat.dwRGBBitCount, pDDSD->dwRefreshRate, 0) == DD_OK);
TEST ( Context->DirectDraw->GetMonitorFrequency (&lpdwFrequency) == DD_OK
&& lpdwFrequency == pDDSD->dwRefreshRate);
TEST ( Context->DirectDraw->GetDisplayMode (&DisplayMode) == DD_OK
@@ -33,7 +33,7 @@
&& pDDSD->dwWidth == DisplayMode.dwWidth
&& pDDSD->dwRefreshRate == DisplayMode.dwRefreshRate
&& pDDSD->ddpfPixelFormat.dwRGBBitCount ==
DisplayMode.ddpfPixelFormat.dwRGBBitCount
- && DisplayMode.dwFlags == DDSD_HEIGHT | DDSD_WIDTH | DDSD_PITCH |
DDSD_PIXELFORMAT | DDSD_REFRESHRATE );
+ && DisplayMode.dwFlags == (DDSD_HEIGHT | DDSD_WIDTH | DDSD_PITCH |
DDSD_PIXELFORMAT | DDSD_REFRESHRATE) );
setcout++;
return DDENUMRET_OK;
Modified: trunk/rostests/dxtest/ddraw/Surface/misc.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/dxtest/ddraw/Surface/misc…
==============================================================================
--- trunk/rostests/dxtest/ddraw/Surface/misc.cpp [iso-8859-1] (original)
+++ trunk/rostests/dxtest/ddraw/Surface/misc.cpp [iso-8859-1] Sat Jul 25 09:42:15 2009
@@ -2,7 +2,7 @@
BOOL Test_Misc (INT* passed, INT* failed)
{
- LPDIRECTDRAWSURFACE7 Surface;
+ LPDIRECTDRAWSURFACE7 Surface;
if(!CreateSurface(&Surface))
return FALSE;
@@ -12,7 +12,7 @@
DDSCAPS2 Caps;
TEST (Surface->GetCaps((DDSCAPS2*)0xdeadbeef) == DDERR_INVALIDPARAMS);
TEST (Surface->GetCaps(&Caps) == DD_OK && Caps.dwCaps == 0x10004040
- && Caps.dwCaps2 == Caps.dwCaps3 == Caps.dwCaps4 == 0); // FIXME: Replace
0x10004040
+ && Caps.dwCaps2 == 0 && Caps.dwCaps3 == 0 &&
Caps.dwCaps4 == 0); // FIXME: Replace 0x10004040
// GetDC / ReleaseDC
HDC hdc;
Modified: trunk/rostests/tests/regqueryvalue/regqueryvalue.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/tests/regqueryvalue/regqu…
==============================================================================
--- trunk/rostests/tests/regqueryvalue/regqueryvalue.c [iso-8859-1] (original)
+++ trunk/rostests/tests/regqueryvalue/regqueryvalue.c [iso-8859-1] Sat Jul 25 09:42:15
2009
@@ -63,7 +63,6 @@
free( WcharResult );
free( CharResult );
- free( ValueNameWC );
return 0;
}