[build] fixed compilation warnings
This commit is contained in:
parent
8f6b42b817
commit
b05eacb99e
@ -254,10 +254,10 @@ static void xf_draw_screen_scaled(xfContext* xfc, int x, int y, int w, int h)
|
||||
/* calculate and fix up scaled coordinates */
|
||||
x2 = x + w;
|
||||
y2 = y + h;
|
||||
x = (int)floor(x / xScalingFactor) - 1;
|
||||
y = (int)floor(y / yScalingFactor) - 1;
|
||||
w = (int)ceil(x2 / xScalingFactor) + 1 - x;
|
||||
h = (int)ceil(y2 / yScalingFactor) + 1 - y;
|
||||
x = ((int)floor(x / xScalingFactor)) - 1;
|
||||
y = ((int)floor(y / yScalingFactor)) - 1;
|
||||
w = ((int)ceil(x2 / xScalingFactor)) + 1 - x;
|
||||
h = ((int)ceil(y2 / yScalingFactor)) + 1 - y;
|
||||
XRenderSetPictureTransform(xfc->display, primaryPicture, &transform);
|
||||
XRenderComposite(xfc->display, PictOpSrc, primaryPicture, 0, windowPicture, x, y, 0, 0,
|
||||
xfc->offset_x + x, xfc->offset_y + y, w, h);
|
||||
|
@ -1025,13 +1025,11 @@ static BOOL xf_cliprdr_get_requested_data(xfClipboard* clipboard, Atom target)
|
||||
static void xf_cliprdr_append_target(xfClipboard* clipboard, Atom target)
|
||||
{
|
||||
WINPR_ASSERT(clipboard);
|
||||
if (clipboard->numTargets < 0)
|
||||
|
||||
if (clipboard->numTargets >= ARRAYSIZE(clipboard->targets))
|
||||
return;
|
||||
|
||||
if ((size_t)clipboard->numTargets >= ARRAYSIZE(clipboard->targets))
|
||||
return;
|
||||
|
||||
for (int i = 0; i < clipboard->numTargets; i++)
|
||||
for (size_t i = 0; i < clipboard->numTargets; i++)
|
||||
{
|
||||
if (clipboard->targets[i] == target)
|
||||
return;
|
||||
|
@ -3384,18 +3384,18 @@ static int freerdp_client_settings_parse_command_line_arguments_int(rdpSettings*
|
||||
freerdp_settings_get_uint32(settings, FreeRDP_ClipboardFeatureMask) &
|
||||
~(CLIPRDR_FLAG_LOCAL_TO_REMOTE | CLIPRDR_FLAG_REMOTE_TO_LOCAL);
|
||||
const PARSE_CLIP_DIR_RESULT bval = parse_clip_direciton_to_option(cur);
|
||||
UINT32 flags = 0;
|
||||
UINT32 bflags = 0;
|
||||
switch (bval)
|
||||
{
|
||||
case CLIP_DIR_PARSE_ALL:
|
||||
flags |=
|
||||
bflags |=
|
||||
CLIPRDR_FLAG_LOCAL_TO_REMOTE | CLIPRDR_FLAG_REMOTE_TO_LOCAL;
|
||||
break;
|
||||
case CLIP_DIR_PARSE_LOCAL:
|
||||
flags |= CLIPRDR_FLAG_REMOTE_TO_LOCAL;
|
||||
bflags |= CLIPRDR_FLAG_REMOTE_TO_LOCAL;
|
||||
break;
|
||||
case CLIP_DIR_PARSE_REMOTE:
|
||||
flags |= CLIPRDR_FLAG_LOCAL_TO_REMOTE;
|
||||
bflags |= CLIPRDR_FLAG_LOCAL_TO_REMOTE;
|
||||
break;
|
||||
case CLIP_DIR_PARSE_OFF:
|
||||
break;
|
||||
@ -3406,7 +3406,7 @@ static int freerdp_client_settings_parse_command_line_arguments_int(rdpSettings*
|
||||
}
|
||||
|
||||
if (!freerdp_settings_set_uint32(settings, FreeRDP_ClipboardFeatureMask,
|
||||
mask | flags))
|
||||
mask | bflags))
|
||||
rc = COMMAND_LINE_ERROR_UNEXPECTED_VALUE;
|
||||
}
|
||||
else if (option_starts_with("files-to", cur))
|
||||
@ -3416,18 +3416,18 @@ static int freerdp_client_settings_parse_command_line_arguments_int(rdpSettings*
|
||||
~(CLIPRDR_FLAG_LOCAL_TO_REMOTE_FILES |
|
||||
CLIPRDR_FLAG_REMOTE_TO_LOCAL_FILES);
|
||||
const PARSE_CLIP_DIR_RESULT bval = parse_clip_direciton_to_option(cur);
|
||||
UINT32 flags = 0;
|
||||
UINT32 bflags = 0;
|
||||
switch (bval)
|
||||
{
|
||||
case CLIP_DIR_PARSE_ALL:
|
||||
flags |= CLIPRDR_FLAG_LOCAL_TO_REMOTE_FILES |
|
||||
bflags |= CLIPRDR_FLAG_LOCAL_TO_REMOTE_FILES |
|
||||
CLIPRDR_FLAG_REMOTE_TO_LOCAL_FILES;
|
||||
break;
|
||||
case CLIP_DIR_PARSE_LOCAL:
|
||||
flags |= CLIPRDR_FLAG_REMOTE_TO_LOCAL_FILES;
|
||||
bflags |= CLIPRDR_FLAG_REMOTE_TO_LOCAL_FILES;
|
||||
break;
|
||||
case CLIP_DIR_PARSE_REMOTE:
|
||||
flags |= CLIPRDR_FLAG_LOCAL_TO_REMOTE_FILES;
|
||||
bflags |= CLIPRDR_FLAG_LOCAL_TO_REMOTE_FILES;
|
||||
break;
|
||||
case CLIP_DIR_PARSE_OFF:
|
||||
break;
|
||||
@ -3438,7 +3438,7 @@ static int freerdp_client_settings_parse_command_line_arguments_int(rdpSettings*
|
||||
}
|
||||
|
||||
if (!freerdp_settings_set_uint32(settings, FreeRDP_ClipboardFeatureMask,
|
||||
mask | flags))
|
||||
mask | bflags))
|
||||
rc = COMMAND_LINE_ERROR_UNEXPECTED_VALUE;
|
||||
}
|
||||
else
|
||||
|
@ -1172,7 +1172,14 @@ static BOOL freerdp_rsa_from_x509(rdpCertificate* cert)
|
||||
if (!freerdp_certificate_is_rsa(cert))
|
||||
return TRUE;
|
||||
|
||||
#if !defined(OPENSSL_VERSION_MAJOR) || (OPENSSL_VERSION_MAJOR < 3)
|
||||
RSA* rsa = NULL;
|
||||
const BIGNUM* rsa_n = NULL;
|
||||
const BIGNUM* rsa_e = NULL;
|
||||
#else
|
||||
BIGNUM* rsa_n = NULL;
|
||||
BIGNUM* rsa_e = NULL;
|
||||
#endif
|
||||
EVP_PKEY* pubkey = X509_get0_pubkey(cert->x509);
|
||||
if (!pubkey)
|
||||
goto fail;
|
||||
@ -1188,12 +1195,8 @@ static BOOL freerdp_rsa_from_x509(rdpCertificate* cert)
|
||||
/* Now we return failure again if something is wrong. */
|
||||
rc = FALSE;
|
||||
|
||||
const BIGNUM* rsa_n = NULL;
|
||||
const BIGNUM* rsa_e = NULL;
|
||||
RSA_get0_key(rsa, &rsa_n, &rsa_e, NULL);
|
||||
#else
|
||||
BIGNUM* rsa_n = NULL;
|
||||
BIGNUM* rsa_e = NULL;
|
||||
if (!EVP_PKEY_get_bn_param(pubkey, OSSL_PKEY_PARAM_RSA_E, &rsa_e))
|
||||
goto fail;
|
||||
if (!EVP_PKEY_get_bn_param(pubkey, OSSL_PKEY_PARAM_RSA_N, &rsa_n))
|
||||
|
Loading…
Reference in New Issue
Block a user