1
0
mirror of https://github.com/SoftEtherVPN/SoftEtherVPN.git synced 2024-11-22 17:39:53 +03:00

src/Mayaqua/FileIO.c: guard win32_drive_char with "#ifdef OS_WIN32"

to avoid coverity warning
This commit is contained in:
Ilya Shipitsin 2018-08-11 21:50:08 +05:00 committed by Davide Beatrici
parent c3bf75e8e0
commit 5d2b977b4b

View File

@ -1912,7 +1912,9 @@ void NormalizePathW(wchar_t *dst, UINT size, wchar_t *src)
UNI_TOKEN_LIST *t; UNI_TOKEN_LIST *t;
bool first_double_slash = false; bool first_double_slash = false;
bool first_single_slash = false; bool first_single_slash = false;
#ifdef OS_WIN32
wchar_t win32_drive_char = 0; wchar_t win32_drive_char = 0;
#endif // OS_WIN32
bool is_full_path = false; bool is_full_path = false;
UINT i; UINT i;
SK *sk; SK *sk;
@ -2036,6 +2038,7 @@ void NormalizePathW(wchar_t *dst, UINT size, wchar_t *src)
UniStrCat(tmp, sizeof(tmp), L"/"); UniStrCat(tmp, sizeof(tmp), L"/");
} }
#ifdef OS_WIN32
if (win32_drive_char != 0) if (win32_drive_char != 0)
{ {
wchar_t d[2]; wchar_t d[2];
@ -2044,6 +2047,7 @@ void NormalizePathW(wchar_t *dst, UINT size, wchar_t *src)
UniStrCat(tmp, sizeof(tmp), d); UniStrCat(tmp, sizeof(tmp), d);
UniStrCat(tmp, sizeof(tmp), L":/"); UniStrCat(tmp, sizeof(tmp), L":/");
} }
#endif // OS_WIN32
for (i = 0;i < sk->num_item;i++) for (i = 0;i < sk->num_item;i++)
{ {