Author: sginsberg
Date: Sat Aug 22 16:40:56 2009
New Revision: 42845
URL:
http://svn.reactos.org/svn/reactos?rev=42845&view=rev
Log:
- combotst: Fix uninitialized variable usage spotted by MSVC
- tmrqueue: Don't use empty structures, MSVC doe
- w32knapi: Implement IntSyscall in MSVC assembly, be compatible with C89 variable
initialization and use '%' instead of '\%' to avoid a msvc warning.
Modified:
trunk/rostests/apitests/w32knapi/ntuser/NtUserToUnicodeEx.c
trunk/rostests/apitests/w32knapi/w32knapi.c
trunk/rostests/tests/combotst/combotst.c
trunk/rostests/tests/tmrqueue/tmrqueue.c
Modified: trunk/rostests/apitests/w32knapi/ntuser/NtUserToUnicodeEx.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/w32knapi/ntuser/…
==============================================================================
--- trunk/rostests/apitests/w32knapi/ntuser/NtUserToUnicodeEx.c [iso-8859-1] (original)
+++ trunk/rostests/apitests/w32knapi/ntuser/NtUserToUnicodeEx.c [iso-8859-1] Sat Aug 22
16:40:56 2009
@@ -139,7 +139,7 @@
TEST(NtUserToUnicodeEx(52, 5, KeyState, Buffer, 10, 0, hkl) == 1);
TEST(Buffer[0] == '$');
TEST(NtUserToUnicodeEx(53, 6, KeyState, Buffer, 10, 0, hkl) == 1);
- TEST(Buffer[0] == '\%');
+ TEST(Buffer[0] == '%');
TEST(NtUserToUnicodeEx(54, 7, KeyState, Buffer, 10, 0, hkl) == 1);
TEST(Buffer[0] == '^');
TEST(NtUserToUnicodeEx(55, 8, KeyState, Buffer, 10, 0, hkl) == 1);
Modified: trunk/rostests/apitests/w32knapi/w32knapi.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/w32knapi/w32knap…
==============================================================================
--- trunk/rostests/apitests/w32knapi/w32knapi.c [iso-8859-1] (original)
+++ trunk/rostests/apitests/w32knapi/w32knapi.c [iso-8859-1] Sat Aug 22 16:40:56 2009
@@ -49,8 +49,9 @@
static DWORD WINAPI
IntSyscall(FARPROC proc, UINT cParams, PVOID pFirstParam)
{
- DWORD ret;
+ DWORD retval;
+#ifdef __GNUC__
asm volatile
(
"pushfl;" // Save flags
@@ -62,21 +63,37 @@
"rep movsd;" // Copy params to the stack
"call *%%edx;" // Call function
"popfl;" // Restore flags
- : "=a" (ret)
+ : "=a" (retval)
: "S" (pFirstParam), "c" (cParams), "d"(proc)
: "%edi"
);
+#else
+ __asm
+ {
+ pushf
+ mov eax, cParams
+ shl eax, 2
+ sub esp, eax
+ mov edi, esp
+ cld
+ rep movsd
+ call proc
+ mov retval, eax
+ popf
+ };
+#endif
- return ret;
+ return retval;
}
DWORD
Syscall(LPWSTR pszFunction, int cParams, void* pParams)
{
char szFunctionName[MAX_PATH];
+ FARPROC proc;
sprintf(szFunctionName, "%ls", pszFunction);
- FARPROC proc = (FARPROC)GetProcAddress(g_hModule, szFunctionName);
+ proc = (FARPROC)GetProcAddress(g_hModule, szFunctionName);
if (!proc)
{
printf("Couldn't find proc: %s\n", szFunctionName);
Modified: trunk/rostests/tests/combotst/combotst.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/tests/combotst/combotst.c…
==============================================================================
--- trunk/rostests/tests/combotst/combotst.c [iso-8859-1] (original)
+++ trunk/rostests/tests/combotst/combotst.c [iso-8859-1] Sat Aug 22 16:40:56 2009
@@ -115,7 +115,7 @@
VOID
HandlePrintRect(HWND handle,DWORD Msg,WPARAM wParam,LPARAM lParam)
{
- RECT rect;
+ RECT rect = *(RECT*)lParam;
TextBuffer[8] = (char)(BUFFERLEN - 8); /* Setting the max size to put chars in first
byte */
SendMessage(handle,Msg,wParam,lParam);
Modified: trunk/rostests/tests/tmrqueue/tmrqueue.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/tests/tmrqueue/tmrqueue.c…
==============================================================================
--- trunk/rostests/tests/tmrqueue/tmrqueue.c [iso-8859-1] (original)
+++ trunk/rostests/tests/tmrqueue/tmrqueue.c [iso-8859-1] Sat Aug 22 16:40:56 2009
@@ -102,7 +102,7 @@
{
struct
{
- /* nothing */
+ HANDLE Dummy;
} Test1;
struct
{