diff --git a/libfreerdp/common/settings.c b/libfreerdp/common/settings.c index 776a55757..05f672da5 100644 --- a/libfreerdp/common/settings.c +++ b/libfreerdp/common/settings.c @@ -657,507 +657,380 @@ BOOL freerdp_get_param_bool(rdpSettings* settings, int id) { case FreeRDP_ServerMode: return settings->ServerMode; - break; case FreeRDP_NetworkAutoDetect: return settings->NetworkAutoDetect; - break; case FreeRDP_SupportAsymetricKeys: return settings->SupportAsymetricKeys; - break; case FreeRDP_SupportErrorInfoPdu: return settings->SupportErrorInfoPdu; - break; case FreeRDP_SupportStatusInfoPdu: return settings->SupportStatusInfoPdu; - break; case FreeRDP_SupportMonitorLayoutPdu: return settings->SupportMonitorLayoutPdu; - break; case FreeRDP_SupportGraphicsPipeline: return settings->SupportGraphicsPipeline; - break; case FreeRDP_SupportDynamicTimeZone: return settings->SupportDynamicTimeZone; - break; case FreeRDP_DisableEncryption: return settings->DisableEncryption; - break; case FreeRDP_ConsoleSession: return settings->ConsoleSession; - break; case FreeRDP_SpanMonitors: return settings->SpanMonitors; - break; case FreeRDP_UseMultimon: return settings->UseMultimon; - break; case FreeRDP_ForceMultimon: return settings->ForceMultimon; - break; case FreeRDP_AutoLogonEnabled: return settings->AutoLogonEnabled; - break; case FreeRDP_CompressionEnabled: return settings->CompressionEnabled; - break; case FreeRDP_DisableCtrlAltDel: return settings->DisableCtrlAltDel; - break; case FreeRDP_EnableWindowsKey: return settings->EnableWindowsKey; - break; case FreeRDP_MaximizeShell: return settings->MaximizeShell; - break; case FreeRDP_LogonNotify: return settings->LogonNotify; - break; case FreeRDP_LogonErrors: return settings->LogonErrors; - break; case FreeRDP_MouseAttached: return settings->MouseAttached; - break; case FreeRDP_MouseHasWheel: return settings->MouseHasWheel; - break; case FreeRDP_RemoteConsoleAudio: return settings->RemoteConsoleAudio; - break; case FreeRDP_AudioPlayback: return settings->AudioPlayback; - break; case FreeRDP_AudioCapture: return settings->AudioCapture; - break; case FreeRDP_VideoDisable: return settings->VideoDisable; - break; case FreeRDP_PasswordIsSmartcardPin: return settings->PasswordIsSmartcardPin; - break; case FreeRDP_UsingSavedCredentials: return settings->UsingSavedCredentials; - break; case FreeRDP_ForceEncryptedCsPdu: return settings->ForceEncryptedCsPdu; - break; case FreeRDP_HiDefRemoteApp: return settings->HiDefRemoteApp; - break; case FreeRDP_IPv6Enabled: return settings->IPv6Enabled; - break; case FreeRDP_AutoReconnectionEnabled: return settings->AutoReconnectionEnabled; - break; case FreeRDP_DynamicDaylightTimeDisabled: return settings->DynamicDaylightTimeDisabled; - break; case FreeRDP_AllowFontSmoothing: return settings->AllowFontSmoothing; - break; case FreeRDP_DisableWallpaper: return settings->DisableWallpaper; - break; case FreeRDP_DisableFullWindowDrag: return settings->DisableFullWindowDrag; - break; case FreeRDP_DisableMenuAnims: return settings->DisableMenuAnims; - break; case FreeRDP_DisableThemes: return settings->DisableThemes; - break; case FreeRDP_DisableCursorShadow: return settings->DisableCursorShadow; - break; case FreeRDP_DisableCursorBlinking: return settings->DisableCursorBlinking; - break; case FreeRDP_AllowDesktopComposition: return settings->AllowDesktopComposition; - break; case FreeRDP_RemoteAssistanceMode: return settings->RemoteAssistanceMode; - break; case FreeRDP_TlsSecurity: return settings->TlsSecurity; - break; case FreeRDP_NlaSecurity: return settings->NlaSecurity; - break; case FreeRDP_RdpSecurity: return settings->RdpSecurity; - break; case FreeRDP_ExtSecurity: return settings->ExtSecurity; - break; case FreeRDP_Authentication: return settings->Authentication; - break; case FreeRDP_NegotiateSecurityLayer: return settings->NegotiateSecurityLayer; - break; case FreeRDP_RestrictedAdminModeRequired: return settings->RestrictedAdminModeRequired; - break; case FreeRDP_DisableCredentialsDelegation: return settings->DisableCredentialsDelegation; - break; case FreeRDP_AuthenticationLevel: return settings->AuthenticationLevel; - break; case FreeRDP_MstscCookieMode: return settings->MstscCookieMode; - break; case FreeRDP_SendPreconnectionPdu: return settings->SendPreconnectionPdu; - break; case FreeRDP_IgnoreCertificate: return settings->IgnoreCertificate; - break; case FreeRDP_ExternalCertificateManagement: return settings->ExternalCertificateManagement; - break; case FreeRDP_Workarea: return settings->Workarea; - break; case FreeRDP_Fullscreen: return settings->Fullscreen; - break; case FreeRDP_GrabKeyboard: return settings->GrabKeyboard; - break; case FreeRDP_Decorations: return settings->Decorations; - break; case FreeRDP_SmartSizing: return settings->SmartSizing; - break; case FreeRDP_MouseMotion: return settings->MouseMotion; - break; case FreeRDP_AsyncInput: return settings->AsyncInput; - break; case FreeRDP_AsyncUpdate: return settings->AsyncUpdate; - break; case FreeRDP_AsyncChannels: return settings->AsyncChannels; - break; case FreeRDP_AsyncTransport: return settings->AsyncTransport; - break; case FreeRDP_ToggleFullscreen: return settings->ToggleFullscreen; - break; case FreeRDP_SoftwareGdi: return settings->SoftwareGdi; - break; case FreeRDP_LocalConnection: return settings->LocalConnection; - break; case FreeRDP_AuthenticationOnly: return settings->AuthenticationOnly; - break; case FreeRDP_CredentialsFromStdin: return settings->CredentialsFromStdin; - break; case FreeRDP_DumpRemoteFx: return settings->DumpRemoteFx; - break; case FreeRDP_PlayRemoteFx: return settings->PlayRemoteFx; - break; case FreeRDP_GatewayUseSameCredentials: return settings->GatewayUseSameCredentials; - break; case FreeRDP_GatewayEnabled: return settings->GatewayEnabled; - break; case FreeRDP_GatewayBypassLocal: return settings->GatewayBypassLocal; - break; case FreeRDP_RemoteApplicationMode: return settings->RemoteApplicationMode; - break; case FreeRDP_DisableRemoteAppCapsCheck: return settings->DisableRemoteAppCapsCheck; - break; case FreeRDP_RemoteAppLanguageBarSupported: return settings->RemoteAppLanguageBarSupported; - break; case FreeRDP_RefreshRect: return settings->RefreshRect; - break; case FreeRDP_SuppressOutput: return settings->SuppressOutput; - break; case FreeRDP_FastPathOutput: return settings->FastPathOutput; - break; case FreeRDP_SaltedChecksum: return settings->SaltedChecksum; - break; case FreeRDP_LongCredentialsSupported: return settings->LongCredentialsSupported; - break; case FreeRDP_NoBitmapCompressionHeader: return settings->NoBitmapCompressionHeader; - break; case FreeRDP_BitmapCompressionDisabled: return settings->BitmapCompressionDisabled; - break; case FreeRDP_DesktopResize: return settings->DesktopResize; - break; case FreeRDP_DrawAllowDynamicColorFidelity: return settings->DrawAllowDynamicColorFidelity; - break; case FreeRDP_DrawAllowColorSubsampling: return settings->DrawAllowColorSubsampling; - break; case FreeRDP_DrawAllowSkipAlpha: return settings->DrawAllowSkipAlpha; - break; case FreeRDP_BitmapCacheV3Enabled: return settings->BitmapCacheV3Enabled; - break; case FreeRDP_AltSecFrameMarkerSupport: return settings->AltSecFrameMarkerSupport; - break; case FreeRDP_BitmapCacheEnabled: return settings->BitmapCacheEnabled; - break; case FreeRDP_AllowCacheWaitingList: return settings->AllowCacheWaitingList; - break; case FreeRDP_BitmapCachePersistEnabled: return settings->BitmapCachePersistEnabled; - break; case FreeRDP_ColorPointerFlag: return settings->ColorPointerFlag; - break; case FreeRDP_UnicodeInput: return settings->UnicodeInput; - break; case FreeRDP_FastPathInput: return settings->FastPathInput; - break; case FreeRDP_MultiTouchInput: return settings->MultiTouchInput; - break; case FreeRDP_MultiTouchGestures: return settings->MultiTouchGestures; - break; case FreeRDP_SoundBeepsEnabled: return settings->SoundBeepsEnabled; - break; case FreeRDP_SurfaceCommandsEnabled: return settings->SurfaceCommandsEnabled; - break; case FreeRDP_FrameMarkerCommandEnabled: return settings->FrameMarkerCommandEnabled; - break; case FreeRDP_RemoteFxOnly: return settings->RemoteFxOnly; - break; case FreeRDP_RemoteFxCodec: return settings->RemoteFxCodec; - break; case FreeRDP_RemoteFxImageCodec: return settings->RemoteFxImageCodec; - break; case FreeRDP_NSCodec: return settings->NSCodec; - break; case FreeRDP_FrameAcknowledge: return settings->FrameAcknowledge; - break; case FreeRDP_JpegCodec: return settings->JpegCodec; - break; case FreeRDP_GfxThinClient: return settings->GfxThinClient; - break; case FreeRDP_GfxSmallCache: return settings->GfxSmallCache; - break; case FreeRDP_GfxProgressive: return settings->GfxProgressive; - break; case FreeRDP_GfxProgressiveV2: return settings->GfxProgressiveV2; - break; case FreeRDP_GfxH264: return settings->GfxH264; - break; case FreeRDP_DrawNineGridEnabled: return settings->DrawNineGridEnabled; - break; case FreeRDP_DrawGdiPlusEnabled: return settings->DrawGdiPlusEnabled; - break; case FreeRDP_DrawGdiPlusCacheEnabled: return settings->DrawGdiPlusCacheEnabled; - break; case FreeRDP_DeviceRedirection: return settings->DeviceRedirection; - break; case FreeRDP_RedirectDrives: return settings->RedirectDrives; - break; case FreeRDP_RedirectHomeDrive: return settings->RedirectHomeDrive; - break; case FreeRDP_RedirectSmartCards: return settings->RedirectSmartCards; - break; case FreeRDP_RedirectPrinters: return settings->RedirectPrinters; - break; case FreeRDP_RedirectSerialPorts: return settings->RedirectSerialPorts; - break; case FreeRDP_RedirectParallelPorts: return settings->RedirectParallelPorts; - break; case FreeRDP_RedirectClipboard: return settings->RedirectClipboard; - break; default: fprintf(stderr, "freerdp_get_param_bool: unknown id: %d\n", id); return -1; - break; } - - return -1; } int freerdp_set_param_bool(rdpSettings* settings, int id, BOOL param) @@ -1663,7 +1536,6 @@ int freerdp_set_param_bool(rdpSettings* settings, int id, BOOL param) default: fprintf(stderr, "freerdp_set_param_bool: unknown id %d (param = %d)\n", id, param); return -1; - break; } /* Mark field as modified */ @@ -1678,19 +1550,14 @@ int freerdp_get_param_int(rdpSettings* settings, int id) { case FreeRDP_XPan: return settings->XPan; - break; case FreeRDP_YPan: return settings->YPan; - break; default: fprintf(stderr, "freerdp_get_param_int: unknown id: %d\n", id); return 0; - break; } - - return 0; } int freerdp_set_param_int(rdpSettings* settings, int id, int param) @@ -1708,7 +1575,6 @@ int freerdp_set_param_int(rdpSettings* settings, int id, int param) default: fprintf(stderr, "freerdp_set_param_int: unknown id %d (param = %d)\n", id, param); return -1; - break; } settings->SettingsModified[id] = 1; @@ -1722,307 +1588,230 @@ UINT32 freerdp_get_param_uint32(rdpSettings* settings, int id) { case FreeRDP_ShareId: return settings->ShareId; - break; case FreeRDP_PduSource: return settings->PduSource; - break; case FreeRDP_ServerPort: return settings->ServerPort; - break; case FreeRDP_RdpVersion: return settings->RdpVersion; - break; case FreeRDP_DesktopWidth: return settings->DesktopWidth; - break; case FreeRDP_DesktopHeight: return settings->DesktopHeight; - break; case FreeRDP_ColorDepth: return settings->ColorDepth; - break; case FreeRDP_ConnectionType: return settings->ConnectionType; - break; case FreeRDP_ClientBuild: return settings->ClientBuild; - break; case FreeRDP_EarlyCapabilityFlags: return settings->EarlyCapabilityFlags; - break; case FreeRDP_EncryptionMethods: return settings->EncryptionMethods; - break; case FreeRDP_ExtEncryptionMethods: return settings->ExtEncryptionMethods; - break; case FreeRDP_EncryptionLevel: return settings->EncryptionLevel; - break; case FreeRDP_ChannelCount: return settings->ChannelCount; - break; case FreeRDP_ChannelDefArraySize: return settings->ChannelDefArraySize; - break; case FreeRDP_ClusterInfoFlags: return settings->ClusterInfoFlags; - break; case FreeRDP_RedirectedSessionId: return settings->RedirectedSessionId; - break; case FreeRDP_MonitorDefArraySize: return settings->MonitorDefArraySize; - break; case FreeRDP_DesktopPosX: return settings->DesktopPosX; - break; case FreeRDP_DesktopPosY: return settings->DesktopPosY; - break; case FreeRDP_MultitransportFlags: return settings->MultitransportFlags; - break; case FreeRDP_CompressionLevel: return settings->CompressionLevel; - break; case FreeRDP_AutoReconnectMaxRetries: return settings->AutoReconnectMaxRetries; - break; case FreeRDP_PerformanceFlags: return settings->PerformanceFlags; - break; case FreeRDP_RequestedProtocols: return settings->RequestedProtocols; - break; case FreeRDP_SelectedProtocol: return settings->SelectedProtocol; - break; case FreeRDP_NegotiationFlags: return settings->NegotiationFlags; - break; case FreeRDP_CookieMaxLength: return settings->CookieMaxLength; - break; case FreeRDP_PreconnectionId: return settings->PreconnectionId; - break; case FreeRDP_RedirectionFlags: return settings->RedirectionFlags; - break; case FreeRDP_LoadBalanceInfoLength: return settings->LoadBalanceInfoLength; - break; case FreeRDP_RedirectionPasswordLength: return settings->RedirectionPasswordLength; - break; case FreeRDP_RedirectionTsvUrlLength: return settings->RedirectionTsvUrlLength; - break; case FreeRDP_TargetNetAddressCount: return settings->TargetNetAddressCount; - break; case FreeRDP_PercentScreen: return settings->PercentScreen; - break; case FreeRDP_GatewayUsageMethod: return settings->GatewayUsageMethod; - break; case FreeRDP_GatewayPort: return settings->GatewayPort; - break; case FreeRDP_GatewayCredentialsSource: return settings->GatewayCredentialsSource; - break; case FreeRDP_RemoteAppNumIconCaches: return settings->RemoteAppNumIconCaches; - break; case FreeRDP_RemoteAppNumIconCacheEntries: return settings->RemoteAppNumIconCacheEntries; - break; case FreeRDP_ReceivedCapabilitiesSize: return settings->ReceivedCapabilitiesSize; - break; case FreeRDP_OsMajorType: return settings->OsMajorType; - break; case FreeRDP_OsMinorType: return settings->OsMinorType; - break; case FreeRDP_BitmapCacheVersion: return settings->BitmapCacheVersion; - break; case FreeRDP_BitmapCacheV2NumCells: return settings->BitmapCacheV2NumCells; - break; case FreeRDP_PointerCacheSize: return settings->PointerCacheSize; - break; case FreeRDP_KeyboardLayout: return settings->KeyboardLayout; - break; case FreeRDP_KeyboardType: return settings->KeyboardType; - break; case FreeRDP_KeyboardSubType: return settings->KeyboardSubType; - break; case FreeRDP_KeyboardFunctionKey: return settings->KeyboardFunctionKey; - break; case FreeRDP_BrushSupportLevel: return settings->BrushSupportLevel; - break; case FreeRDP_GlyphSupportLevel: return settings->GlyphSupportLevel; - break; case FreeRDP_OffscreenSupportLevel: return settings->OffscreenSupportLevel; - break; case FreeRDP_OffscreenCacheSize: return settings->OffscreenCacheSize; - break; case FreeRDP_OffscreenCacheEntries: return settings->OffscreenCacheEntries; - break; case FreeRDP_VirtualChannelCompressionFlags: return settings->VirtualChannelCompressionFlags; - break; case FreeRDP_VirtualChannelChunkSize: return settings->VirtualChannelChunkSize; - break; case FreeRDP_MultifragMaxRequestSize: return settings->MultifragMaxRequestSize; - break; case FreeRDP_LargePointerFlag: return settings->LargePointerFlag; - break; case FreeRDP_CompDeskSupportLevel: return settings->CompDeskSupportLevel; - break; case FreeRDP_RemoteFxCodecId: return settings->RemoteFxCodecId; - break; case FreeRDP_RemoteFxCodecMode: return settings->RemoteFxCodecMode; - break; case FreeRDP_NSCodecId: return settings->NSCodecId; - break; case FreeRDP_JpegCodecId: return settings->JpegCodecId; - break; case FreeRDP_JpegQuality: return settings->JpegQuality; - break; case FreeRDP_BitmapCacheV3CodecId: return settings->BitmapCacheV3CodecId; - break; case FreeRDP_DrawNineGridCacheSize: return settings->DrawNineGridCacheSize; - break; case FreeRDP_DrawNineGridCacheEntries: return settings->DrawNineGridCacheEntries; - break; case FreeRDP_DeviceCount: return settings->DeviceCount; - break; case FreeRDP_DeviceArraySize: return settings->DeviceArraySize; - break; case FreeRDP_StaticChannelCount: return settings->StaticChannelCount; - break; case FreeRDP_StaticChannelArraySize: return settings->StaticChannelArraySize; - break; case FreeRDP_DynamicChannelCount: return settings->DynamicChannelCount; - break; case FreeRDP_DynamicChannelArraySize: return settings->DynamicChannelArraySize; - break; default: fprintf(stderr, "freerdp_get_param_uint32: unknown id: %d\n", id); return 0; - break; } - - return 0; } int freerdp_set_param_uint32(rdpSettings* settings, int id, UINT32 param) @@ -2328,7 +2117,6 @@ int freerdp_set_param_uint32(rdpSettings* settings, int id, UINT32 param) default: fprintf(stderr, "freerdp_set_param_uint32: unknown id %d (param = %u)\n", id, param); return -1; - break; } /* Mark field as modified */ @@ -2343,15 +2131,11 @@ UINT64 freerdp_get_param_uint64(rdpSettings* settings, int id) { case FreeRDP_ParentWindowId: return settings->ParentWindowId; - break; default: fprintf(stderr, "freerdp_get_param_uint64: unknown id: %d\n", id); return -1; - break; } - - return 0; } int freerdp_set_param_uint64(rdpSettings* settings, int id, UINT64 param) @@ -2365,7 +2149,6 @@ int freerdp_set_param_uint64(rdpSettings* settings, int id, UINT64 param) default: fprintf(stderr, "freerdp_set_param_uint64: unknown id %d (param = %u)\n", id, (UINT32) param); return -1; - break; } /* Mark field as modified */ @@ -2380,191 +2163,143 @@ char* freerdp_get_param_string(rdpSettings* settings, int id) { case FreeRDP_ServerHostname: return settings->ServerHostname; - break; case FreeRDP_Username: return settings->Username; - break; case FreeRDP_Password: return settings->Password; - break; case FreeRDP_Domain: return settings->Domain; - break; case FreeRDP_PasswordHash: return settings->PasswordHash; - break; case FreeRDP_ClientHostname: return settings->ClientHostname; - break; case FreeRDP_ClientProductId: return settings->ClientProductId; - break; case FreeRDP_AlternateShell: return settings->AlternateShell; - break; case FreeRDP_ShellWorkingDirectory: return settings->ShellWorkingDirectory; - break; case FreeRDP_ClientAddress: return settings->ClientAddress; - break; case FreeRDP_ClientDir: return settings->ClientDir; - break; case FreeRDP_DynamicDSTTimeZoneKeyName: return settings->DynamicDSTTimeZoneKeyName; - break; case FreeRDP_RemoteAssistanceSessionId: return settings->RemoteAssistanceSessionId; - break; case FreeRDP_RemoteAssistancePassStub: return settings->RemoteAssistancePassStub; - break; case FreeRDP_RemoteAssistancePassword: return settings->RemoteAssistancePassword; - break; case FreeRDP_RemoteAssistanceRCTicket: return settings->RemoteAssistanceRCTicket; - break; case FreeRDP_AuthenticationServiceClass: return settings->AuthenticationServiceClass; - break; case FreeRDP_PreconnectionBlob: return settings->PreconnectionBlob; - break; case FreeRDP_KerberosKdc: return settings->KerberosKdc; - break; case FreeRDP_KerberosRealm: return settings->KerberosRealm; - break; case FreeRDP_CertificateName: return settings->CertificateName; - break; case FreeRDP_CertificateFile: return settings->CertificateFile; - break; case FreeRDP_PrivateKeyFile: return settings->PrivateKeyFile; - break; case FreeRDP_RdpKeyFile: return settings->RdpKeyFile; - break; case FreeRDP_WindowTitle: return settings->WindowTitle; - break; case FreeRDP_ComputerName: return settings->ComputerName; - break; case FreeRDP_ConnectionFile: return settings->ConnectionFile; - break; case FreeRDP_AssistanceFile: return settings->AssistanceFile; - break; case FreeRDP_HomePath: return settings->HomePath; - break; case FreeRDP_ConfigPath: return settings->ConfigPath; - break; case FreeRDP_CurrentPath: return settings->CurrentPath; - break; case FreeRDP_DumpRemoteFxFile: return settings->DumpRemoteFxFile; - break; case FreeRDP_PlayRemoteFxFile: return settings->PlayRemoteFxFile; - break; case FreeRDP_GatewayHostname: return settings->GatewayHostname; - break; case FreeRDP_GatewayUsername: return settings->GatewayUsername; - break; case FreeRDP_GatewayPassword: return settings->GatewayPassword; - break; case FreeRDP_GatewayDomain: return settings->GatewayDomain; - break; case FreeRDP_RemoteApplicationName: return settings->RemoteApplicationName; - break; case FreeRDP_RemoteApplicationIcon: return settings->RemoteApplicationIcon; - break; case FreeRDP_RemoteApplicationProgram: return settings->RemoteApplicationProgram; - break; case FreeRDP_RemoteApplicationFile: return settings->RemoteApplicationFile; - break; case FreeRDP_RemoteApplicationGuid: return settings->RemoteApplicationGuid; - break; case FreeRDP_RemoteApplicationCmdLine: return settings->RemoteApplicationCmdLine; - break; case FreeRDP_ImeFileName: return settings->ImeFileName; - break; case FreeRDP_DrivesToRedirect: return settings->DrivesToRedirect; - break; default: fprintf(stderr, "freerdp_get_param_string: unknown id: %d\n", id); return NULL; - break; } - - return NULL; } int freerdp_set_param_string(rdpSettings* settings, int id, const char* param) @@ -2799,7 +2534,6 @@ int freerdp_set_param_string(rdpSettings* settings, int id, const char* param) default: fprintf(stderr, "freerdp_set_param_string: unknown id %d (param = %s)\n", id, param); return -1; - break; } /* Mark field as modified */ @@ -2814,15 +2548,11 @@ double freerdp_get_param_double(rdpSettings* settings, int id) { case FreeRDP_ScalingFactor: return settings->ScalingFactor; - break; default: fprintf(stderr, "freerdp_get_param_double: unknown id: %d\n", id); return 0; - break; } - - return 0; } int freerdp_set_param_double(rdpSettings* settings, int id, double param) @@ -2835,7 +2565,6 @@ int freerdp_set_param_double(rdpSettings* settings, int id, double param) default: return -1; - break; } /* Mark field as modified */ diff --git a/winpr/libwinpr/crt/string.c b/winpr/libwinpr/crt/string.c index 0ecdc6a42..37bd6ebec 100644 --- a/winpr/libwinpr/crt/string.c +++ b/winpr/libwinpr/crt/string.c @@ -54,7 +54,7 @@ WCHAR* _wcsdup(const WCHAR* strSource) if (strSource == NULL) return NULL; -#if sun +#if defined(sun) && sun strDestination = wsdup(strSource); #elif defined(__APPLE__) && defined(__MACH__) || defined(ANDROID) strDestination = malloc(wcslen((wchar_t*)strSource)); diff --git a/winpr/libwinpr/interlocked/interlocked.c b/winpr/libwinpr/interlocked/interlocked.c index 0b8c0d45a..6490bb6f1 100644 --- a/winpr/libwinpr/interlocked/interlocked.c +++ b/winpr/libwinpr/interlocked/interlocked.c @@ -282,7 +282,7 @@ LONGLONG InterlockedCompareExchange64(LONGLONG volatile *Destination, LONGLONG E return previousValue; } -#elif ANDROID || (defined(__GNUC__) && !defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8)) +#elif (defined(ANDROID) && ANDROID) || (defined(__GNUC__) && !defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8)) #include diff --git a/winpr/libwinpr/synch/critical.c b/winpr/libwinpr/synch/critical.c index f67c373a3..0ea0def34 100644 --- a/winpr/libwinpr/synch/critical.c +++ b/winpr/libwinpr/synch/critical.c @@ -101,7 +101,7 @@ DWORD SetCriticalSectionSpinCount(LPCRITICAL_SECTION lpCriticalSection, DWORD dw #endif } -VOID _WaitForCriticalSection(LPCRITICAL_SECTION lpCriticalSection) +static VOID _WaitForCriticalSection(LPCRITICAL_SECTION lpCriticalSection) { #if defined(__APPLE__) semaphore_wait(*((winpr_sem_t*) lpCriticalSection->LockSemaphore)); @@ -110,7 +110,7 @@ VOID _WaitForCriticalSection(LPCRITICAL_SECTION lpCriticalSection) #endif } -VOID _UnWaitCriticalSection(LPCRITICAL_SECTION lpCriticalSection) +static VOID _UnWaitCriticalSection(LPCRITICAL_SECTION lpCriticalSection) { #if defined __APPLE__ semaphore_signal(*((winpr_sem_t*) lpCriticalSection->LockSemaphore)); diff --git a/winpr/libwinpr/sysinfo/sysinfo.c b/winpr/libwinpr/sysinfo/sysinfo.c index 572916ca3..fcef5b4cb 100644 --- a/winpr/libwinpr/sysinfo/sysinfo.c +++ b/winpr/libwinpr/sysinfo/sysinfo.c @@ -222,7 +222,6 @@ BOOL GetComputerNameExA(COMPUTER_NAME_FORMAT NameType, LPSTR lpBuffer, LPDWORD l default: return FALSE; - break; } return TRUE; diff --git a/winpr/libwinpr/utils/collections/BufferPool.c b/winpr/libwinpr/utils/collections/BufferPool.c index 3a0fda5b4..2b05263c6 100644 --- a/winpr/libwinpr/utils/collections/BufferPool.c +++ b/winpr/libwinpr/utils/collections/BufferPool.c @@ -34,7 +34,7 @@ * Methods */ -BOOL BufferPool_ShiftAvailable(wBufferPool* pool, int index, int count) +static BOOL BufferPool_ShiftAvailable(wBufferPool* pool, int index, int count) { if (count > 0) { @@ -61,7 +61,7 @@ BOOL BufferPool_ShiftAvailable(wBufferPool* pool, int index, int count) return TRUE; } -BOOL BufferPool_ShiftUsed(wBufferPool* pool, int index, int count) +static BOOL BufferPool_ShiftUsed(wBufferPool* pool, int index, int count) { if (count > 0) { diff --git a/winpr/libwinpr/utils/sam.c b/winpr/libwinpr/utils/sam.c index 8c3b91764..cf28fa243 100644 --- a/winpr/libwinpr/utils/sam.c +++ b/winpr/libwinpr/utils/sam.c @@ -68,7 +68,7 @@ WINPR_SAM* SamOpen(BOOL read_only) return sam; } -BOOL SamLookupStart(WINPR_SAM* sam) +static BOOL SamLookupStart(WINPR_SAM* sam) { size_t read_size; long int file_size; @@ -105,7 +105,7 @@ BOOL SamLookupStart(WINPR_SAM* sam) return TRUE; } -void SamLookupFinish(WINPR_SAM* sam) +static void SamLookupFinish(WINPR_SAM* sam) { free(sam->buffer); @@ -113,7 +113,7 @@ void SamLookupFinish(WINPR_SAM* sam) sam->line = NULL; } -void HexStrToBin(char* str, BYTE* bin, int length) +static void HexStrToBin(char* str, BYTE* bin, int length) { int i; diff --git a/winpr/libwinpr/utils/trio/triodef.h b/winpr/libwinpr/utils/trio/triodef.h index 11c14b9c4..ce2667b0a 100644 --- a/winpr/libwinpr/utils/trio/triodef.h +++ b/winpr/libwinpr/utils/trio/triodef.h @@ -168,9 +168,9 @@ #if defined(__cplusplus) # define PREDEF_STANDARD_CXX -#endif -#if __cplusplus - 0 >= 199711L -# define PREDEF_STANDARD_CXX89 +# if __cplusplus - 0 >= 199711L +# define PREDEF_STANDARD_CXX89 +# endif #endif #if defined(TRIO_PLATFORM_UNIX)