https://git.reactos.org/?p=reactos.git;a=commitdiff;h=c48ca5b02285f73f65b9c…
commit c48ca5b02285f73f65b9c0ea768805b479f3254b
Author: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
AuthorDate: Sun Nov 6 16:47:09 2022 +0100
Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
CommitDate: Sun Nov 6 16:58:45 2022 +0100
[SMSS] Fix some x64 warnings C4267 "conversion from 'size_t' to
'ULONG', possible loss of data"
---
base/system/smss/sminit.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/base/system/smss/sminit.c b/base/system/smss/sminit.c
index da11f72e000..7b0a01d3ac9 100644
--- a/base/system/smss/sminit.c
+++ b/base/system/smss/sminit.c
@@ -1745,7 +1745,7 @@ SmpCreateDynamicEnvironmentVariables(VOID)
0,
REG_SZ,
ValueData,
- (wcslen(ValueData) + 1) * sizeof(WCHAR));
+ (ULONG)(wcslen(ValueData) + 1) * sizeof(WCHAR));
if (!NT_SUCCESS(Status))
{
DPRINT1("SMSS: Failed writing %wZ environment variable - %x\n",
@@ -1783,7 +1783,7 @@ SmpCreateDynamicEnvironmentVariables(VOID)
0,
REG_SZ,
ValueData,
- (wcslen(ValueData) + 1) * sizeof(WCHAR));
+ (ULONG)(wcslen(ValueData) + 1) * sizeof(WCHAR));
if (!NT_SUCCESS(Status))
{
DPRINT1("SMSS: Failed writing %wZ environment variable - %x\n",
@@ -1801,7 +1801,7 @@ SmpCreateDynamicEnvironmentVariables(VOID)
0,
REG_SZ,
ValueBuffer,
- (wcslen(ValueBuffer) + 1) * sizeof(WCHAR));
+ (ULONG)(wcslen(ValueBuffer) + 1) * sizeof(WCHAR));
if (!NT_SUCCESS(Status))
{
DPRINT1("SMSS: Failed writing %wZ environment variable - %x\n",
@@ -1927,7 +1927,7 @@ SmpCreateDynamicEnvironmentVariables(VOID)
0,
REG_SZ,
ValueBuffer,
- (wcslen(ValueBuffer) + 1) * sizeof(WCHAR));
+ (ULONG)(wcslen(ValueBuffer) + 1) * sizeof(WCHAR));
if (!NT_SUCCESS(Status))
{
DPRINT1("SMSS: Failed writing %wZ environment variable - %x\n",
@@ -1945,7 +1945,7 @@ SmpCreateDynamicEnvironmentVariables(VOID)
0,
REG_SZ,
ValueBuffer,
- (wcslen(ValueBuffer) + 1) * sizeof(WCHAR));
+ (ULONG)(wcslen(ValueBuffer) + 1) * sizeof(WCHAR));
if (!NT_SUCCESS(Status))
{
DPRINT1("SMSS: Failed writing %wZ environment variable - %x\n",
@@ -2001,7 +2001,7 @@ SmpCreateDynamicEnvironmentVariables(VOID)
0,
REG_SZ,
ValueBuffer,
- (wcslen(ValueBuffer) + 1) * sizeof(WCHAR));
+ (ULONG)(wcslen(ValueBuffer) + 1) * sizeof(WCHAR));
if (!NT_SUCCESS(Status))
{
DPRINT1("SMSS: Failed writing %wZ environment variable -
%x\n",