mirror of
https://github.com/morgan9e/FreeRDP
synced 2026-04-14 00:14:11 +09:00
[client,x11] fix warnings
This commit is contained in:
@@ -1151,20 +1151,16 @@ static void xf_button_map_init(xfContext* xfc)
|
||||
*/
|
||||
static BOOL xf_pre_connect(freerdp* instance)
|
||||
{
|
||||
rdpChannels* channels = NULL;
|
||||
rdpSettings* settings = NULL;
|
||||
rdpContext* context = NULL;
|
||||
xfContext* xfc = NULL;
|
||||
UINT32 maxWidth = 0;
|
||||
UINT32 maxHeight = 0;
|
||||
|
||||
WINPR_ASSERT(instance);
|
||||
|
||||
context = instance->context;
|
||||
xfc = (xfContext*)instance->context;
|
||||
rdpContext* context = instance->context;
|
||||
WINPR_ASSERT(context);
|
||||
xfContext* xfc = (xfContext*)context;
|
||||
|
||||
settings = context->settings;
|
||||
rdpSettings* settings = context->settings;
|
||||
WINPR_ASSERT(settings);
|
||||
|
||||
if (!freerdp_settings_set_bool(settings, FreeRDP_CertificateCallbackPreferPEM, TRUE))
|
||||
@@ -1176,9 +1172,6 @@ static BOOL xf_pre_connect(freerdp* instance)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
channels = context->channels;
|
||||
WINPR_ASSERT(channels);
|
||||
|
||||
if (!freerdp_settings_set_uint32(settings, FreeRDP_OsMajorType, OSMAJORTYPE_UNIX))
|
||||
return FALSE;
|
||||
if (!freerdp_settings_set_uint32(settings, FreeRDP_OsMinorType, OSMINORTYPE_NATIVE_XSERVER))
|
||||
|
||||
@@ -194,20 +194,14 @@ static BOOL xf_action_script_append(xfContext* xfc, const char* buffer, size_t s
|
||||
|
||||
BOOL xf_event_action_script_init(xfContext* xfc)
|
||||
{
|
||||
wObject* obj = NULL;
|
||||
const rdpSettings* settings = NULL;
|
||||
|
||||
WINPR_ASSERT(xfc);
|
||||
|
||||
settings = xfc->common.context.settings;
|
||||
WINPR_ASSERT(settings);
|
||||
|
||||
xfc->xevents = ArrayList_New(TRUE);
|
||||
|
||||
if (!xfc->xevents)
|
||||
return FALSE;
|
||||
|
||||
obj = ArrayList_Object(xfc->xevents);
|
||||
wObject* obj = ArrayList_Object(xfc->xevents);
|
||||
WINPR_ASSERT(obj);
|
||||
obj->fnObjectNew = winpr_ObjectStringClone;
|
||||
obj->fnObjectFree = winpr_ObjectStringFree;
|
||||
|
||||
@@ -223,15 +223,11 @@ static BOOL register_raw_events(xfContext* xfc, Window window)
|
||||
|
||||
static BOOL register_device_events(xfContext* xfc, Window window)
|
||||
{
|
||||
XIEventMask mask;
|
||||
XIEventMask mask = { 0 };
|
||||
unsigned char mask_bytes[XIMaskLen(XI_LASTEVENT)] = { 0 };
|
||||
rdpSettings* settings = NULL;
|
||||
|
||||
WINPR_ASSERT(xfc);
|
||||
|
||||
settings = xfc->common.context.settings;
|
||||
WINPR_ASSERT(settings);
|
||||
|
||||
XISetMask(mask_bytes, XI_DeviceChanged);
|
||||
XISetMask(mask_bytes, XI_HierarchyChanged);
|
||||
|
||||
@@ -750,8 +746,6 @@ static int xf_input_pens_unhover(xfContext* xfc)
|
||||
|
||||
int xf_input_event(xfContext* xfc, const XEvent* xevent, XIDeviceEvent* event, int evtype)
|
||||
{
|
||||
const rdpSettings* settings = NULL;
|
||||
|
||||
WINPR_ASSERT(xfc);
|
||||
WINPR_ASSERT(xevent);
|
||||
WINPR_ASSERT(event);
|
||||
@@ -761,9 +755,6 @@ int xf_input_event(xfContext* xfc, const XEvent* xevent, XIDeviceEvent* event, i
|
||||
*/
|
||||
const Window w = xevent->xany.window;
|
||||
|
||||
settings = xfc->common.context.settings;
|
||||
WINPR_ASSERT(settings);
|
||||
|
||||
xfWindow* window = xfc->window;
|
||||
if (window)
|
||||
{
|
||||
|
||||
@@ -117,18 +117,14 @@ static BOOL xf_action_script_append(xfContext* xfc, const char* buffer, size_t s
|
||||
|
||||
static BOOL xf_keyboard_action_script_init(xfContext* xfc)
|
||||
{
|
||||
wObject* obj = NULL;
|
||||
const rdpSettings* settings = NULL;
|
||||
|
||||
settings = xfc->common.context.settings;
|
||||
WINPR_ASSERT(settings);
|
||||
WINPR_ASSERT(xfc);
|
||||
|
||||
xfc->keyCombinations = ArrayList_New(TRUE);
|
||||
|
||||
if (!xfc->keyCombinations)
|
||||
return FALSE;
|
||||
|
||||
obj = ArrayList_Object(xfc->keyCombinations);
|
||||
wObject* obj = ArrayList_Object(xfc->keyCombinations);
|
||||
WINPR_ASSERT(obj);
|
||||
obj->fnObjectNew = winpr_ObjectStringClone;
|
||||
obj->fnObjectFree = winpr_ObjectStringFree;
|
||||
|
||||
Reference in New Issue
Block a user