From 9e250e62be58202e3432d2478e31594795b8e4e4 Mon Sep 17 00:00:00 2001 From: Ilya Shipitsin Date: Fri, 30 Nov 2018 00:01:11 +0500 Subject: [PATCH] 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. --- src/Mayaqua/Mayaqua.c | 66 ------------------------------------------- src/Mayaqua/Mayaqua.h | 3 -- 2 files changed, 69 deletions(-) diff --git a/src/Mayaqua/Mayaqua.c b/src/Mayaqua/Mayaqua.c index 5cb04c31..7d6f2f99 100644 --- a/src/Mayaqua/Mayaqua.c +++ b/src/Mayaqua/Mayaqua.c @@ -434,12 +434,6 @@ bool Is32() return Is64() ? false : true; } -// .NET mode -void MayaquaDotNetMode() -{ - dot_net_mode = true; -} - // Acquisition whether in .NET mode bool MayaquaIsDotNetMode() { @@ -480,18 +474,6 @@ bool IsNt() 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 void InitMayaqua(bool memcheck, bool debug, int argc, char **argv) { @@ -750,7 +732,6 @@ void CheckUnixTempDir() { Print("Unable to use /tmp.\n\n"); exit(0); - return; } } @@ -770,53 +751,6 @@ void AlertW(wchar_t *msg, wchar_t *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 UINT GetOsType() { diff --git a/src/Mayaqua/Mayaqua.h b/src/Mayaqua/Mayaqua.h index ede43f1e..ca2878e5 100644 --- a/src/Mayaqua/Mayaqua.h +++ b/src/Mayaqua/Mayaqua.h @@ -540,8 +540,6 @@ if (IsTrackingEnabled()) { \ void InitMayaqua(bool memcheck, bool debug, int argc, char **argv); void FreeMayaqua(); bool IsNt(); -bool IsUnicode(); -void MayaquaDotNetMode(); bool MayaquaIsDotNetMode(); void MayaquaMinimalMode(); bool MayaquaIsMinimalMode(); @@ -571,7 +569,6 @@ void Alert(char *msg, char *caption); void AlertW(wchar_t *msg, wchar_t *caption); OS_INFO *GetOsInfo(); UINT GetOsType(); -void PrintOsInfo(OS_INFO *info); void CheckEndian(); void CheckUnixTempDir(); void TimeCheck();