Fixed unused argument warnings.
authorArmin Novak <armin.novak@thincast.com>
Thu, 7 Feb 2019 16:53:21 +0000 (17:53 +0100)
committerArmin Novak <armin.novak@thincast.com>
Fri, 5 Apr 2019 07:14:35 +0000 (09:14 +0200)
17 files changed:
client/Sample/tf_channels.c
client/Sample/tf_freerdp.c
client/Wayland/wlf_disp.c
client/X11/xf_client.c
client/X11/xf_cliprdr.c
client/X11/xf_disp.c
client/X11/xf_event.c
client/X11/xf_floatbar.c
client/X11/xf_input.c
client/X11/xf_rail.c
client/X11/xf_tsmf.c
client/X11/xf_video.c
client/common/client.c
client/common/compatibility.c
client/common/test/TestClientChannels.c
client/common/test/TestClientCmdLine.c
client/common/test/TestClientRdpFile.c

index 0f842b5..38bad83 100644 (file)
@@ -42,6 +42,8 @@
 static UINT tf_encomsp_participant_created(EncomspClientContext* context,
         ENCOMSP_PARTICIPANT_CREATED_PDU* participantCreated)
 {
+       WINPR_UNUSED(context);
+       WINPR_UNUSED(participantCreated);
        return CHANNEL_RC_OK;
 }
 
index 0b81bf5..41179ec 100644 (file)
@@ -75,6 +75,8 @@ static BOOL tf_play_sound(rdpContext* context,
                           const PLAY_SOUND_UPDATE* play_sound)
 {
        /* TODO: Implement */
+       WINPR_UNUSED(context);
+       WINPR_UNUSED(play_sound);
        return TRUE;
 }
 
