mirror of
https://github.com/reactos/reactos.git
synced 2025-07-30 22:01:43 +00:00
[REACTOS] Fix SIZE_T related warnings
This commit is contained in:
parent
826704ba6b
commit
7611cc2b12
21 changed files with 103 additions and 46 deletions
|
@ -351,7 +351,7 @@ HRESULT inline SHSetStrRet(LPSTRRET pStrRet, LPCSTR pstrValue)
|
|||
|
||||
HRESULT inline SHSetStrRet(LPSTRRET pStrRet, LPCWSTR pwstrValue)
|
||||
{
|
||||
ULONG cchr = wcslen(pwstrValue);
|
||||
SIZE_T cchr = wcslen(pwstrValue);
|
||||
LPWSTR buffer = static_cast<LPWSTR>(CoTaskMemAlloc((cchr + 1) * sizeof(WCHAR)));
|
||||
if (buffer == NULL)
|
||||
return E_OUTOFMEMORY;
|
||||
|
|
|
@ -515,7 +515,7 @@ RtlIpv6AddressToStringA(
|
|||
ASSERT(Result >= Buffer);
|
||||
ASSERT(Result < Buffer + RTL_NUMBER_OF(Buffer));
|
||||
|
||||
Status = RtlUnicodeToMultiByteN(S, RTLIPV6A2S_MAX_LEN, NULL, Buffer, (wcslen(Buffer) + 1) * sizeof(WCHAR));
|
||||
Status = RtlUnicodeToMultiByteN(S, RTLIPV6A2S_MAX_LEN, NULL, Buffer, (ULONG)(wcslen(Buffer) + 1) * sizeof(WCHAR));
|
||||
if (!NT_SUCCESS(Status))
|
||||
return (PSTR)~0;
|
||||
|
||||
|
@ -544,7 +544,7 @@ RtlIpv6AddressToStringExA(
|
|||
if (!NT_SUCCESS(Status))
|
||||
return Status;
|
||||
|
||||
Status = RtlUnicodeToMultiByteN(AddressString, RTLIPV6A2SEX_MAX_LEN, NULL, Buffer, (wcslen(Buffer) + 1) * sizeof(WCHAR));
|
||||
Status = RtlUnicodeToMultiByteN(AddressString, RTLIPV6A2SEX_MAX_LEN, NULL, Buffer, (*AddressStringLength + 1) * sizeof(WCHAR));
|
||||
if (!NT_SUCCESS(Status))
|
||||
return STATUS_INVALID_PARAMETER;
|
||||
|
||||
|
|
|
@ -309,7 +309,7 @@ RtlpCollapsePath(PWSTR Path, /* ULONG PathBufferSize, ULONG PathLength, */ ULONG
|
|||
|
||||
// FIXME: Do not suppose NULL-terminated strings!!
|
||||
|
||||
ULONG PathLength = wcslen(Path);
|
||||
SIZE_T PathLength = wcslen(Path);
|
||||
PWSTR EndBuffer = Path + PathLength; // Path + PathBufferSize / sizeof(WCHAR);
|
||||
PWSTR EndPath;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue