Fix build failure with -Werror in kernel32-GetSystenTimes patchset.

This commit is contained in:
Sebastian Lackner 2014-08-09 00:13:19 +02:00
parent e54f90dd30
commit 7573e09b4a
2 changed files with 14 additions and 15 deletions

View File

@ -1,14 +1,14 @@
From 6edf355e54ae3ab2c8506d718209bf876e671ea0 Mon Sep 17 00:00:00 2001
From d42b5e55c0b0eeae00b0c12cac539d918a5bacf9 Mon Sep 17 00:00:00 2001
From: Louis Lenders <xerox_xerox2000@yahoo.co.uk>
Date: Sun, 27 Jul 2014 11:42:28 -0600
Subject: kernel32: Add tests for GetSystemTimes.
---
dlls/kernel32/tests/time.c | 78 ++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 78 insertions(+)
dlls/kernel32/tests/time.c | 77 ++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 77 insertions(+)
diff --git a/dlls/kernel32/tests/time.c b/dlls/kernel32/tests/time.c
index 55d4be9..57263bb 100644
index 55d4be9..dde9f5d 100644
--- a/dlls/kernel32/tests/time.c
+++ b/dlls/kernel32/tests/time.c
@@ -22,9 +22,11 @@
@ -23,7 +23,7 @@ index 55d4be9..57263bb 100644
static int (WINAPI *pGetCalendarInfoA)(LCID,CALID,CALTYPE,LPSTR,int,LPDWORD);
static int (WINAPI *pGetCalendarInfoW)(LCID,CALID,CALTYPE,LPWSTR,int,LPDWORD);
@@ -732,12 +734,87 @@ static void test_GetCalendarInfo(void)
@@ -732,12 +734,86 @@ static void test_GetCalendarInfo(void)
ok( ret == ret2, "got %d, expected %d\n", ret, ret2 );
}
@ -37,7 +37,6 @@ index 55d4be9..57263bb 100644
+ SYSTEM_BASIC_INFORMATION sbi;
+ ULONG ReturnLength;
+ double total_usertime = 0.0, total_kerneltime = 0.0, total_idletime = 0.0;
+ NTSTATUS STATUS;
+
+ if (!pGetSystemTimes)
+ {
@ -46,13 +45,13 @@ index 55d4be9..57263bb 100644
+ }
+
+ todo_wine ok( pGetSystemTimes(NULL, NULL, NULL), "GetSystemTimes failed unexpectedly\n" );
+
+
+ memset( &idletime, 0x0, sizeof(idletime) );
+ memset( &kerneltime, 0x0, sizeof(kerneltime) );
+ memset( &usertime, 0x0, sizeof(usertime) );
+ todo_wine ok( pGetSystemTimes(&idletime, &kerneltime , &usertime),
+ "GetSystemTimes failed unexpectedly\n" );
+
+
+ ul1.LowPart = idletime.dwLowDateTime;
+ ul1.HighPart = idletime.dwHighDateTime;
+
@ -111,7 +110,7 @@ index 55d4be9..57263bb 100644
pGetCalendarInfoA = (void *)GetProcAddress(hKernel, "GetCalendarInfoA");
pGetCalendarInfoW = (void *)GetProcAddress(hKernel, "GetCalendarInfoW");
@@ -747,6 +824,7 @@ START_TEST(time)
@@ -747,6 +823,7 @@ START_TEST(time)
test_FileTimeToSystemTime();
test_FileTimeToLocalFileTime();
test_TzSpecificLocalTimeToSystemTime();

View File

@ -1,4 +1,4 @@
From 538c9a8cb5affbfc1b8c75f975ecad0370469afd Mon Sep 17 00:00:00 2001
From c3acb24297b1b4e41746ba13f7e997bbe7e0c64a Mon Sep 17 00:00:00 2001
From: "Erich E. Hoover" <erich.e.hoover@gmail.com>
Date: Sun, 27 Jul 2014 12:38:29 -0600
Subject: kernel32: Implement GetSystemTimes.
@ -9,16 +9,16 @@ Subject: kernel32: Implement GetSystemTimes.
2 files changed, 55 insertions(+), 8 deletions(-)
diff --git a/dlls/kernel32/tests/time.c b/dlls/kernel32/tests/time.c
index 57263bb..2b464ec 100644
index dde9f5d..fe459e4 100644
--- a/dlls/kernel32/tests/time.c
+++ b/dlls/kernel32/tests/time.c
@@ -752,13 +752,13 @@ static void test_GetSystemTimes(void)
@@ -751,13 +751,13 @@ static void test_GetSystemTimes(void)
return;
}
- todo_wine ok( pGetSystemTimes(NULL, NULL, NULL), "GetSystemTimes failed unexpectedly\n" );
+ ok( pGetSystemTimes(NULL, NULL, NULL), "GetSystemTimes failed unexpectedly\n" );
memset( &idletime, 0x0, sizeof(idletime) );
memset( &kerneltime, 0x0, sizeof(kerneltime) );
memset( &usertime, 0x0, sizeof(usertime) );
@ -26,10 +26,10 @@ index 57263bb..2b464ec 100644
- "GetSystemTimes failed unexpectedly\n" );
+ ok( pGetSystemTimes(&idletime, &kerneltime , &usertime),
+ "GetSystemTimes failed unexpectedly\n" );
ul1.LowPart = idletime.dwLowDateTime;
ul1.HighPart = idletime.dwHighDateTime;
@@ -802,9 +802,9 @@ static void test_GetSystemTimes(void)
@@ -801,9 +801,9 @@ static void test_GetSystemTimes(void)
trace( "total_idletime %f total_kerneltime %f total_usertime %f \n", total_idletime,
total_kerneltime, total_usertime );