fixed const and type cast warnings

This commit is contained in:
Armin Novak 2022-11-28 13:32:40 +01:00 committed by Bernhard Miklautz
parent 0186a9b303
commit bd7e2263ad
6 changed files with 21 additions and 21 deletions

View File

@ -673,7 +673,7 @@ wlf_cliprdr_server_format_data_request(CliprdrClientContext* context,
else
{
size_t len = 0;
cdata = ConvertUtf8NToWCharAlloc(data, size, &len);
cdata = ConvertUtf8NToWCharAlloc((char*)data, size, &len);
free(data);
data = NULL;

View File

@ -1248,9 +1248,9 @@ UINT xf_AppUpdateWindowFromSurface(xfContext* xfc, gdiGfxSurface* surface)
if (!appWindow->image)
{
WINPR_ASSERT(xfc->depth != 0);
appWindow->image =
XCreateImage(xfc->display, xfc->visual, xfc->depth, ZPixmap, 0, surface->data,
surface->width, surface->height, xfc->scanline_pad, surface->scanline);
appWindow->image = XCreateImage(xfc->display, xfc->visual, xfc->depth, ZPixmap, 0,
(char*)surface->data, surface->width, surface->height,
xfc->scanline_pad, surface->scanline);
if (!appWindow->image)
{
WLog_WARN(TAG,

View File

@ -105,7 +105,7 @@ static BOOL rdp_read_info_null_string(UINT32 flags, wStream* s, size_t cbLen, CH
}
else
{
const char* domain = Stream_Pointer(s);
const char* domain = (const char*)Stream_Pointer(s);
if (!Stream_SafeSeek(s, cbLen))
return FALSE;

View File

@ -175,13 +175,13 @@ WCHAR* _wcsstr(const WCHAR* str, const WCHAR* strSearch)
WINPR_ASSERT(strSearch);
if (strSearch[0] == '\0')
return str;
return (WCHAR*)str;
const size_t searchLen = _wcslen(strSearch);
while (*str)
{
if (_wcsncmp(str, strSearch, searchLen) == 0)
return str;
return (WCHAR*)str;
str++;
}
return NULL;

View File

@ -812,8 +812,8 @@ static SECURITY_STATUS NCryptP11EnumKeys(NCRYPT_PROV_HANDLE hProvider, LPCWSTR p
return NTE_NO_MORE_ITEMS;
}
static SECURITY_STATUS get_piv_container_name(NCryptP11KeyHandle* key, BYTE* piv_tag, BYTE* output,
size_t output_len)
static SECURITY_STATUS get_piv_container_name(NCryptP11KeyHandle* key, const BYTE* piv_tag,
BYTE* output, size_t output_len)
{
CK_SLOT_INFO slot_info = { 0 };
CK_FUNCTION_LIST_PTR p11 = NULL;

View File

@ -614,9 +614,9 @@ BOOL sspi_CopyAuthIdentityFieldsA(const SEC_WINNT_AUTH_IDENTITY_INFO* identity,
char** pDomain, char** pPassword)
{
BOOL success = FALSE;
char* UserA = NULL;
char* DomainA = NULL;
char* PasswordA = NULL;
const char* UserA = NULL;
const char* DomainA = NULL;
const char* PasswordA = NULL;
const WCHAR* UserW = NULL;
const WCHAR* DomainW = NULL;
const WCHAR* PasswordW = NULL;
@ -710,9 +710,9 @@ BOOL sspi_CopyAuthIdentityFieldsW(const SEC_WINNT_AUTH_IDENTITY_INFO* identity,
const char* UserA = NULL;
const char* DomainA = NULL;
const char* PasswordA = NULL;
WCHAR* UserW = NULL;
WCHAR* DomainW = NULL;
WCHAR* PasswordW = NULL;
const WCHAR* UserW = NULL;
const WCHAR* DomainW = NULL;
const WCHAR* PasswordW = NULL;
UINT32 UserLength = 0;
UINT32 DomainLength = 0;
UINT32 PasswordLength = 0;
@ -866,12 +866,12 @@ int sspi_CopyAuthIdentity(SEC_WINNT_AUTH_IDENTITY* identity,
{
int status;
UINT32 identityFlags;
char* UserA = NULL;
char* DomainA = NULL;
char* PasswordA = NULL;
WCHAR* UserW = NULL;
WCHAR* DomainW = NULL;
WCHAR* PasswordW = NULL;
const char* UserA = NULL;
const char* DomainA = NULL;
const char* PasswordA = NULL;
const WCHAR* UserW = NULL;
const WCHAR* DomainW = NULL;
const WCHAR* PasswordW = NULL;
UINT32 UserLength = 0;
UINT32 DomainLength = 0;
UINT32 PasswordLength = 0;