https://git.reactos.org/?p=reactos.git;a=commitdiff;h=8bbbab534afbd501b27f7…
commit 8bbbab534afbd501b27f706755914aa0405e1527
Author: Mark Jansen <mark.jansen(a)reactos.org>
AuthorDate: Sun Mar 18 15:57:46 2018 +0100
Commit: Mark Jansen <mark.jansen(a)reactos.org>
CommitDate: Sun Mar 18 15:58:04 2018 +0100
[APPHELP_APITEST] Fix some 64 bit issues.
---
modules/rostests/apitests/apphelp/apphelp.c | 4 ++--
modules/rostests/apitests/apphelp/data.c | 7 ++++---
modules/rostests/apitests/apphelp/db.cpp | 11 +++++------
modules/rostests/apitests/apphelp/layerapi.c | 6 +++---
4 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/modules/rostests/apitests/apphelp/apphelp.c
b/modules/rostests/apitests/apphelp/apphelp.c
index 4a300e3e5a..6b09f1102f 100644
--- a/modules/rostests/apitests/apphelp/apphelp.c
+++ b/modules/rostests/apitests/apphelp/apphelp.c
@@ -4,7 +4,7 @@
* PURPOSE: Misc apphelp tests
* COPYRIGHT: Copyright 2012 Detlef Riekenberg
* Copyright 2013 Mislav Blažević
- * Copyright 2015-2017 Mark Jansen (mark.jansen(a)reactos.org)
+ * Copyright 2015-2018 Mark Jansen (mark.jansen(a)reactos.org)
*/
#include <ntstatus.h>
@@ -606,7 +606,7 @@ static void test_crc_imp(size_t len, DWORD expected)
pSdbFreeFileAttributes(pattrinfo);
}
-static void test_crc2_imp(size_t len, int fill, DWORD expected)
+static void test_crc2_imp(DWORD len, int fill, DWORD expected)
{
static const WCHAR path[] =
{'t','e','s','t','x','x','.','e','x','e',0};
diff --git a/modules/rostests/apitests/apphelp/data.c
b/modules/rostests/apitests/apphelp/data.c
index f7ef6cd764..95dd921619 100644
--- a/modules/rostests/apitests/apphelp/data.c
+++ b/modules/rostests/apitests/apphelp/data.c
@@ -2,7 +2,7 @@
* PROJECT: apphelp_apitest
* LICENSE: GPL-2.0+ (
https://spdx.org/licenses/GPL-2.0+)
* PURPOSE: Common data / functions for apphelp_apitest
- * COPYRIGHT: Copyright 2015-2017 Mark Jansen (mark.jansen(a)reactos.org)
+ * COPYRIGHT: Copyright 2015-2018 Mark Jansen (mark.jansen(a)reactos.org)
*/
#include <exdisp.h>
@@ -231,6 +231,7 @@ typedef struct rsrc_section_t
VAR translation;
} rsrc_section_t;
+#define RT_VERSION_DW 16
static const rsrc_section_t rsrc_section =
{
/* header */
@@ -245,7 +246,7 @@ static const rsrc_section_t rsrc_section =
/* file_info_id */
{
{{
- (DWORD)VS_FILE_INFO, /* NameOffset:31 */
+ RT_VERSION_DW, /* NameOffset:31 */
0 /* NameIsString:1 */
}},
{
@@ -552,7 +553,7 @@ void test_create_file_imp(const WCHAR* name, const char* contents,
size_t len)
if (contents && len)
{
DWORD size;
- WriteFile(file, contents, len, &size, NULL);
+ WriteFile(file, contents, (DWORD)len, &size, NULL);
}
CloseHandle(file);
}
diff --git a/modules/rostests/apitests/apphelp/db.cpp
b/modules/rostests/apitests/apphelp/db.cpp
index c01d54be17..3d6480a6f1 100644
--- a/modules/rostests/apitests/apphelp/db.cpp
+++ b/modules/rostests/apitests/apphelp/db.cpp
@@ -4,7 +4,7 @@
* PURPOSE: Tests for shim-database api's
* COPYRIGHT: Copyright 2012 Detlef Riekenberg
* Copyright 2013 Mislav Blažević
- * Copyright 2015-2017 Mark Jansen (mark.jansen(a)reactos.org)
+ * Copyright 2015-2018 Mark Jansen (mark.jansen(a)reactos.org)
*/
#include <ntstatus.h>
@@ -471,7 +471,7 @@ static void test_stringtable()
static const WCHAR* all[] = { test1, test2, test3, test4, test5, lipsum, lipsum2,
empty };
static const TAGID expected_str[] = { 0xc, 0x12, 0x18, 0x1e, 0x24, 0x2a, 0x30, 0x36
};
static const TAGID expected_tab[] = { 6, 0x18, 0x2a, 0x3c, 0x4e, 0x60, 0x846, 0x102c
};
- size_t n, j;
+ DWORD n, j;
for (n = 0; n < (sizeof(all) / sizeof(all[0])); ++n)
{
@@ -1079,9 +1079,8 @@ static BOOL IsUserAdmin()
}
-
template<typename SDBQUERYRESULT_T>
-static void check_adwExeFlags(DWORD adwExeFlags_0, SDBQUERYRESULT_T& query, const
char* file, int line, int cur)
+static void check_adwExeFlags(DWORD adwExeFlags_0, SDBQUERYRESULT_T& query, const
char* file, int line, size_t cur)
{
ok_(file, line)(query.adwExeFlags[0] == adwExeFlags_0, "Expected adwExeFlags[0]
to be 0x%x, was: 0x%x for %d\n", adwExeFlags_0, query.adwExeFlags[0], cur);
for (size_t n = 1; n < _countof(query.atrExes); ++n)
@@ -1089,13 +1088,13 @@ static void check_adwExeFlags(DWORD adwExeFlags_0,
SDBQUERYRESULT_T& query, cons
}
template<>
-void check_adwExeFlags(DWORD, SDBQUERYRESULT_2k3&, const char*, int, int)
+void check_adwExeFlags(DWORD, SDBQUERYRESULT_2k3&, const char*, int, size_t)
{
}
template<typename SDBQUERYRESULT_T>
-static void test_mode_generic(const WCHAR* workdir, HSDB hsdb, int cur)
+static void test_mode_generic(const WCHAR* workdir, HSDB hsdb, size_t cur)
{
WCHAR exename[MAX_PATH], testfile[MAX_PATH];
BOOL ret;
diff --git a/modules/rostests/apitests/apphelp/layerapi.c
b/modules/rostests/apitests/apphelp/layerapi.c
index 7be1903069..fd44398940 100644
--- a/modules/rostests/apitests/apphelp/layerapi.c
+++ b/modules/rostests/apitests/apphelp/layerapi.c
@@ -2,7 +2,7 @@
* PROJECT: apphelp_apitest
* LICENSE: GPL-2.0+ (
https://spdx.org/licenses/GPL-2.0+)
* PURPOSE: Tests for (registry)layer manipulation api's
- * COPYRIGHT: Copyright 2015-2017 Mark Jansen (mark.jansen(a)reactos.org)
+ * COPYRIGHT: Copyright 2015-2018 Mark Jansen (mark.jansen(a)reactos.org)
*/
#include <ntstatus.h>
@@ -57,7 +57,7 @@ static BOOL setLayerValue(BOOL bMachine, const char* valueName, const
char* valu
if (lstatus == ERROR_SUCCESS)
{
if (value)
- lstatus = RegSetValueExA(key, valueName, 0, REG_SZ, (const BYTE*)value,
strlen(value)+1);
+ lstatus = RegSetValueExA(key, valueName, 0, REG_SZ, (const BYTE*)value,
(DWORD)strlen(value)+1);
else
{
lstatus = RegDeleteValueA(key, valueName);
@@ -564,7 +564,7 @@ static void test_SetPermLayer(void)
ok(DeleteFileA(file), "DeleteFile failed....\n");
}
-static BOOL create_file(LPCSTR dir, LPCSTR name, int filler, size_t size)
+static BOOL create_file(LPCSTR dir, LPCSTR name, int filler, DWORD size)
{
char target[MAX_PATH], *tmp;
HANDLE file;