mirror of
https://github.com/morgan9e/FreeRDP
synced 2026-04-15 00:44:19 +09:00
[clang-tidy] cppcoreguidelines-init-variables
This commit is contained in:
@@ -143,7 +143,7 @@ static BOOL wlf_mime_is_file(const char* mime)
|
||||
|
||||
static BOOL wlf_mime_is_text(const char* mime)
|
||||
{
|
||||
size_t x;
|
||||
size_t x = 0;
|
||||
|
||||
for (x = 0; x < ARRAYSIZE(mime_text); x++)
|
||||
{
|
||||
@@ -156,7 +156,7 @@ static BOOL wlf_mime_is_text(const char* mime)
|
||||
|
||||
static BOOL wlf_mime_is_image(const char* mime)
|
||||
{
|
||||
size_t x;
|
||||
size_t x = 0;
|
||||
|
||||
for (x = 0; x < ARRAYSIZE(mime_image); x++)
|
||||
{
|
||||
@@ -426,7 +426,7 @@ static UINT wlf_cliprdr_send_client_format_list_response(wfClipboard* clipboard,
|
||||
static UINT wlf_cliprdr_monitor_ready(CliprdrClientContext* context,
|
||||
const CLIPRDR_MONITOR_READY* monitorReady)
|
||||
{
|
||||
UINT ret;
|
||||
UINT ret = 0;
|
||||
|
||||
WINPR_UNUSED(monitorReady);
|
||||
WINPR_ASSERT(context);
|
||||
@@ -673,7 +673,7 @@ static UINT wlf_cliprdr_server_format_list(CliprdrClientContext* context,
|
||||
|
||||
if (text)
|
||||
{
|
||||
size_t x;
|
||||
size_t x = 0;
|
||||
|
||||
for (x = 0; x < ARRAYSIZE(mime_text); x++)
|
||||
UwacClipboardOfferCreate(clipboard->seat, mime_text[x]);
|
||||
@@ -912,8 +912,8 @@ fail:
|
||||
|
||||
wfClipboard* wlf_clipboard_new(wlfContext* wfc)
|
||||
{
|
||||
rdpChannels* channels;
|
||||
wfClipboard* clipboard;
|
||||
rdpChannels* channels = NULL;
|
||||
wfClipboard* clipboard = NULL;
|
||||
|
||||
WINPR_ASSERT(wfc);
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ static UINT wlf_disp_sendLayout(DispClientContext* disp, const rdpMonitor* monit
|
||||
|
||||
static BOOL wlf_disp_settings_changed(wlfDispContext* wlfDisp)
|
||||
{
|
||||
rdpSettings* settings;
|
||||
rdpSettings* settings = NULL;
|
||||
|
||||
WINPR_ASSERT(wlfDisp);
|
||||
WINPR_ASSERT(wlfDisp->wlc);
|
||||
@@ -82,7 +82,7 @@ static BOOL wlf_disp_settings_changed(wlfDispContext* wlfDisp)
|
||||
|
||||
static BOOL wlf_update_last_sent(wlfDispContext* wlfDisp)
|
||||
{
|
||||
rdpSettings* settings;
|
||||
rdpSettings* settings = NULL;
|
||||
|
||||
WINPR_ASSERT(wlfDisp);
|
||||
WINPR_ASSERT(wlfDisp->wlc);
|
||||
@@ -105,8 +105,8 @@ static BOOL wlf_update_last_sent(wlfDispContext* wlfDisp)
|
||||
static BOOL wlf_disp_sendResize(wlfDispContext* wlfDisp)
|
||||
{
|
||||
DISPLAY_CONTROL_MONITOR_LAYOUT layout;
|
||||
wlfContext* wlc;
|
||||
rdpSettings* settings;
|
||||
wlfContext* wlc = NULL;
|
||||
rdpSettings* settings = NULL;
|
||||
|
||||
if (!wlfDisp || !wlfDisp->wlc)
|
||||
return FALSE;
|
||||
@@ -167,7 +167,7 @@ static BOOL wlf_disp_set_window_resizable(wlfDispContext* wlfDisp)
|
||||
static BOOL wlf_disp_check_context(void* context, wlfContext** ppwlc, wlfDispContext** ppwlfDisp,
|
||||
rdpSettings** ppSettings)
|
||||
{
|
||||
wlfContext* wlc;
|
||||
wlfContext* wlc = NULL;
|
||||
|
||||
if (!context)
|
||||
return FALSE;
|
||||
@@ -188,9 +188,9 @@ static BOOL wlf_disp_check_context(void* context, wlfContext** ppwlc, wlfDispCon
|
||||
|
||||
static void wlf_disp_OnActivated(void* context, const ActivatedEventArgs* e)
|
||||
{
|
||||
wlfContext* wlc;
|
||||
wlfDispContext* wlfDisp;
|
||||
rdpSettings* settings;
|
||||
wlfContext* wlc = NULL;
|
||||
wlfDispContext* wlfDisp = NULL;
|
||||
rdpSettings* settings = NULL;
|
||||
|
||||
if (!wlf_disp_check_context(context, &wlc, &wlfDisp, &settings))
|
||||
return;
|
||||
@@ -210,9 +210,9 @@ static void wlf_disp_OnActivated(void* context, const ActivatedEventArgs* e)
|
||||
|
||||
static void wlf_disp_OnGraphicsReset(void* context, const GraphicsResetEventArgs* e)
|
||||
{
|
||||
wlfContext* wlc;
|
||||
wlfDispContext* wlfDisp;
|
||||
rdpSettings* settings;
|
||||
wlfContext* wlc = NULL;
|
||||
wlfDispContext* wlfDisp = NULL;
|
||||
rdpSettings* settings = NULL;
|
||||
|
||||
WINPR_UNUSED(e);
|
||||
if (!wlf_disp_check_context(context, &wlc, &wlfDisp, &settings))
|
||||
@@ -229,9 +229,9 @@ static void wlf_disp_OnGraphicsReset(void* context, const GraphicsResetEventArgs
|
||||
|
||||
static void wlf_disp_OnTimer(void* context, const TimerEventArgs* e)
|
||||
{
|
||||
wlfContext* wlc;
|
||||
wlfDispContext* wlfDisp;
|
||||
rdpSettings* settings;
|
||||
wlfContext* wlc = NULL;
|
||||
wlfDispContext* wlfDisp = NULL;
|
||||
rdpSettings* settings = NULL;
|
||||
|
||||
WINPR_UNUSED(e);
|
||||
if (!wlf_disp_check_context(context, &wlc, &wlfDisp, &settings))
|
||||
@@ -245,9 +245,9 @@ static void wlf_disp_OnTimer(void* context, const TimerEventArgs* e)
|
||||
|
||||
wlfDispContext* wlf_disp_new(wlfContext* wlc)
|
||||
{
|
||||
wlfDispContext* ret;
|
||||
wPubSub* pubSub;
|
||||
rdpSettings* settings;
|
||||
wlfDispContext* ret = NULL;
|
||||
wPubSub* pubSub = NULL;
|
||||
rdpSettings* settings = NULL;
|
||||
|
||||
if (!wlc || !wlc->common.context.settings || !wlc->common.context.pubSub)
|
||||
return NULL;
|
||||
@@ -289,10 +289,10 @@ void wlf_disp_free(wlfDispContext* disp)
|
||||
UINT wlf_disp_sendLayout(DispClientContext* disp, const rdpMonitor* monitors, size_t nmonitors)
|
||||
{
|
||||
UINT ret = CHANNEL_RC_OK;
|
||||
DISPLAY_CONTROL_MONITOR_LAYOUT* layouts;
|
||||
size_t i;
|
||||
wlfDispContext* wlfDisp;
|
||||
rdpSettings* settings;
|
||||
DISPLAY_CONTROL_MONITOR_LAYOUT* layouts = NULL;
|
||||
size_t i = 0;
|
||||
wlfDispContext* wlfDisp = NULL;
|
||||
rdpSettings* settings = NULL;
|
||||
|
||||
WINPR_ASSERT(disp);
|
||||
WINPR_ASSERT(monitors);
|
||||
@@ -376,8 +376,8 @@ static UINT wlf_DisplayControlCaps(DispClientContext* disp, UINT32 maxNumMonitor
|
||||
UINT32 maxMonitorAreaFactorA, UINT32 maxMonitorAreaFactorB)
|
||||
{
|
||||
/* we're called only if dynamic resolution update is activated */
|
||||
wlfDispContext* wlfDisp;
|
||||
rdpSettings* settings;
|
||||
wlfDispContext* wlfDisp = NULL;
|
||||
rdpSettings* settings = NULL;
|
||||
|
||||
WINPR_ASSERT(disp);
|
||||
|
||||
@@ -403,7 +403,7 @@ static UINT wlf_DisplayControlCaps(DispClientContext* disp, UINT32 maxNumMonitor
|
||||
|
||||
BOOL wlf_disp_init(wlfDispContext* wlfDisp, DispClientContext* disp)
|
||||
{
|
||||
rdpSettings* settings;
|
||||
rdpSettings* settings = NULL;
|
||||
|
||||
if (!wlfDisp || !wlfDisp->wlc || !disp)
|
||||
return FALSE;
|
||||
@@ -435,10 +435,9 @@ BOOL wlf_disp_uninit(wlfDispContext* wlfDisp, DispClientContext* disp)
|
||||
|
||||
int wlf_list_monitors(wlfContext* wlc)
|
||||
{
|
||||
uint32_t i;
|
||||
uint32_t nmonitors = UwacDisplayGetNbOutputs(wlc->display);
|
||||
|
||||
for (i = 0; i < nmonitors; i++)
|
||||
for (uint32_t i = 0; i < nmonitors; i++)
|
||||
{
|
||||
const UwacOutput* monitor = UwacDisplayGetOutput(wlc->display, i);
|
||||
UwacSize resolution;
|
||||
|
||||
@@ -40,9 +40,9 @@
|
||||
static BOOL scale_signed_coordinates(rdpContext* context, int32_t* x, int32_t* y,
|
||||
BOOL fromLocalToRDP)
|
||||
{
|
||||
BOOL rc;
|
||||
UINT32 ux;
|
||||
UINT32 uy;
|
||||
BOOL rc = 0;
|
||||
UINT32 ux = 0;
|
||||
UINT32 uy = 0;
|
||||
WINPR_ASSERT(context);
|
||||
WINPR_ASSERT(x);
|
||||
WINPR_ASSERT(y);
|
||||
@@ -61,9 +61,9 @@ static BOOL scale_signed_coordinates(rdpContext* context, int32_t* x, int32_t* y
|
||||
|
||||
BOOL wlf_handle_pointer_enter(freerdp* instance, const UwacPointerEnterLeaveEvent* ev)
|
||||
{
|
||||
uint32_t x;
|
||||
uint32_t y;
|
||||
rdpClientContext* cctx;
|
||||
uint32_t x = 0;
|
||||
uint32_t y = 0;
|
||||
rdpClientContext* cctx = NULL;
|
||||
|
||||
if (!instance || !ev)
|
||||
return FALSE;
|
||||
@@ -82,9 +82,9 @@ BOOL wlf_handle_pointer_enter(freerdp* instance, const UwacPointerEnterLeaveEven
|
||||
|
||||
BOOL wlf_handle_pointer_motion(freerdp* instance, const UwacPointerMotionEvent* ev)
|
||||
{
|
||||
uint32_t x;
|
||||
uint32_t y;
|
||||
rdpClientContext* cctx;
|
||||
uint32_t x = 0;
|
||||
uint32_t y = 0;
|
||||
rdpClientContext* cctx = NULL;
|
||||
|
||||
if (!instance || !ev)
|
||||
return FALSE;
|
||||
@@ -105,11 +105,11 @@ BOOL wlf_handle_pointer_motion(freerdp* instance, const UwacPointerMotionEvent*
|
||||
|
||||
BOOL wlf_handle_pointer_buttons(freerdp* instance, const UwacPointerButtonEvent* ev)
|
||||
{
|
||||
rdpClientContext* cctx;
|
||||
rdpClientContext* cctx = NULL;
|
||||
UINT16 flags = 0;
|
||||
UINT16 xflags = 0;
|
||||
uint32_t x;
|
||||
uint32_t y;
|
||||
uint32_t x = 0;
|
||||
uint32_t y = 0;
|
||||
|
||||
if (!instance || !ev)
|
||||
return FALSE;
|
||||
@@ -169,7 +169,7 @@ BOOL wlf_handle_pointer_buttons(freerdp* instance, const UwacPointerButtonEvent*
|
||||
|
||||
BOOL wlf_handle_pointer_axis(freerdp* instance, const UwacPointerAxisEvent* ev)
|
||||
{
|
||||
wlfContext* context;
|
||||
wlfContext* context = NULL;
|
||||
if (!instance || !instance->context || !ev)
|
||||
return FALSE;
|
||||
|
||||
@@ -179,7 +179,7 @@ BOOL wlf_handle_pointer_axis(freerdp* instance, const UwacPointerAxisEvent* ev)
|
||||
|
||||
BOOL wlf_handle_pointer_axis_discrete(freerdp* instance, const UwacPointerAxisEvent* ev)
|
||||
{
|
||||
wlfContext* context;
|
||||
wlfContext* context = NULL;
|
||||
if (!instance || !instance->context || !ev)
|
||||
return FALSE;
|
||||
|
||||
@@ -190,9 +190,9 @@ BOOL wlf_handle_pointer_axis_discrete(freerdp* instance, const UwacPointerAxisEv
|
||||
static BOOL wlf_handle_wheel(freerdp* instance, uint32_t x, uint32_t y, uint32_t axis,
|
||||
int32_t value)
|
||||
{
|
||||
rdpClientContext* cctx;
|
||||
rdpClientContext* cctx = NULL;
|
||||
UINT16 flags = 0;
|
||||
int32_t direction;
|
||||
int32_t direction = 0;
|
||||
uint32_t avalue = (uint32_t)abs(value);
|
||||
|
||||
WINPR_ASSERT(instance);
|
||||
@@ -247,8 +247,8 @@ BOOL wlf_handle_pointer_frame(freerdp* instance, const UwacPointerFrameEvent* ev
|
||||
{
|
||||
BOOL success = TRUE;
|
||||
BOOL handle = FALSE;
|
||||
size_t x;
|
||||
wlfContext* context;
|
||||
size_t x = 0;
|
||||
wlfContext* context = NULL;
|
||||
enum wl_pointer_axis_source source = WL_POINTER_AXIS_SOURCE_CONTINUOUS;
|
||||
|
||||
if (!instance || !ev || !instance->context)
|
||||
@@ -317,7 +317,7 @@ BOOL wlf_handle_pointer_frame(freerdp* instance, const UwacPointerFrameEvent* ev
|
||||
|
||||
BOOL wlf_handle_pointer_source(freerdp* instance, const UwacPointerSourceEvent* ev)
|
||||
{
|
||||
wlfContext* context;
|
||||
wlfContext* context = NULL;
|
||||
if (!instance || !instance->context || !ev)
|
||||
return FALSE;
|
||||
|
||||
@@ -327,8 +327,8 @@ BOOL wlf_handle_pointer_source(freerdp* instance, const UwacPointerSourceEvent*
|
||||
|
||||
BOOL wlf_handle_key(freerdp* instance, const UwacKeyEvent* ev)
|
||||
{
|
||||
rdpInput* input;
|
||||
DWORD rdp_scancode;
|
||||
rdpInput* input = NULL;
|
||||
DWORD rdp_scancode = 0;
|
||||
|
||||
if (!instance || !ev)
|
||||
return FALSE;
|
||||
@@ -349,7 +349,7 @@ BOOL wlf_handle_key(freerdp* instance, const UwacKeyEvent* ev)
|
||||
|
||||
BOOL wlf_handle_ungrab_key(freerdp* instance, const UwacKeyEvent* ev)
|
||||
{
|
||||
wlfContext* context;
|
||||
wlfContext* context = NULL;
|
||||
if (!instance || !instance->context || !ev)
|
||||
return FALSE;
|
||||
|
||||
@@ -369,9 +369,9 @@ BOOL wlf_keyboard_enter(freerdp* instance, const UwacKeyboardEnterLeaveEvent* ev
|
||||
|
||||
BOOL wlf_keyboard_modifiers(freerdp* instance, const UwacKeyboardModifiersEvent* ev)
|
||||
{
|
||||
rdpInput* input;
|
||||
UINT16 syncFlags;
|
||||
wlfContext* wlf;
|
||||
rdpInput* input = NULL;
|
||||
UINT16 syncFlags = 0;
|
||||
wlfContext* wlf = NULL;
|
||||
|
||||
if (!instance || !ev)
|
||||
return FALSE;
|
||||
@@ -400,8 +400,8 @@ BOOL wlf_keyboard_modifiers(freerdp* instance, const UwacKeyboardModifiersEvent*
|
||||
|
||||
BOOL wlf_handle_touch_up(freerdp* instance, const UwacTouchUp* ev)
|
||||
{
|
||||
int32_t x;
|
||||
int32_t y;
|
||||
int32_t x = 0;
|
||||
int32_t y = 0;
|
||||
|
||||
WINPR_ASSERT(instance);
|
||||
WINPR_ASSERT(ev);
|
||||
@@ -420,8 +420,8 @@ BOOL wlf_handle_touch_up(freerdp* instance, const UwacTouchUp* ev)
|
||||
|
||||
BOOL wlf_handle_touch_down(freerdp* instance, const UwacTouchDown* ev)
|
||||
{
|
||||
int32_t x;
|
||||
int32_t y;
|
||||
int32_t x = 0;
|
||||
int32_t y = 0;
|
||||
|
||||
WINPR_ASSERT(instance);
|
||||
WINPR_ASSERT(ev);
|
||||
@@ -440,8 +440,8 @@ BOOL wlf_handle_touch_down(freerdp* instance, const UwacTouchDown* ev)
|
||||
|
||||
BOOL wlf_handle_touch_motion(freerdp* instance, const UwacTouchMotion* ev)
|
||||
{
|
||||
int32_t x;
|
||||
int32_t y;
|
||||
int32_t x = 0;
|
||||
int32_t y = 0;
|
||||
|
||||
WINPR_ASSERT(instance);
|
||||
WINPR_ASSERT(ev);
|
||||
|
||||
@@ -70,13 +70,13 @@ static BOOL wlf_Pointer_Set(rdpContext* context, rdpPointer* pointer)
|
||||
{
|
||||
wlfContext* wlf = (wlfContext*)context;
|
||||
wlfPointer* ptr = (wlfPointer*)pointer;
|
||||
void* data;
|
||||
UINT32 w;
|
||||
UINT32 h;
|
||||
UINT32 x;
|
||||
UINT32 y;
|
||||
size_t size;
|
||||
UwacReturnCode rc;
|
||||
void* data = NULL;
|
||||
UINT32 w = 0;
|
||||
UINT32 h = 0;
|
||||
UINT32 x = 0;
|
||||
UINT32 y = 0;
|
||||
size_t size = 0;
|
||||
UwacReturnCode rc = UWAC_ERROR_INTERNAL;
|
||||
BOOL res = FALSE;
|
||||
RECTANGLE_16 area;
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
#include <locale.h>
|
||||
@@ -49,15 +50,15 @@
|
||||
static BOOL wl_update_buffer(wlfContext* context_w, INT32 ix, INT32 iy, INT32 iw, INT32 ih)
|
||||
{
|
||||
BOOL res = FALSE;
|
||||
rdpGdi* gdi;
|
||||
char* data;
|
||||
UINT32 x;
|
||||
UINT32 y;
|
||||
UINT32 w;
|
||||
UINT32 h;
|
||||
rdpGdi* gdi = NULL;
|
||||
char* data = NULL;
|
||||
UINT32 x = 0;
|
||||
UINT32 y = 0;
|
||||
UINT32 w = 0;
|
||||
UINT32 h = 0;
|
||||
UwacSize geometry;
|
||||
size_t stride;
|
||||
UwacReturnCode rc;
|
||||
size_t stride = 0;
|
||||
UwacReturnCode rc = UWAC_ERROR_INTERNAL;
|
||||
RECTANGLE_16 area;
|
||||
|
||||
if (!context_w)
|
||||
@@ -120,12 +121,12 @@ fail:
|
||||
|
||||
static BOOL wl_end_paint(rdpContext* context)
|
||||
{
|
||||
rdpGdi* gdi;
|
||||
wlfContext* context_w;
|
||||
INT32 x;
|
||||
INT32 y;
|
||||
INT32 w;
|
||||
INT32 h;
|
||||
rdpGdi* gdi = NULL;
|
||||
wlfContext* context_w = NULL;
|
||||
INT32 x = 0;
|
||||
INT32 y = 0;
|
||||
INT32 w = 0;
|
||||
INT32 h = 0;
|
||||
|
||||
if (!context || !context->gdi || !context->gdi->primary)
|
||||
return FALSE;
|
||||
@@ -152,7 +153,7 @@ static BOOL wl_end_paint(rdpContext* context)
|
||||
|
||||
static BOOL wl_refresh_display(wlfContext* context)
|
||||
{
|
||||
rdpGdi* gdi;
|
||||
rdpGdi* gdi = NULL;
|
||||
|
||||
if (!context || !context->common.context.gdi)
|
||||
return FALSE;
|
||||
@@ -176,9 +177,9 @@ static BOOL wl_resize_display(rdpContext* context)
|
||||
|
||||
static BOOL wl_pre_connect(freerdp* instance)
|
||||
{
|
||||
rdpSettings* settings;
|
||||
wlfContext* context;
|
||||
const UwacOutput* output;
|
||||
rdpSettings* settings = NULL;
|
||||
wlfContext* context = NULL;
|
||||
const UwacOutput* output = NULL;
|
||||
UwacSize resolution;
|
||||
|
||||
if (!instance)
|
||||
@@ -223,14 +224,14 @@ static BOOL wl_pre_connect(freerdp* instance)
|
||||
|
||||
static BOOL wl_post_connect(freerdp* instance)
|
||||
{
|
||||
rdpGdi* gdi;
|
||||
UwacWindow* window;
|
||||
wlfContext* context;
|
||||
rdpSettings* settings;
|
||||
rdpGdi* gdi = NULL;
|
||||
UwacWindow* window = NULL;
|
||||
wlfContext* context = NULL;
|
||||
rdpSettings* settings = NULL;
|
||||
char* title = "FreeRDP";
|
||||
char* app_id = "wlfreerdp";
|
||||
UINT32 w;
|
||||
UINT32 h;
|
||||
UINT32 w = 0;
|
||||
UINT32 h = 0;
|
||||
|
||||
if (!instance || !instance->context)
|
||||
return FALSE;
|
||||
@@ -299,7 +300,7 @@ static BOOL wl_post_connect(freerdp* instance)
|
||||
|
||||
static void wl_post_disconnect(freerdp* instance)
|
||||
{
|
||||
wlfContext* context;
|
||||
wlfContext* context = NULL;
|
||||
|
||||
if (!instance)
|
||||
return;
|
||||
@@ -319,7 +320,7 @@ static void wl_post_disconnect(freerdp* instance)
|
||||
static BOOL handle_uwac_events(freerdp* instance, UwacDisplay* display)
|
||||
{
|
||||
UwacEvent event;
|
||||
wlfContext* context;
|
||||
wlfContext* context = NULL;
|
||||
|
||||
if (UwacDisplayDispatch(display, 1) < 0)
|
||||
return FALSE;
|
||||
@@ -344,9 +345,8 @@ static BOOL handle_uwac_events(freerdp* instance, UwacDisplay* display)
|
||||
|
||||
case UWAC_EVENT_FRAME_DONE:
|
||||
{
|
||||
UwacReturnCode r;
|
||||
EnterCriticalSection(&context->critical);
|
||||
r = UwacWindowSubmitBuffer(context->window, false);
|
||||
UwacReturnCode r = UwacWindowSubmitBuffer(context->window, false);
|
||||
LeaveCriticalSection(&context->critical);
|
||||
if (r != UWAC_SUCCESS)
|
||||
return FALSE;
|
||||
@@ -470,7 +470,7 @@ static BOOL handle_window_events(freerdp* instance)
|
||||
|
||||
static int wlfreerdp_run(freerdp* instance)
|
||||
{
|
||||
wlfContext* context;
|
||||
wlfContext* context = NULL;
|
||||
HANDLE handles[MAXIMUM_WAIT_OBJECTS] = { 0 };
|
||||
DWORD status = WAIT_ABANDONED;
|
||||
HANDLE timer = NULL;
|
||||
@@ -592,7 +592,7 @@ static void wlf_client_global_uninit(void)
|
||||
|
||||
static int wlf_logon_error_info(freerdp* instance, UINT32 data, UINT32 type)
|
||||
{
|
||||
wlfContext* wlf;
|
||||
wlfContext* wlf = NULL;
|
||||
const char* str_data = freerdp_get_logon_error_info_data(data);
|
||||
const char* str_type = freerdp_get_logon_error_info_type(type);
|
||||
|
||||
@@ -622,7 +622,7 @@ static void wlf_client_free(freerdp* instance, rdpContext* context)
|
||||
|
||||
static void* uwac_event_clone(const void* val)
|
||||
{
|
||||
UwacEvent* copy;
|
||||
UwacEvent* copy = NULL;
|
||||
const UwacEvent* ev = (const UwacEvent*)val;
|
||||
|
||||
copy = calloc(1, sizeof(UwacEvent));
|
||||
@@ -634,8 +634,8 @@ static void* uwac_event_clone(const void* val)
|
||||
|
||||
static BOOL wlf_client_new(freerdp* instance, rdpContext* context)
|
||||
{
|
||||
wObject* obj;
|
||||
UwacReturnCode status;
|
||||
wObject* obj = NULL;
|
||||
UwacReturnCode status = UWAC_ERROR_INTERNAL;
|
||||
wlfContext* wfl = (wlfContext*)context;
|
||||
|
||||
if (!instance || !context)
|
||||
@@ -695,11 +695,11 @@ static int RdpClientEntry(RDP_CLIENT_ENTRY_POINTS* pEntryPoints)
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
int rc = -1;
|
||||
int status;
|
||||
int status = 0;
|
||||
RDP_CLIENT_ENTRY_POINTS clientEntryPoints;
|
||||
rdpContext* context;
|
||||
rdpSettings* settings;
|
||||
wlfContext* wlc;
|
||||
rdpContext* context = NULL;
|
||||
rdpSettings* settings = NULL;
|
||||
wlfContext* wlc = NULL;
|
||||
|
||||
freerdp_client_warn_deprecated(argc, argv);
|
||||
|
||||
@@ -750,7 +750,7 @@ BOOL wlf_copy_image(const void* src, size_t srcStride, size_t srcWidth, size_t s
|
||||
}
|
||||
else
|
||||
{
|
||||
size_t i;
|
||||
size_t i = 0;
|
||||
const size_t baseSrcOffset = area->top * srcStride + area->left * 4;
|
||||
const size_t baseDstOffset = area->top * dstStride + area->left * 4;
|
||||
const size_t width = MIN((size_t)area->right - area->left, dstWidth - area->left);
|
||||
@@ -774,10 +774,10 @@ BOOL wlf_copy_image(const void* src, size_t srcStride, size_t srcWidth, size_t s
|
||||
BOOL wlf_scale_coordinates(rdpContext* context, UINT32* px, UINT32* py, BOOL fromLocalToRDP)
|
||||
{
|
||||
wlfContext* wlf = (wlfContext*)context;
|
||||
rdpGdi* gdi;
|
||||
rdpGdi* gdi = NULL;
|
||||
UwacSize geometry;
|
||||
double sx;
|
||||
double sy;
|
||||
double sx = NAN;
|
||||
double sy = NAN;
|
||||
|
||||
if (!context || !px || !py || !context->gdi)
|
||||
return FALSE;
|
||||
|
||||
Reference in New Issue
Block a user