From 77df2542650803f8b969d32704f18f9d8aba72da Mon Sep 17 00:00:00 2001 From: Bernhard Miklautz Date: Fri, 15 Mar 2013 18:22:49 +0100 Subject: [PATCH] Fixed some build warnings --- channels/server/channels.c | 2 +- client/X11/xfreerdp.c | 3 ++- client/common/cmdline.c | 6 +++--- winpr/libwinpr/rpc/rpc.c | 2 +- winpr/libwinpr/synch/wait.c | 2 +- 5 files changed, 8 insertions(+), 7 deletions(-) diff --git a/channels/server/channels.c b/channels/server/channels.c index c83ed7cd1..231826866 100644 --- a/channels/server/channels.c +++ b/channels/server/channels.c @@ -635,7 +635,7 @@ BOOL WTSVirtualChannelQuery( int fds_count = 0; BOOL result = FALSE; rdpPeerChannel* channel = (rdpPeerChannel*) hChannelHandle; - + ZeroMemory(fds, sizeof(fds)); switch (WtsVirtualClass) { case WTSVirtualFileHandle: diff --git a/client/X11/xfreerdp.c b/client/X11/xfreerdp.c index 6ebfbc0ab..05520d2dd 100644 --- a/client/X11/xfreerdp.c +++ b/client/X11/xfreerdp.c @@ -64,6 +64,7 @@ #include #include +#include #include "xf_gdi.h" #include "xf_rail.h" @@ -1204,7 +1205,7 @@ int xfreerdp_run(freerdp* instance) fd_set rfds_set; fd_set wfds_set; int fd_input_event; - HANDLE input_event; + HANDLE input_event = INVALID_HANDLE_VALUE; int select_status; BOOL async_update; BOOL async_input; diff --git a/client/common/cmdline.c b/client/common/cmdline.c index db2a25ae5..ae05f6b77 100644 --- a/client/common/cmdline.c +++ b/client/common/cmdline.c @@ -963,19 +963,19 @@ int freerdp_client_parse_command_line_arguments(int argc, char** argv, rdpSettin layouts = freerdp_keyboard_get_layouts(RDP_KEYBOARD_LAYOUT_TYPE_STANDARD); printf("\nKeyboard Layouts\n"); for (i = 0; layouts[i].code; i++) - printf("0x%08X\t%s\n", layouts[i].code, layouts[i].name); + printf("0x%08lX\t%s\n", layouts[i].code, layouts[i].name); free(layouts); layouts = freerdp_keyboard_get_layouts(RDP_KEYBOARD_LAYOUT_TYPE_VARIANT); printf("\nKeyboard Layout Variants\n"); for (i = 0; layouts[i].code; i++) - printf("0x%08X\t%s\n", layouts[i].code, layouts[i].name); + printf("0x%08lX\t%s\n", layouts[i].code, layouts[i].name); free(layouts); layouts = freerdp_keyboard_get_layouts(RDP_KEYBOARD_LAYOUT_TYPE_IME); printf("\nKeyboard Input Method Editors (IMEs)\n"); for (i = 0; layouts[i].code; i++) - printf("0x%08X\t%s\n", layouts[i].code, layouts[i].name); + printf("0x%08lX\t%s\n", layouts[i].code, layouts[i].name); free(layouts); printf("\n"); diff --git a/winpr/libwinpr/rpc/rpc.c b/winpr/libwinpr/rpc/rpc.c index 13d9862c8..07dcd3ed8 100644 --- a/winpr/libwinpr/rpc/rpc.c +++ b/winpr/libwinpr/rpc/rpc.c @@ -582,7 +582,7 @@ RPC_STATUS UuidToStringA(UUID* Uuid, RPC_CSTR* StringUuid) * xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx */ - sprintf_s((char*) *StringUuid, 36 + 1, "%08lx-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x", + sprintf_s((char*) *StringUuid, 36 + 1, "%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x", Uuid->Data1, Uuid->Data2, Uuid->Data3, Uuid->Data4[0], Uuid->Data4[1], Uuid->Data4[2], Uuid->Data4[3], Uuid->Data4[4], diff --git a/winpr/libwinpr/synch/wait.c b/winpr/libwinpr/synch/wait.c index 94387e506..50fcca363 100644 --- a/winpr/libwinpr/synch/wait.c +++ b/winpr/libwinpr/synch/wait.c @@ -148,7 +148,7 @@ DWORD WaitForSingleObject(HANDLE hHandle, DWORD dwMilliseconds) } else { - printf("WaitForSingleObject: unknown handle type %d\n", Type); + printf("WaitForSingleObject: unknown handle type %lu\n", Type); } return WAIT_OBJECT_0;