mirror of
https://github.com/FreeRDP/FreeRDP.git
synced 2024-11-23 18:03:30 +08:00
[warnings] fixed -Wdiscarded-qualifiers
This commit is contained in:
parent
cce3253fdf
commit
3043fca91d
@ -553,14 +553,16 @@ xfWindow* xf_CreateDesktopWindow(xfContext* xfc, char* name, int width, int heig
|
||||
{
|
||||
classHints->res_name = "xfreerdp";
|
||||
|
||||
char* res_class = NULL;
|
||||
const char* WmClass = freerdp_settings_get_string(settings, FreeRDP_WmClass);
|
||||
if (WmClass)
|
||||
classHints->res_class = WmClass;
|
||||
res_class = _strdup(WmClass);
|
||||
else
|
||||
classHints->res_class = "xfreerdp";
|
||||
res_class = _strdup("xfreerdp");
|
||||
|
||||
XSetClassHint(xfc->display, window->handle, classHints);
|
||||
XFree(classHints);
|
||||
free(res_class);
|
||||
}
|
||||
|
||||
xf_ResizeDesktopWindow(xfc, window, width, height);
|
||||
@ -852,14 +854,13 @@ BOOL xf_AppWindowCreate(xfContext* xfc, xfAppWindow* appWindow)
|
||||
|
||||
const char* WmClass = freerdp_settings_get_string(settings, FreeRDP_WmClass);
|
||||
if (WmClass)
|
||||
class_hints->res_class = WmClass;
|
||||
class = _strdup(WmClass);
|
||||
else
|
||||
{
|
||||
class = malloc(sizeof("RAIL:00000000"));
|
||||
sprintf_s(class, sizeof("RAIL:00000000"), "RAIL:%08" PRIX64 "", appWindow->windowId);
|
||||
class_hints->res_class = class;
|
||||
size_t size = 0;
|
||||
winpr_vasprintf(&class, &size, "RAIL:%08" PRIX64 "", appWindow->windowId);
|
||||
}
|
||||
|
||||
class_hints->res_class = class;
|
||||
class_hints->res_name = "RAIL";
|
||||
XSetClassHint(xfc->display, appWindow->handle, class_hints);
|
||||
XFree(class_hints);
|
||||
|
@ -1142,7 +1142,7 @@ BOOL client_common_get_access_token(freerdp* instance, const char* request, char
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
*token = (const char*)freerdp_utils_aad_get_access_token(log, response, response_length);
|
||||
*token = freerdp_utils_aad_get_access_token(log, (const char*)response, response_length);
|
||||
if (*token)
|
||||
ret = TRUE;
|
||||
|
||||
|
@ -5739,7 +5739,7 @@ BOOL freerdp_client_load_addins(rdpChannels* channels, rdpSettings* settings)
|
||||
}
|
||||
}
|
||||
|
||||
const char* RDP2TCPArgs = freerdp_settings_get_string(settings, FreeRDP_RDP2TCPArgs);
|
||||
char* RDP2TCPArgs = freerdp_settings_get_string_writable(settings, FreeRDP_RDP2TCPArgs);
|
||||
if (RDP2TCPArgs)
|
||||
{
|
||||
if (!freerdp_client_load_static_channel_addin(channels, settings, RDP2TCP_DVC_CHANNEL_NAME,
|
||||
|
@ -942,10 +942,8 @@ BOOL freerdp_image_scale(BYTE* WINPR_RESTRICT pDstData, DWORD DstFormat, UINT32
|
||||
nSrcStep = nSrcWidth * FreeRDPGetBytesPerPixel(SrcFormat);
|
||||
|
||||
#if defined(WITH_SWSCALE) || defined(WITH_CAIRO)
|
||||
const BYTE* WINPR_RESTRICT src =
|
||||
&pSrcData[nXSrc * FreeRDPGetBytesPerPixel(SrcFormat) + nYSrc * nSrcStep];
|
||||
BYTE* WINPR_RESTRICT dst =
|
||||
&pDstData[nXDst * FreeRDPGetBytesPerPixel(DstFormat) + nYDst * nDstStep];
|
||||
const BYTE* src = &pSrcData[nXSrc * FreeRDPGetBytesPerPixel(SrcFormat) + nYSrc * nSrcStep];
|
||||
BYTE* dst = &pDstData[nXDst * FreeRDPGetBytesPerPixel(DstFormat) + nYDst * nDstStep];
|
||||
#endif
|
||||
|
||||
/* direct copy is much faster than scaling, so check if we can simply copy... */
|
||||
|
@ -307,8 +307,7 @@ PVIRTUALCHANNELENTRY freerdp_load_dynamic_channel_addin_entry(LPCSTR pszName, LP
|
||||
const char pszPrefix[] = FREERDP_SHARED_LIBRARY_PREFIX;
|
||||
int rc = 0;
|
||||
|
||||
if (pszPrefix)
|
||||
cchFileName += strnlen(pszPrefix, ARRAYSIZE(pszPrefix));
|
||||
cchFileName += strnlen(pszPrefix, ARRAYSIZE(pszPrefix));
|
||||
if (pszExtension)
|
||||
cchFileName += strnlen(pszExtension, MAX_PATH) + 1;
|
||||
LPSTR tmp = calloc(cchFileName, sizeof(CHAR));
|
||||
|
Loading…
Reference in New Issue
Block a user