From aaae70ff0521909a4cbc673bb9461b571edcdaf5 Mon Sep 17 00:00:00 2001 From: akallabeth Date: Mon, 14 Nov 2022 10:17:03 +0100 Subject: [PATCH] Fixed missing const casts --- channels/drdynvc/client/drdynvc_main.c | 4 ++-- libfreerdp/core/license.c | 6 +++--- winpr/libwinpr/clipboard/clipboard.c | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/channels/drdynvc/client/drdynvc_main.c b/channels/drdynvc/client/drdynvc_main.c index d258493e3..d781401e5 100644 --- a/channels/drdynvc/client/drdynvc_main.c +++ b/channels/drdynvc/client/drdynvc_main.c @@ -256,13 +256,13 @@ static BOOL channelIdMatch(const void* k1, const void* k2) { WINPR_ASSERT(k1); WINPR_ASSERT(k2); - return *((UINT32*)k1) == *((UINT32*)k2); + return *((const UINT32*)k1) == *((const UINT32*)k2); } static UINT32 channelIdHash(const void* id) { WINPR_ASSERT(id); - return *((UINT32*)id); + return *((const UINT32*)id); } static void channelByIdCleanerFn(void* value) diff --git a/libfreerdp/core/license.c b/libfreerdp/core/license.c index 057fe399c..aa521e805 100644 --- a/libfreerdp/core/license.c +++ b/libfreerdp/core/license.c @@ -2693,7 +2693,7 @@ BOOL license_server_configure(rdpLicense* license) UINT32 ProductVersion, issuerCount; const char* CompanyName; const char* ProductName; - const char** issuers; + const char* const* issuers; WINPR_ASSERT(license); WINPR_ASSERT(license->rdp); @@ -2705,8 +2705,8 @@ BOOL license_server_configure(rdpLicense* license) ProductName = freerdp_settings_get_string(settings, FreeRDP_ServerLicenseProductName); ProductVersion = freerdp_settings_get_uint32(settings, FreeRDP_ServerLicenseProductVersion); issuerCount = freerdp_settings_get_uint32(settings, FreeRDP_ServerLicenseProductIssuersCount); - issuers = - (const char**)freerdp_settings_get_pointer(settings, FreeRDP_ServerLicenseProductIssuers); + issuers = (const char* const*)freerdp_settings_get_pointer(settings, + FreeRDP_ServerLicenseProductIssuers); WINPR_ASSERT(CompanyName); WINPR_ASSERT(ProductName); diff --git a/winpr/libwinpr/clipboard/clipboard.c b/winpr/libwinpr/clipboard/clipboard.c index a5570641e..da5fadfd8 100644 --- a/winpr/libwinpr/clipboard/clipboard.c +++ b/winpr/libwinpr/clipboard/clipboard.c @@ -687,7 +687,7 @@ char* parse_uri_to_local_file(const char* uri, size_t uri_len) if (is_dos_drive(&uri[prefixLen + 1], uri_len - prefixLen - 1)) { // Dos and Windows file URI - localName = (char*)(uri + prefixLen + 1); + localName = (const char*)(uri + prefixLen + 1); localLen = uri_len - prefixLen - 1; } else