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

src/Mayaqua/Mayaqua: remove unused functions

found by cppcheck

[src/Mayaqua/Mayaqua.c:753]: (style) Consecutive return, break, continue, goto or throw statements are unnecessary.
[src/Mayaqua/Mayaqua.c:484]: (style) The function 'IsUnicode' is never used.
[src/Mayaqua/Mayaqua.c:438]: (style) The function 'MayaquaDotNetMode' is never used.
[src/Mayaqua/Mayaqua.c:774]: (style) The function 'PrintOsInfo' is never used.
This commit is contained in:
Ilya Shipitsin 2018-11-30 00:01:11 +05:00
parent bf0d5c551e
commit 9e250e62be
2 changed files with 0 additions and 69 deletions

View File

@ -434,12 +434,6 @@ bool Is32()
return Is64() ? false : true; return Is64() ? false : true;
} }
// .NET mode
void MayaquaDotNetMode()
{
dot_net_mode = true;
}
// Acquisition whether in .NET mode // Acquisition whether in .NET mode
bool MayaquaIsDotNetMode() bool MayaquaIsDotNetMode()
{ {
@ -480,18 +474,6 @@ bool IsNt()
return is_nt; return is_nt;
} }
// Whether the Unicode is supported
bool IsUnicode()
{
#ifdef OS_WIN32
// Windows
return IsNt();
#else // OS_WIN32
// UNIX
return true;
#endif // OS_WIN32
}
// Initialization of Mayaqua library // Initialization of Mayaqua library
void InitMayaqua(bool memcheck, bool debug, int argc, char **argv) void InitMayaqua(bool memcheck, bool debug, int argc, char **argv)
{ {
@ -750,7 +732,6 @@ void CheckUnixTempDir()
{ {
Print("Unable to use /tmp.\n\n"); Print("Unable to use /tmp.\n\n");
exit(0); exit(0);
return;
} }
} }
@ -770,53 +751,6 @@ void AlertW(wchar_t *msg, wchar_t *caption)
OSAlertW(msg, caption); OSAlertW(msg, caption);
} }
// Display of OS information
void PrintOsInfo(OS_INFO *info)
{
// Validate arguments
if (info == NULL)
{
return;
}
Print(
"OS Type : %u\n"
"OS Service Pack : %u\n"
"os_is_windows : %s\n"
"os_is_windows_nt : %s\n"
"OS System Name : %s\n"
"OS Product Name : %s\n"
"OS Vendor Name : %s\n"
"OS Version : %s\n"
"Kernel Name : %s\n"
"Kernel Version : %s\n",
info->OsType,
info->OsServicePack,
OS_IS_WINDOWS(info->OsType) ? "true" : "false",
OS_IS_WINDOWS_NT(info->OsType) ? "true" : "false",
info->OsSystemName,
info->OsProductName,
info->OsVendorName,
info->OsVersion,
info->KernelName,
info->KernelVersion);
#ifdef OS_WIN32
{
char *exe, *dir;
exe = MsGetExeFileName();
dir = MsGetExeDirName();
Print(
"EXE File Path : %s\n"
"EXE Dir Path : %s\n"
"Process Id : %u\n"
"Process Handle : 0x%X\n",
exe, dir, MsGetCurrentProcessId(), MsGetCurrentProcess());
}
#endif // OS_WIN32
}
// Get the OS type // Get the OS type
UINT GetOsType() UINT GetOsType()
{ {

View File

@ -540,8 +540,6 @@ if (IsTrackingEnabled()) { \
void InitMayaqua(bool memcheck, bool debug, int argc, char **argv); void InitMayaqua(bool memcheck, bool debug, int argc, char **argv);
void FreeMayaqua(); void FreeMayaqua();
bool IsNt(); bool IsNt();
bool IsUnicode();
void MayaquaDotNetMode();
bool MayaquaIsDotNetMode(); bool MayaquaIsDotNetMode();
void MayaquaMinimalMode(); void MayaquaMinimalMode();
bool MayaquaIsMinimalMode(); bool MayaquaIsMinimalMode();
@ -571,7 +569,6 @@ void Alert(char *msg, char *caption);
void AlertW(wchar_t *msg, wchar_t *caption); void AlertW(wchar_t *msg, wchar_t *caption);
OS_INFO *GetOsInfo(); OS_INFO *GetOsInfo();
UINT GetOsType(); UINT GetOsType();
void PrintOsInfo(OS_INFO *info);
void CheckEndian(); void CheckEndian();
void CheckUnixTempDir(); void CheckUnixTempDir();
void TimeCheck(); void TimeCheck();