Cygwin: fix declaration of RtlInitEmptyUnicodeString
This avoids "-Werror=maybe-uninitialized" errors due to using WCSTR accidentally. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
parent
76c2c7a891
commit
eeeb5650cf
|
@ -1638,13 +1638,14 @@ extern "C"
|
||||||
|
|
||||||
/* RtlInitEmptyUnicodeString is defined as a macro in wdm.h, but that file
|
/* RtlInitEmptyUnicodeString is defined as a macro in wdm.h, but that file
|
||||||
is missing entirely in w32api. */
|
is missing entirely in w32api. */
|
||||||
|
|
||||||
inline
|
inline
|
||||||
VOID NTAPI RtlInitEmptyUnicodeString(PUNICODE_STRING dest, PCWSTR buf,
|
VOID NTAPI RtlInitEmptyUnicodeString(PUNICODE_STRING dest, PWSTR buf,
|
||||||
USHORT len)
|
USHORT len)
|
||||||
{
|
{
|
||||||
dest->Length = 0;
|
dest->Length = 0;
|
||||||
dest->MaximumLength = len;
|
dest->MaximumLength = len;
|
||||||
dest->Buffer = (PWSTR) buf;
|
dest->Buffer = buf;
|
||||||
}
|
}
|
||||||
/* Like RtlInitEmptyUnicodeString, but initialize Length to len, too.
|
/* Like RtlInitEmptyUnicodeString, but initialize Length to len, too.
|
||||||
This is for instance useful when creating a UNICODE_STRING from an
|
This is for instance useful when creating a UNICODE_STRING from an
|
||||||
|
|
|
@ -561,7 +561,7 @@ try_to_bin (path_conv &pc, HANDLE &fh, ACCESS_MASK access, ULONG flags)
|
||||||
{
|
{
|
||||||
/* In the remote case we need the full path, but recycler is only
|
/* In the remote case we need the full path, but recycler is only
|
||||||
a relative path. Convert to absolute path. */
|
a relative path. Convert to absolute path. */
|
||||||
RtlInitEmptyUnicodeString (&fname, (PCWSTR) tp.w_get (),
|
RtlInitEmptyUnicodeString (&fname, tp.w_get (),
|
||||||
(NT_MAX_PATH - 1) * sizeof (WCHAR));
|
(NT_MAX_PATH - 1) * sizeof (WCHAR));
|
||||||
RtlCopyUnicodeString (&fname, pc.get_nt_native_path ());
|
RtlCopyUnicodeString (&fname, pc.get_nt_native_path ());
|
||||||
RtlSplitUnicodePath (&fname, &fname, NULL);
|
RtlSplitUnicodePath (&fname, &fname, NULL);
|
||||||
|
|
Loading…
Reference in New Issue