[warnings] fix -Wcast-qual

This commit is contained in:
akallabeth 2023-11-24 09:17:24 +01:00 committed by akallabeth
parent 5ffaf12748
commit dd2d110870
5 changed files with 12 additions and 12 deletions

View File

@ -1220,7 +1220,7 @@ static UINT cliprdr_file_context_server_file_contents_response(
DEBUG_CLIPRDR(file_context->log, "Received file size for file \"%s\" with stream id %u",
fuse_request->fuse_file->filename, file_contents_response->streamId);
fuse_request->fuse_file->size = *((UINT64*)file_contents_response->requestedData);
fuse_request->fuse_file->size = *((const UINT64*)file_contents_response->requestedData);
fuse_request->fuse_file->has_size = TRUE;
entry.ino = fuse_request->fuse_file->ino;

View File

@ -2095,7 +2095,7 @@ int ncrush_decompress(NCRUSH_CONTEXT* ncrush, const BYTE* pSrcData, UINT32 SrcSi
if (HistoryPtr >= HistoryBufferEnd)
{
WLog_ERR(TAG, "ncrush_decompress error: HistoryPtr (%p) >= HistoryBufferEnd (%p)",
(void*)HistoryPtr, (void*)HistoryBufferEnd);
(const void*)HistoryPtr, (const void*)HistoryBufferEnd);
return -1003;
}

View File

@ -73,10 +73,10 @@ struct rdp_assistance_file
char* password;
};
static char* strrstr(const char* haystack, size_t len, const char* needle)
static const char* strrstr(const char* haystack, size_t len, const char* needle)
{
if (*needle == '\0')
return (char*)haystack;
return (const char*)haystack;
char* result = NULL;
for (;;)
@ -538,8 +538,8 @@ static char* freerdp_assistance_contains_element(char* input, size_t ilen, const
return NULL;
}
char* end = start;
char* dend = start - 1;
const char* end = start;
const char* dend = start - 1;
if (*dend != '/')
{
char ekey[128] = { 0 };

View File

@ -340,8 +340,8 @@ static WINPR_CIPHER_CTX* treatAuthBlob(const BYTE* pbInput, size_t cbInput)
WINPR_CIPHER_CTX* ret = NULL;
char algoName[100] = { 0 };
SSIZE_T algoSz =
ConvertWCharNToUtf8((WCHAR*)pbInput, cbInput / sizeof(WCHAR), algoName, sizeof(algoName));
SSIZE_T algoSz = ConvertWCharNToUtf8((const WCHAR*)pbInput, cbInput / sizeof(WCHAR), algoName,
sizeof(algoName));
if (algoSz <= 0)
{
WLog_ERR(TAG, "invalid algoName");

View File

@ -34,7 +34,7 @@
#define container_of(ptr, type, member) \
({ \
const __typeof__(((type*)0)->member)* __mptr = (ptr); \
__typeof__(((type*)0)->member)* __mptr = (ptr); \
(type*)((char*)__mptr - offsetof(type, member)); \
})