[APPHELP] Fix warnings

This commit is contained in:
Mark Jansen 2019-04-18 19:21:25 +02:00
parent aff8581f6d
commit 91ba017dfc
No known key found for this signature in database
GPG key ID: B39240EE84BEAE8B
3 changed files with 5 additions and 5 deletions

View file

@ -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);
}

View file

@ -151,7 +151,7 @@ void WINAPI SdbpFlush(PDB pdb)
DWORD SdbpStrlen(PCWSTR string)
{
return wcslen(string);
return (DWORD)wcslen(string);
}
DWORD SdbpStrsize(PCWSTR string)

View file

@ -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;
}