https://git.reactos.org/?p=reactos.git;a=commitdiff;h=91ba017dfc7f6d4e39bef…
commit 91ba017dfc7f6d4e39befbb9645f57bfa3735978
Author: Mark Jansen <mark.jansen(a)reactos.org>
AuthorDate: Thu Apr 18 19:21:25 2019 +0200
Commit: Mark Jansen <mark.jansen(a)reactos.org>
CommitDate: Thu Apr 18 19:21:39 2019 +0200
[APPHELP] Fix warnings
---
dll/appcompat/apphelp/apphelp.c | 4 ++--
dll/appcompat/apphelp/sdbapi.c | 2 +-
dll/appcompat/apphelp/sdbwrite.c | 4 ++--
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/dll/appcompat/apphelp/apphelp.c b/dll/appcompat/apphelp/apphelp.c
index e05c1fd9eb..5df880ce6c 100644
--- a/dll/appcompat/apphelp/apphelp.c
+++ b/dll/appcompat/apphelp/apphelp.c
@@ -314,7 +314,7 @@ BOOL WINAPI SdbRegisterDatabaseEx(
UNICODE_STRING DatabaseDescriptionKey =
RTL_CONSTANT_STRING(L"DatabaseDescription");
Status = NtSetValueKey(DbKey, &DatabasePathKey, 0, REG_SZ,
- (PVOID)pszDatabasePath, (wcslen(pszDatabasePath) + 1)
* sizeof(WCHAR));
+ (PVOID)pszDatabasePath,
((ULONG)wcslen(pszDatabasePath) + 1) * sizeof(WCHAR));
if (!NT_SUCCESS(Status))
SHIM_ERR("Unable to write %wZ\n", &DatabasePathKey);
@@ -349,7 +349,7 @@ BOOL WINAPI SdbRegisterDatabaseEx(
if (NT_SUCCESS(Status) && Information.Description)
{
Status = NtSetValueKey(DbKey, &DatabaseDescriptionKey, 0, REG_SZ,
- (PVOID)Information.Description,
(wcslen(Information.Description) + 1) * sizeof(WCHAR));
+ (PVOID)Information.Description,
((ULONG)wcslen(Information.Description) + 1) * sizeof(WCHAR));
if (!NT_SUCCESS(Status))
SHIM_ERR("Unable to write %wZ\n",
&DatabaseDescriptionKey);
}
diff --git a/dll/appcompat/apphelp/sdbapi.c b/dll/appcompat/apphelp/sdbapi.c
index 1a14424ca3..5ddf98938c 100644
--- a/dll/appcompat/apphelp/sdbapi.c
+++ b/dll/appcompat/apphelp/sdbapi.c
@@ -151,7 +151,7 @@ void WINAPI SdbpFlush(PDB pdb)
DWORD SdbpStrlen(PCWSTR string)
{
- return wcslen(string);
+ return (DWORD)wcslen(string);
}
DWORD SdbpStrsize(PCWSTR string)
diff --git a/dll/appcompat/apphelp/sdbwrite.c b/dll/appcompat/apphelp/sdbwrite.c
index 860208454d..8f68e7630e 100644
--- a/dll/appcompat/apphelp/sdbwrite.c
+++ b/dll/appcompat/apphelp/sdbwrite.c
@@ -111,12 +111,12 @@ PDB WINAPI SdbCreateDatabase(LPCWSTR path, PATH_TYPE type)
if (!pdb)
return NULL;
- pdb->size = sizeof(DWORD) + sizeof(DWORD) + strlen(magic);
+ pdb->size = sizeof(DWORD) + sizeof(DWORD) + (DWORD)strlen(magic);
pdb->data = SdbAlloc(pdb->size);
SdbpWrite(pdb, &version_major, sizeof(DWORD));
SdbpWrite(pdb, &version_minor, sizeof(DWORD));
- SdbpWrite(pdb, magic, strlen(magic));
+ SdbpWrite(pdb, magic, (DWORD)strlen(magic));
return pdb;
}