@@ -82,6 +84,8 @@ static BOOL tf_play_sound(rdpContext* context,
 static BOOL tf_keyboard_set_indicators(rdpContext* context, UINT16 led_flags)
 {
        /* TODO: Set local keyboard indicator LED status */
+       WINPR_UNUSED(context);
+       WINPR_UNUSED(led_flags);
        return TRUE;
 }
 
@@ -286,12 +290,14 @@ static void tf_client_free(freerdp* instance, rdpContext* context)
 static int tf_client_start(rdpContext* context)
 {
        /* TODO: Start client related stuff */
+       WINPR_UNUSED(context);
        return 0;
 }
 
 static int tf_client_stop(rdpContext* context)
 {
        /* TODO: Stop client related stuff */
+       WINPR_UNUSED(context);
        return 0;
 }
 
index 976b2fe..012ca08 100644 (file)
@@ -193,6 +193,7 @@ static void wlf_disp_OnGraphicsReset(void* context, GraphicsResetEventArgs* e)
        wlfDispContext* wlfDisp;
        rdpSettings* settings;
 
+       WINPR_UNUSED(e);
        if (!wlf_disp_check_context(context, &wlc, &wlfDisp, &settings))
                return;
 
@@ -211,6 +212,7 @@ static void wlf_disp_OnTimer(void* context, TimerEventArgs* e)
        wlfDispContext* wlfDisp;
        rdpSettings* settings;
 
+       WINPR_UNUSED(e);
        if (!wlf_disp_check_context(context, &wlc, &wlfDisp, &settings))
                return;
 
index 215ad66..7ea6144 100644 (file)
@@ -765,6 +765,7 @@ void xf_encomsp_init(xfContext* xfc, EncomspClientContext* encomsp)
 
 void xf_encomsp_uninit(xfContext* xfc, EncomspClientContext* encomsp)
 {
+       WINPR_UNUSED(encomsp);
        xfc->encomsp = NULL;
 }
 
@@ -910,6 +911,7 @@ static BOOL xf_play_sound(rdpContext* context,
                           const PLAY_SOUND_UPDATE* play_sound)
 {
        xfContext* xfc = (xfContext*) context;
+       WINPR_UNUSED(play_sound);
        XkbBell(xfc->display, None, 100, 0);
        return TRUE;
 }
@@ -1675,6 +1677,7 @@ DWORD xf_exit_code_from_disconnect_reason(DWORD reason)
 static void xf_TerminateEventHandler(void* context, TerminateEventArgs* e)
 {
        rdpContext* ctx = (rdpContext*)context;
+       WINPR_UNUSED(e);
        freerdp_abort_connect(ctx->instance);
 }
 
index f8bbb41..e9f91e4 100644 (file)
@@ -960,6 +960,8 @@ static BOOL xf_cliprdr_process_selection_clear(xfClipboard* clipboard,
 {
        xfContext* xfc = clipboard->xfc;
 
+       WINPR_UNUSED(xevent);
+
        if (xf_cliprdr_is_self_owned(clipboard))
                return FALSE;
 
@@ -1159,6 +1161,8 @@ static UINT xf_cliprdr_monitor_ready(CliprdrClientContext* context,
        xfClipboard* clipboard = (xfClipboard*) context->custom;
        UINT ret;
 
+       WINPR_UNUSED(monitorReady);
+
        if ((ret = xf_cliprdr_send_client_capabilities(clipboard)) != CHANNEL_RC_OK)
                return ret;
 
@@ -1561,6 +1565,8 @@ static UINT xf_cliprdr_clipboard_file_size_failure(wClipboardDelegate* delegate,
 {
        CLIPRDR_FILE_CONTENTS_RESPONSE response = { 0 };
        xfClipboard* clipboard = delegate->custom;
+       WINPR_UNUSED(errorCode);
+
        response.msgFlags = CB_RESPONSE_FAIL;
        response.streamId = request->streamId;
        response.dwFlags = FILECONTENTS_SIZE;
@@ -1585,6 +1591,8 @@ static UINT xf_cliprdr_clipboard_file_range_failure(wClipboardDelegate* delegate
 {
        CLIPRDR_FILE_CONTENTS_RESPONSE response = { 0 };
        xfClipboard* clipboard = delegate->custom;
+       WINPR_UNUSED(errorCode);
+
        response.msgFlags = CB_RESPONSE_FAIL;
        response.streamId = request->streamId;
        response.dwFlags = FILECONTENTS_RANGE;
index ecb9997..33d9dd6 100644 (file)
@@ -215,6 +215,8 @@ static void xf_disp_OnGraphicsReset(void* context, GraphicsResetEventArgs* e)
        xfDispContext* xfDisp;
        rdpSettings* settings;
 
+       WINPR_UNUSED(e);
+
        if (!xf_disp_check_context(context, &xfc, &xfDisp, &settings))
                return;
 
@@ -233,6 +235,8 @@ static void xf_disp_OnTimer(void* context, TimerEventArgs* e)
        xfDispContext* xfDisp;
        rdpSettings* settings;
 
+       WINPR_UNUSED(e);
+
        if (!xf_disp_check_context(context, &xfc, &xfDisp, &settings))
                return;
 
index 7f47ce2..5629033 100644 (file)
@@ -323,6 +323,7 @@ static BOOL xf_event_Expose(xfContext* xfc, XEvent* event, BOOL app)
 }
 static BOOL xf_event_VisibilityNotify(xfContext* xfc, XEvent* event, BOOL app)
 {
+       WINPR_UNUSED(app);
        xfc->unobscured = event->xvisibility.state == VisibilityUnobscured;
        return TRUE;
 }
@@ -463,6 +464,7 @@ static BOOL xf_event_KeyPress(xfContext* xfc, XEvent* event, BOOL app)
 {
        KeySym keysym;
        char str[256];
+       WINPR_UNUSED(app);
        XLookupString((XKeyEvent*) event, str, sizeof(str), &keysym, NULL);
        xf_keyboard_key_press(xfc, event->xkey.keycode, keysym);
        return TRUE;
@@ -471,6 +473,7 @@ static BOOL xf_event_KeyRelease(xfContext* xfc, XEvent* event, BOOL app)
 {
        KeySym keysym;
        char str[256];
+       WINPR_UNUSED(app);
        XLookupString((XKeyEvent*) event, str, sizeof(str), &keysym, NULL);
        xf_keyboard_key_release(xfc, event->xkey.keycode, keysym);
        return TRUE;
@@ -527,6 +530,7 @@ static BOOL xf_event_FocusOut(xfContext* xfc, XEvent* event, BOOL app)
 }
 static BOOL xf_event_MappingNotify(xfContext* xfc, XEvent* event, BOOL app)
 {
+       WINPR_UNUSED(app);
        if (event->xmapping.request == MappingModifier)
        {
                if (xfc->modifierMap)
@@ -597,6 +601,7 @@ static BOOL xf_event_EnterNotify(xfContext* xfc, XEvent* event, BOOL app)
 }
 static BOOL xf_event_LeaveNotify(xfContext* xfc, XEvent* event, BOOL app)
 {
+       WINPR_UNUSED(event);
        if (!app)
        {
                xfc->mouse_active = FALSE;
index 2854aa2..3643b60 100644 (file)
@@ -352,6 +352,8 @@ static void xf_floatbar_event_expose(xfFloatbar* floatbar, XEvent* event)
        XPoint shape[5], border[5];
        int len;
        Display* display = floatbar->xfc->display;
+       WINPR_UNUSED(event);
+
        /* create the pixmap that we'll use for shaping the window */
        pmap = XCreatePixmap(display, floatbar->handle, floatbar->width, floatbar->height, 1);
        gc = XCreateGC(display, floatbar->handle, 0, 0);
@@ -662,6 +664,7 @@ static void xf_floatbar_event_focusout(xfFloatbar* floatbar, XEvent* event)
 {
        xfContext* xfc = floatbar->xfc;
 
+       WINPR_UNUSED(event);
        if (xfc->pointer)
        {
                XDefineCursor(xfc->display, xfc->window->handle, xfc->pointer->cursor);
index 4279b59..2fae525 100644 (file)
@@ -385,6 +385,7 @@ static void xf_input_touch_begin(xfContext* xfc, XIDeviceEvent* event)
 {
        int i;
 
+       WINPR_UNUSED(xfc);
        for (i = 0; i < MAX_CONTACTS; i++)
        {
                if (contacts[i].id == 0)
@@ -423,6 +424,7 @@ static void xf_input_touch_end(xfContext* xfc, XIDeviceEvent* event)
 {
        int i;
 
+       WINPR_UNUSED(xfc);
        for (i = 0; i < MAX_CONTACTS; i++)
        {
                if (contacts[i].id == event->detail)
index 012fc4d..e90ee24 100644 (file)
@@ -1266,6 +1266,7 @@ int xf_rail_init(xfContext* xfc, RailClientContext* rail)
 
 int xf_rail_uninit(xfContext* xfc, RailClientContext* rail)
 {
+       WINPR_UNUSED(rail);
        if (xfc->rail)
        {
                xfc->rail->custom = NULL;
index 957c662..6d72050 100644 (file)
@@ -431,6 +431,7 @@ int xf_tsmf_xv_uninit(xfContext* xfc, TsmfClientContext* tsmf)
 {
        xfXvContext* xv = (xfXvContext*) xfc->xv_context;
 
+       WINPR_UNUSED(tsmf);
        if (xv)
        {
                if (xv->xv_image_size > 0)
index 5fc8f2f..a956f9c 100644 (file)
@@ -88,6 +88,8 @@ static BOOL xfVideoDeleteSurface(VideoClientContext* video, VideoSurface* surfac
 {
        xfVideoSurface* xfSurface = (xfVideoSurface*)surface;
 
+       WINPR_UNUSED(video);
+
        if (xfSurface)
                XFree(xfSurface->image);
 
index 7b2c54d..47355c3 100644 (file)
@@ -519,6 +519,9 @@ DWORD client_cli_verify_certificate(freerdp* instance, const char* common_name,
                                     const char* subject, const char* issuer,
                                     const char* fingerprint, BOOL host_mismatch)
 {
+       WINPR_UNUSED(common_name);
+       WINPR_UNUSED(host_mismatch);
+
        printf("WARNING: This callback is deprecated, migrate to client_cli_verify_certificate_ex\n");
        printf("Certificate details:\n");
        printf("\tSubject: %s\n", subject);
@@ -591,6 +594,8 @@ DWORD client_cli_verify_changed_certificate(freerdp* instance,
         const char* old_subject, const char* old_issuer,
         const char* old_fingerprint)
 {
+       WINPR_UNUSED(common_name);
+
        printf("WARNING: This callback is deprecated, migrate to client_cli_verify_changed_certificate_ex\n");
        printf("!!! Certificate has changed !!!\n");
        printf("\n");
index 29ddbdd..830866d 100644 (file)
@@ -402,6 +402,9 @@ static int freerdp_client_old_command_line_pre_filter(void* context, int index,
 }
 static int freerdp_client_old_command_line_post_filter(void* context, COMMAND_LINE_ARGUMENT_A* arg)
 {
+       WINPR_UNUSED(context);
+       WINPR_UNUSED(arg);
+
        return 0;
 }
 int freerdp_detect_old_command_line_syntax(int argc, char** argv, size_t* count)
index e0a1368..b63cf98 100644 (file)
@@ -12,6 +12,8 @@ int TestClientChannels(int argc, char* argv[])
        FREERDP_ADDIN* pAddin;
        FREERDP_ADDIN** ppAddins;
 
+       WINPR_UNUSED(argc);
+       WINPR_UNUSED(argv);
        dwFlags = FREERDP_ADDIN_DYNAMIC;
 
        printf("Enumerate all\n");
index 95b62a9..ccf23b2 100644 (file)
@@ -261,6 +261,8 @@ int TestClientCmdLine(int argc, char* argv[])
        int rc = 0;
        size_t i;
 
+       WINPR_UNUSED(argc);
+       WINPR_UNUSED(argv);
        for (i = 0; i < sizeof(tests) / sizeof(tests[0]); i ++)
        {
                int failure = 0;
index d248d9a..f577a0b 100644 (file)
@@ -267,6 +267,8 @@ int TestClientRdpFile(int argc, char* argv[])
        char* sValue;
        rdpFile* file;
        rdpFileLine* line;
+       WINPR_UNUSED(argc);
+       WINPR_UNUSED(argv);
        /* Unicode */
        file = freerdp_client_rdp_file_new();