[client,common] fix incompatible-pointer-types

use a union to cast to expected types.
This commit is contained in:
akallabeth 2024-03-18 10:17:29 +01:00 committed by akallabeth
parent bcf189b6b3
commit c22d9844a4

View File

@ -2299,9 +2299,15 @@ BOOL freerdp_client_populate_settings_from_rdp_file(const rdpFile* file, rdpSett
if (~file->RedirectLocation) if (~file->RedirectLocation)
{ {
size_t count = 0; size_t count = 0;
char** str = CommandLineParseCommaSeparatedValuesEx(LOCATION_CHANNEL_NAME, NULL, &count); union
const BOOL rc = freerdp_client_add_dynamic_channel(settings, count, str); {
free(str); void* pv;
char** str;
const char** cstr;
} cnv;
cnv.str = CommandLineParseCommaSeparatedValuesEx(LOCATION_CHANNEL_NAME, NULL, &count);
const BOOL rc = freerdp_client_add_dynamic_channel(settings, count, cnv.cstr);
free(cnv.pv);
if (!rc) if (!rc)
return FALSE; return FALSE;
} }