From c6e6b4414350e757c50f5b131897910c43b54b2c Mon Sep 17 00:00:00 2001 From: Norbert Federa Date: Fri, 25 Nov 2016 12:40:11 +0100 Subject: [PATCH] countless WLog/printf format specifier fixes --- channels/audin/client/alsa/audin_alsa.c | 19 ++-- channels/audin/client/audin_main.c | 28 ++--- channels/audin/client/mac/audin_mac.c | 6 +- channels/audin/client/opensles/audin_opensl_es.c | 6 +- channels/audin/client/opensles/opensl_io.c | 2 +- channels/audin/client/oss/audin_oss.c | 10 +- channels/audin/client/pulse/audin_pulse.c | 4 +- channels/audin/client/winmm/audin_winmm.c | 2 +- channels/audin/server/audin.c | 26 ++--- channels/cliprdr/client/cliprdr_format.c | 6 +- channels/cliprdr/client/cliprdr_main.c | 46 ++++---- channels/cliprdr/server/cliprdr_main.c | 66 +++++------ channels/drdynvc/client/drdynvc_main.c | 37 +++--- channels/drdynvc/server/drdynvc_main.c | 2 +- channels/drive/client/drive_file.c | 8 +- channels/drive/client/drive_main.c | 6 +- channels/echo/server/echo_main.c | 20 ++-- channels/encomsp/client/encomsp_main.c | 64 +++++------ channels/encomsp/server/encomsp_main.c | 14 +-- channels/parallel/client/parallel_main.c | 4 +- channels/printer/client/printer_main.c | 18 +-- channels/rail/client/rail_main.c | 26 ++--- channels/rail/client/rail_orders.c | 66 +++++------ channels/rdpdr/client/rdpdr_main.c | 56 ++++----- channels/rdpdr/server/rdpdr_main.c | 52 ++++----- channels/rdpei/client/rdpei_main.c | 32 +++--- channels/rdpei/server/rdpei_main.c | 16 +-- channels/rdpgfx/client/rdpgfx_codec.c | 18 +-- channels/rdpgfx/client/rdpgfx_main.c | 111 +++++++++--------- channels/rdpgfx/server/rdpgfx_main.c | 54 ++++----- channels/rdpsnd/client/alsa/rdpsnd_alsa.c | 2 +- channels/rdpsnd/client/rdpsnd_main.c | 36 +++--- channels/rdpsnd/server/rdpsnd_main.c | 16 +-- channels/remdesk/client/remdesk_main.c | 46 ++++---- channels/remdesk/server/remdesk_main.c | 42 +++---- channels/serial/client/serial_main.c | 12 +- channels/smartcard/client/smartcard_main.c | 32 +++--- channels/smartcard/client/smartcard_operations.c | 111 +++++++++--------- channels/smartcard/client/smartcard_pack.c | 126 ++++++++++----------- channels/tsmf/client/tsmf_ifman.c | 4 +- channels/tsmf/client/tsmf_media.c | 16 +-- channels/urbdrc/client/urbdrc_main.c | 16 +-- client/Android/android_freerdp.c | 4 +- client/Sample/freerdp.c | 2 +- client/X11/xf_cliprdr.c | 8 +- client/X11/xf_window.c | 2 +- client/common/cmdline.c | 4 +- libfreerdp/codec/h264.c | 14 +-- libfreerdp/codec/test/TestFreeRDPCodecClear.c | 4 +- libfreerdp/core/autodetect.c | 2 +- libfreerdp/core/freerdp.c | 2 +- libfreerdp/core/info.c | 8 +- libfreerdp/core/redirection.c | 4 +- libfreerdp/core/tcp.c | 4 +- libfreerdp/crypto/tls.c | 2 +- libfreerdp/primitives/test/TestPrimitivesAndOr.c | 11 +- libfreerdp/primitives/test/TestPrimitivesYUV.c | 11 +- server/Sample/sfreerdp.c | 2 +- server/shadow/shadow_client.c | 10 +- .../interlocked/test/TestInterlockedAccess.c | 28 ++--- winpr/libwinpr/synch/semaphore.c | 2 +- winpr/libwinpr/utils/debug.c | 2 +- winpr/libwinpr/utils/test/TestWLog.c | 21 ++-- 63 files changed, 719 insertions(+), 712 deletions(-) diff --git a/channels/audin/client/alsa/audin_alsa.c b/channels/audin/client/alsa/audin_alsa.c index c776fa7..cca9b37 100644 --- a/channels/audin/client/alsa/audin_alsa.c +++ b/channels/audin/client/alsa/audin_alsa.c @@ -149,7 +149,7 @@ static UINT audin_alsa_thread_receive(AudinALSADevice* alsa, BYTE* src, if (status == WAIT_FAILED) { ret = GetLastError(); - WLog_ERR(TAG, "WaitForSingleObject failed with error %lu!", ret); + WLog_ERR(TAG, "WaitForSingleObject failed with error %u!", ret); break; } @@ -193,7 +193,7 @@ static UINT audin_alsa_thread_receive(AudinALSADevice* alsa, BYTE* src, if (status == WAIT_FAILED) { ret = GetLastError(); - WLog_ERR(TAG, "WaitForSingleObject failed with error %lu!", ret); + WLog_ERR(TAG, "WaitForSingleObject failed with error %u!", ret); break; } @@ -239,10 +239,6 @@ static void* audin_alsa_thread_func(void* arg) { WLog_ERR(TAG, "calloc failed!"); error = CHANNEL_RC_NO_MEMORY; - - if (alsa->rdpcontext) - setChannelError(alsa->rdpcontext, error, "calloc failed!"); - goto out; } @@ -252,6 +248,7 @@ static void* audin_alsa_thread_func(void* arg) SND_PCM_STREAM_CAPTURE, 0)) < 0) { WLog_ERR(TAG, "snd_pcm_open (%s)", snd_strerror(error)); + error = CHANNEL_RC_INITIALIZATION_ERROR; goto out; } @@ -268,7 +265,7 @@ static void* audin_alsa_thread_func(void* arg) if (status == WAIT_FAILED) { error = GetLastError(); - WLog_ERR(TAG, "WaitForSingleObject failed with error %lu!", error); + WLog_ERR(TAG, "WaitForSingleObject failed with error %ld!", error); break; } @@ -290,7 +287,7 @@ static void* audin_alsa_thread_func(void* arg) if ((error = audin_alsa_thread_receive(alsa, buffer, error * rbytes_per_frame))) { - WLog_ERR(TAG, "audin_alsa_thread_receive failed with error %lu", error); + WLog_ERR(TAG, "audin_alsa_thread_receive failed with error %ld", error); break; } } @@ -466,7 +463,7 @@ static UINT audin_alsa_close(IAudinDevice* device) if (WaitForSingleObject(alsa->thread, INFINITE) == WAIT_FAILED) { error = GetLastError(); - WLog_ERR(TAG, "WaitForSingleObject failed with error %lu", error); + WLog_ERR(TAG, "WaitForSingleObject failed with error %u", error); return error; } @@ -565,7 +562,7 @@ UINT freerdp_audin_client_subsystem_entry(PFREERDP_AUDIN_DEVICE_ENTRY_POINTS if ((error = audin_alsa_parse_addin_args(alsa, args))) { - WLog_ERR(TAG, "audin_alsa_parse_addin_args failed with errorcode %lu!", error); + WLog_ERR(TAG, "audin_alsa_parse_addin_args failed with errorcode %u!", error); goto error_out; } @@ -600,7 +597,7 @@ UINT freerdp_audin_client_subsystem_entry(PFREERDP_AUDIN_DEVICE_ENTRY_POINTS if ((error = pEntryPoints->pRegisterAudinDevice(pEntryPoints->plugin, (IAudinDevice*) alsa))) { - WLog_ERR(TAG, "RegisterAudinDevice failed with error %lu!", error); + WLog_ERR(TAG, "RegisterAudinDevice failed with error %u!", error); goto error_out; } diff --git a/channels/audin/client/audin_main.c b/channels/audin/client/audin_main.c index 3b5fbf7..b97d94c 100644 --- a/channels/audin/client/audin_main.c +++ b/channels/audin/client/audin_main.c @@ -374,13 +374,13 @@ static UINT audin_process_open(IWTSVirtualChannelCallback* pChannelCallback, wSt IFCALLRET(audin->device->SetFormat, error, audin->device, format, FramesPerPacket); if (error != CHANNEL_RC_OK) { - WLog_ERR(TAG, "SetFormat failed with errorcode %lu", error); + WLog_ERR(TAG, "SetFormat failed with errorcode %u", error); return error; } IFCALLRET(audin->device->Open, error, audin->device, audin_receive_wave_data, callback); if (error != CHANNEL_RC_OK) { - WLog_ERR(TAG, "Open failed with errorcode %lu", error); + WLog_ERR(TAG, "Open failed with errorcode %u", error); return error; } } @@ -428,19 +428,19 @@ static UINT audin_process_format_change(IWTSVirtualChannelCallback* pChannelCall IFCALLRET(audin->device->Close, error, audin->device); if (error != CHANNEL_RC_OK) { - WLog_ERR(TAG, "Close failed with errorcode %lu", error); + WLog_ERR(TAG, "Close failed with errorcode %u", error); return error; } IFCALLRET(audin->device->SetFormat, error, audin->device, format, 0); if (error != CHANNEL_RC_OK) { - WLog_ERR(TAG, "SetFormat failed with errorcode %lu", error); + WLog_ERR(TAG, "SetFormat failed with errorcode %u", error); return error; } IFCALLRET(audin->device->Open, error, audin->device, audin_receive_wave_data, callback); if (error != CHANNEL_RC_OK) { - WLog_ERR(TAG, "Open failed with errorcode %lu", error); + WLog_ERR(TAG, "Open failed with errorcode %u", error); return error; } } @@ -509,7 +509,7 @@ static UINT audin_on_close(IWTSVirtualChannelCallback* pChannelCallback) { IFCALLRET(audin->device->Close, error, audin->device); if (error != CHANNEL_RC_OK) - WLog_ERR(TAG, "Close failed with errorcode %lu", error); + WLog_ERR(TAG, "Close failed with errorcode %u", error); } free(callback->formats); @@ -593,7 +593,7 @@ static UINT audin_plugin_terminated(IWTSPlugin* pPlugin) IFCALLRET(audin->device->Free, error, audin->device); if (error != CHANNEL_RC_OK) { - WLog_ERR(TAG, "Free failed with errorcode %lu", error); + WLog_ERR(TAG, "Free failed with errorcode %u", error); // dont stop on error } audin->device = NULL; @@ -662,7 +662,7 @@ static UINT audin_load_device_plugin(IWTSPlugin* pPlugin, const char* name, ADDI if ((error = entry(&entryPoints))) { - WLog_ERR(TAG, "%s entry returned error %lu.", name, error); + WLog_ERR(TAG, "%s entry returned error %u.", name, error); return error; } @@ -744,7 +744,7 @@ BOOL audin_process_addin_args(AUDIN_PLUGIN* audin, ADDIN_ARGV* args) { if ((error = audin_set_subsystem(audin, arg->Value))) { - WLog_ERR(TAG, "audin_set_subsystem failed with error %lu!", error); + WLog_ERR(TAG, "audin_set_subsystem failed with error %u!", error); return FALSE; } } @@ -752,7 +752,7 @@ BOOL audin_process_addin_args(AUDIN_PLUGIN* audin, ADDIN_ARGV* args) { if ((error = audin_set_device_name(audin, arg->Value))) { - WLog_ERR(TAG, "audin_set_device_name failed with error %lu!", error); + WLog_ERR(TAG, "audin_set_device_name failed with error %u!", error); return FALSE; } } @@ -858,7 +858,7 @@ UINT DVCPluginEntry(IDRDYNVC_ENTRY_POINTS* pEntryPoints) { if ((error = audin_load_device_plugin((IWTSPlugin*) audin, audin->subsystem, args))) { - WLog_ERR(TAG, "audin_load_device_plugin %s failed with error %lu!", + WLog_ERR(TAG, "audin_load_device_plugin %s failed with error %u!", audin->subsystem, error); goto out; } @@ -869,17 +869,17 @@ UINT DVCPluginEntry(IDRDYNVC_ENTRY_POINTS* pEntryPoints) { if ((error = audin_set_subsystem(audin, entry->subsystem))) { - WLog_ERR(TAG, "audin_set_subsystem for %s failed with error %lu!", + WLog_ERR(TAG, "audin_set_subsystem for %s failed with error %u!", entry->subsystem, error); } else if ((error = audin_set_device_name(audin, entry->device))) { - WLog_ERR(TAG, "audin_set_device_name for %s failed with error %lu!", + WLog_ERR(TAG, "audin_set_device_name for %s failed with error %u!", entry->subsystem, error); } else if ((error = audin_load_device_plugin((IWTSPlugin*) audin, audin->subsystem, args))) { - WLog_ERR(TAG, "audin_load_device_plugin %s failed with error %lu!", + WLog_ERR(TAG, "audin_load_device_plugin %s failed with error %u!", entry->subsystem, error); } diff --git a/channels/audin/client/mac/audin_mac.c b/channels/audin/client/mac/audin_mac.c index 681f6df..83bc6ec 100644 --- a/channels/audin/client/mac/audin_mac.c +++ b/channels/audin/client/mac/audin_mac.c @@ -215,7 +215,7 @@ static void mac_audio_queue_input_cb(void *aqData, if ((error = mac->receive(encoded_data, encoded_size, mac->user_data))) { - WLog_ERR(TAG, "mac->receive failed with error %lu", error); + WLog_ERR(TAG, "mac->receive failed with error %u", error); SetLastError(ERROR_INTERNAL_ERROR); return; } @@ -438,7 +438,7 @@ UINT freerdp_audin_client_subsystem_entry(PFREERDP_AUDIN_DEVICE_ENTRY_POINTS pEn if ((error = audin_mac_parse_addin_args(mac, args))) { - WLog_ERR(TAG, "audin_mac_parse_addin_args failed with %lu!", error); + WLog_ERR(TAG, "audin_mac_parse_addin_args failed with %u!", error); goto error_out; } @@ -452,7 +452,7 @@ UINT freerdp_audin_client_subsystem_entry(PFREERDP_AUDIN_DEVICE_ENTRY_POINTS pEn if ((error = pEntryPoints->pRegisterAudinDevice(pEntryPoints->plugin, (IAudinDevice*) mac))) { - WLog_ERR(TAG, "RegisterAudinDevice failed with error %lu!", error); + WLog_ERR(TAG, "RegisterAudinDevice failed with error %u!", error); goto error_out; } diff --git a/channels/audin/client/opensles/audin_opensl_es.c b/channels/audin/client/opensles/audin_opensl_es.c index 05e4981..0b1470b 100644 --- a/channels/audin/client/opensles/audin_opensl_es.c +++ b/channels/audin/client/opensles/audin_opensl_es.c @@ -112,7 +112,7 @@ static void* audin_opensles_thread_func(void* arg) if (status == WAIT_FAILED) { error = GetLastError(); - WLog_ERR(TAG, "WaitForSingleObject failed with error %lu!", error); + WLog_ERR(TAG, "WaitForSingleObject failed with error %u!", error); break; } @@ -125,7 +125,7 @@ static void* audin_opensles_thread_func(void* arg) rc = android_RecIn(opensles->stream, buffer.s, raw_size); if (rc < 0) { - WLog_ERR(TAG, "android_RecIn %lu", rc); + WLog_ERR(TAG, "android_RecIn %d", rc); continue; } @@ -401,7 +401,7 @@ static UINT audin_opensles_close(IAudinDevice* device) if (WaitForSingleObject(opensles->thread, INFINITE) == WAIT_FAILED) { error = GetLastError(); - WLog_ERR(TAG, "WaitForSingleObject failed with error %lu", error); + WLog_ERR(TAG, "WaitForSingleObject failed with error %u", error); return error; } CloseHandle(opensles->stopEvent); diff --git a/channels/audin/client/opensles/opensl_io.c b/channels/audin/client/opensles/opensl_io.c index f033952..4792d33 100644 --- a/channels/audin/client/opensles/opensl_io.c +++ b/channels/audin/client/opensles/opensl_io.c @@ -386,7 +386,7 @@ int android_RecIn(OPENSL_STREAM* p, short* buffer, int size) if (status == WAIT_FAILED) { - WLog_ERR(TAG, "WaitForSingleObject failed with error %lu", GetLastError()); + WLog_ERR(TAG, "WaitForSingleObject failed with error %lu", (unsigned long)GetLastError()); return -1; } } diff --git a/channels/audin/client/oss/audin_oss.c b/channels/audin/client/oss/audin_oss.c index b1f3db7..4b0e8e0 100644 --- a/channels/audin/client/oss/audin_oss.c +++ b/channels/audin/client/oss/audin_oss.c @@ -280,7 +280,7 @@ static void* audin_oss_thread_func(void* arg) if (status == WAIT_FAILED) { error = GetLastError(); - WLog_ERR(TAG, "WaitForSingleObject failed with error %lu", error); + WLog_ERR(TAG, "WaitForSingleObject failed with error %u", error); goto err_out; } @@ -334,7 +334,7 @@ static void* audin_oss_thread_func(void* arg) if ((error = oss->receive(encoded_data, encoded_size, oss->user_data))) { - WLog_ERR(TAG, "oss->receive failed with error %lu", error); + WLog_ERR(TAG, "oss->receive failed with error %u", error); break; } } @@ -406,7 +406,7 @@ static UINT audin_oss_close(IAudinDevice* device) if (WaitForSingleObject(oss->thread, INFINITE) == WAIT_FAILED) { error = GetLastError(); - WLog_ERR(TAG, "WaitForSingleObject failed with error %lu", error); + WLog_ERR(TAG, "WaitForSingleObject failed with error %u", error); return error; } @@ -538,7 +538,7 @@ UINT freerdp_audin_client_subsystem_entry(PFREERDP_AUDIN_DEVICE_ENTRY_POINTS if ((error = audin_oss_parse_addin_args(oss, args))) { - WLog_ERR(TAG, "audin_oss_parse_addin_args failed with errorcode %lu!", error); + WLog_ERR(TAG, "audin_oss_parse_addin_args failed with errorcode %u!", error); goto error_out; } @@ -554,7 +554,7 @@ UINT freerdp_audin_client_subsystem_entry(PFREERDP_AUDIN_DEVICE_ENTRY_POINTS if ((error = pEntryPoints->pRegisterAudinDevice(pEntryPoints->plugin, (IAudinDevice*) oss))) { - WLog_ERR(TAG, "RegisterAudinDevice failed with error %lu!", error); + WLog_ERR(TAG, "RegisterAudinDevice failed with error %u!", error); goto error_out; } diff --git a/channels/audin/client/pulse/audin_pulse.c b/channels/audin/client/pulse/audin_pulse.c index 7f3510c..dd7104c 100644 --- a/channels/audin/client/pulse/audin_pulse.c +++ b/channels/audin/client/pulse/audin_pulse.c @@ -558,7 +558,7 @@ UINT freerdp_audin_client_subsystem_entry(PFREERDP_AUDIN_DEVICE_ENTRY_POINTS pEn if ((error = audin_pulse_parse_addin_args(pulse, args))) { - WLog_ERR(TAG, "audin_pulse_parse_addin_args failed with error %lu!", error); + WLog_ERR(TAG, "audin_pulse_parse_addin_args failed with error %u!", error); goto error_out; } @@ -598,7 +598,7 @@ UINT freerdp_audin_client_subsystem_entry(PFREERDP_AUDIN_DEVICE_ENTRY_POINTS pEn if ((error = pEntryPoints->pRegisterAudinDevice(pEntryPoints->plugin, (IAudinDevice*) pulse))) { - WLog_ERR(TAG, "RegisterAudinDevice failed with error %lu!", error); + WLog_ERR(TAG, "RegisterAudinDevice failed with error %u!", error); goto error_out; } diff --git a/channels/audin/client/winmm/audin_winmm.c b/channels/audin/client/winmm/audin_winmm.c index d31d055..5090dd8 100644 --- a/channels/audin/client/winmm/audin_winmm.c +++ b/channels/audin/client/winmm/audin_winmm.c @@ -230,7 +230,7 @@ static UINT audin_winmm_close(IAudinDevice* device) if (status == WAIT_FAILED) { error = GetLastError(); - WLog_ERR(TAG, "WaitForSingleObject failed with error %lu!", error); + WLog_ERR(TAG, "WaitForSingleObject failed with error %u!", error); return error; } diff --git a/channels/audin/server/audin.c b/channels/audin/server/audin.c index cefef4c..69926f3 100644 --- a/channels/audin/server/audin.c +++ b/channels/audin/server/audin.c @@ -257,7 +257,7 @@ static UINT audin_server_recv_formats(audin_server* audin, wStream* s, IFCALLRET(audin->context.Opening, success, &audin->context); if (success) - WLog_ERR(TAG, "context.Opening failed with error %lu", success); + WLog_ERR(TAG, "context.Opening failed with error %u", success); return success; } @@ -323,7 +323,7 @@ static UINT audin_server_recv_open_reply(audin_server* audin, wStream* s, IFCALLRET(audin->context.OpenResult, success, &audin->context, Result); if (success) - WLog_ERR(TAG, "context.OpenResult failed with error %lu", success); + WLog_ERR(TAG, "context.OpenResult failed with error %u", success); return success; } @@ -396,7 +396,7 @@ static UINT audin_server_recv_data(audin_server* audin, wStream* s, IFCALLRET(audin->context.ReceiveSamples, success, &audin->context, src, frames); if (success) - WLog_ERR(TAG, "context.ReceiveSamples failed with error %lu", success); + WLog_ERR(TAG, "context.ReceiveSamples failed with error %u", success); return success; } @@ -448,7 +448,7 @@ static void* audin_server_thread_func(void* arg) if (status == WAIT_FAILED) { error = GetLastError(); - WLog_ERR(TAG, "WaitForMultipleObjects failed with error %lu", error); + WLog_ERR(TAG, "WaitForMultipleObjects failed with error %u", error); goto out; } @@ -480,7 +480,7 @@ static void* audin_server_thread_func(void* arg) { if ((error = audin_server_send_version(audin, s))) { - WLog_ERR(TAG, "audin_server_send_version failed with error %lu!", error); + WLog_ERR(TAG, "audin_server_send_version failed with error %u!", error); goto out_capacity; } } @@ -494,7 +494,7 @@ static void* audin_server_thread_func(void* arg) if (status == WAIT_FAILED) { error = GetLastError(); - WLog_ERR(TAG, "WaitForMultipleObjects failed with error %lu", error); + WLog_ERR(TAG, "WaitForMultipleObjects failed with error %u", error); goto out; } @@ -529,13 +529,13 @@ static void* audin_server_thread_func(void* arg) case MSG_SNDIN_VERSION: if ((error = audin_server_recv_version(audin, s, BytesReturned))) { - WLog_ERR(TAG, "audin_server_recv_version failed with error %lu!", error); + WLog_ERR(TAG, "audin_server_recv_version failed with error %u!", error); goto out_capacity; } if ((error = audin_server_send_formats(audin, s))) { - WLog_ERR(TAG, "audin_server_send_formats failed with error %lu!", error); + WLog_ERR(TAG, "audin_server_send_formats failed with error %u!", error); goto out_capacity; } @@ -544,13 +544,13 @@ static void* audin_server_thread_func(void* arg) case MSG_SNDIN_FORMATS: if ((error = audin_server_recv_formats(audin, s, BytesReturned))) { - WLog_ERR(TAG, "audin_server_recv_formats failed with error %lu!", error); + WLog_ERR(TAG, "audin_server_recv_formats failed with error %u!", error); goto out_capacity; } if ((error = audin_server_send_open(audin, s))) { - WLog_ERR(TAG, "audin_server_send_open failed with error %lu!", error); + WLog_ERR(TAG, "audin_server_send_open failed with error %u!", error); goto out_capacity; } @@ -559,7 +559,7 @@ static void* audin_server_thread_func(void* arg) case MSG_SNDIN_OPEN_REPLY: if ((error = audin_server_recv_open_reply(audin, s, BytesReturned))) { - WLog_ERR(TAG, "audin_server_recv_open_reply failed with error %lu!", error); + WLog_ERR(TAG, "audin_server_recv_open_reply failed with error %u!", error); goto out_capacity; } @@ -571,7 +571,7 @@ static void* audin_server_thread_func(void* arg) case MSG_SNDIN_DATA: if ((error = audin_server_recv_data(audin, s, BytesReturned))) { - WLog_ERR(TAG, "audin_server_recv_data failed with error %lu!", error); + WLog_ERR(TAG, "audin_server_recv_data failed with error %u!", error); goto out_capacity; }; @@ -658,7 +658,7 @@ static BOOL audin_server_close(audin_server_context* context) if (WaitForSingleObject(audin->thread, INFINITE) == WAIT_FAILED) { - WLog_ERR(TAG, "WaitForSingleObject failed with error %lu", GetLastError()); + WLog_ERR(TAG, "WaitForSingleObject failed with error %lu", (unsigned long)GetLastError()); return FALSE; } diff --git a/channels/cliprdr/client/cliprdr_format.c b/channels/cliprdr/client/cliprdr_format.c index a7afae5..4748afb 100644 --- a/channels/cliprdr/client/cliprdr_format.c +++ b/channels/cliprdr/client/cliprdr_format.c @@ -265,7 +265,7 @@ UINT cliprdr_process_format_list_response(cliprdrPlugin* cliprdr, wStream* s, UI IFCALLRET(context->ServerFormatListResponse, error, context, &formatListResponse); if (error) - WLog_ERR(TAG, "ServerFormatListResponse failed with error %lu!", error); + WLog_ERR(TAG, "ServerFormatListResponse failed with error %u!", error); return error; } @@ -298,7 +298,7 @@ UINT cliprdr_process_format_data_request(cliprdrPlugin* cliprdr, wStream* s, UIN IFCALLRET(context->ServerFormatDataRequest, error, context, &formatDataRequest); if (error) - WLog_ERR(TAG, "ServerFormatDataRequest failed with error %lu!", error); + WLog_ERR(TAG, "ServerFormatDataRequest failed with error %u!", error); return error; } @@ -332,7 +332,7 @@ UINT cliprdr_process_format_data_response(cliprdrPlugin* cliprdr, wStream* s, UI IFCALLRET(context->ServerFormatDataResponse, error, context, &formatDataResponse); if (error) - WLog_ERR(TAG, "ServerFormatDataResponse failed with error %lu!", error); + WLog_ERR(TAG, "ServerFormatDataResponse failed with error %u!", error); return error; } diff --git a/channels/cliprdr/client/cliprdr_main.c b/channels/cliprdr/client/cliprdr_main.c index da42247..0725b89 100644 --- a/channels/cliprdr/client/cliprdr_main.c +++ b/channels/cliprdr/client/cliprdr_main.c @@ -198,7 +198,7 @@ static UINT cliprdr_process_general_capability(cliprdrPlugin* cliprdr, IFCALLRET(context->ServerCapabilities, error, context, &capabilities); if (error) - WLog_ERR(TAG, "ServerCapabilities failed with error %lu!", error); + WLog_ERR(TAG, "ServerCapabilities failed with error %u!", error); return error; } @@ -230,7 +230,7 @@ static UINT cliprdr_process_clip_caps(cliprdrPlugin* cliprdr, wStream* s, case CB_CAPSTYPE_GENERAL: if ((error = cliprdr_process_general_capability(cliprdr, s))) { - WLog_ERR(TAG, "cliprdr_process_general_capability failed with error %lu!", + WLog_ERR(TAG, "cliprdr_process_general_capability failed with error %u!", error); return error; } @@ -286,7 +286,7 @@ static UINT cliprdr_process_monitor_ready(cliprdrPlugin* cliprdr, wStream* s, IFCALLRET(context->MonitorReady, error, context, &monitorReady); if (error) - WLog_ERR(TAG, "MonitorReady failed with error %lu!", error); + WLog_ERR(TAG, "MonitorReady failed with error %u!", error); return error; } @@ -334,7 +334,7 @@ static UINT cliprdr_process_filecontents_request(cliprdrPlugin* cliprdr, IFCALLRET(context->ServerFileContentsRequest, error, context, &request); if (error) - WLog_ERR(TAG, "ServerFileContentsRequest failed with error %lu!", error); + WLog_ERR(TAG, "ServerFileContentsRequest failed with error %u!", error); return error; } @@ -373,7 +373,7 @@ static UINT cliprdr_process_filecontents_response(cliprdrPlugin* cliprdr, IFCALLRET(context->ServerFileContentsResponse, error, context, &response); if (error) - WLog_ERR(TAG, "ServerFileContentsResponse failed with error %lu!", error); + WLog_ERR(TAG, "ServerFileContentsResponse failed with error %u!", error); return error; } @@ -410,7 +410,7 @@ static UINT cliprdr_process_lock_clipdata(cliprdrPlugin* cliprdr, wStream* s, IFCALLRET(context->ServerLockClipboardData, error, context, &lockClipboardData); if (error) - WLog_ERR(TAG, "ServerLockClipboardData failed with error %lu!", error); + WLog_ERR(TAG, "ServerLockClipboardData failed with error %u!", error); return error; } @@ -449,7 +449,7 @@ static UINT cliprdr_process_unlock_clipdata(cliprdrPlugin* cliprdr, wStream* s, &unlockClipboardData); if (error) - WLog_ERR(TAG, "ServerUnlockClipboardData failed with error %lu!", error); + WLog_ERR(TAG, "ServerUnlockClipboardData failed with error %u!", error); return error; } @@ -478,26 +478,26 @@ static UINT cliprdr_order_recv(cliprdrPlugin* cliprdr, wStream* s) { case CB_CLIP_CAPS: if ((error = cliprdr_process_clip_caps(cliprdr, s, dataLen, msgFlags))) - WLog_ERR(TAG, "cliprdr_process_clip_caps failed with error %lu!", error); + WLog_ERR(TAG, "cliprdr_process_clip_caps failed with error %u!", error); break; case CB_MONITOR_READY: if ((error = cliprdr_process_monitor_ready(cliprdr, s, dataLen, msgFlags))) - WLog_ERR(TAG, "cliprdr_process_monitor_ready failed with error %lu!", error); + WLog_ERR(TAG, "cliprdr_process_monitor_ready failed with error %u!", error); break; case CB_FORMAT_LIST: if ((error = cliprdr_process_format_list(cliprdr, s, dataLen, msgFlags))) - WLog_ERR(TAG, "cliprdr_process_format_list failed with error %lu!", error); + WLog_ERR(TAG, "cliprdr_process_format_list failed with error %u!", error); break; case CB_FORMAT_LIST_RESPONSE: if ((error = cliprdr_process_format_list_response(cliprdr, s, dataLen, msgFlags))) - WLog_ERR(TAG, "cliprdr_process_format_list_response failed with error %lu!", + WLog_ERR(TAG, "cliprdr_process_format_list_response failed with error %u!", error); break; @@ -505,7 +505,7 @@ static UINT cliprdr_order_recv(cliprdrPlugin* cliprdr, wStream* s) case CB_FORMAT_DATA_REQUEST: if ((error = cliprdr_process_format_data_request(cliprdr, s, dataLen, msgFlags))) - WLog_ERR(TAG, "cliprdr_process_format_data_request failed with error %lu!", + WLog_ERR(TAG, "cliprdr_process_format_data_request failed with error %u!", error); break; @@ -513,7 +513,7 @@ static UINT cliprdr_order_recv(cliprdrPlugin* cliprdr, wStream* s) case CB_FORMAT_DATA_RESPONSE: if ((error = cliprdr_process_format_data_response(cliprdr, s, dataLen, msgFlags))) - WLog_ERR(TAG, "cliprdr_process_format_data_response failed with error %lu!", + WLog_ERR(TAG, "cliprdr_process_format_data_response failed with error %u!", error); break; @@ -521,7 +521,7 @@ static UINT cliprdr_order_recv(cliprdrPlugin* cliprdr, wStream* s) case CB_FILECONTENTS_REQUEST: if ((error = cliprdr_process_filecontents_request(cliprdr, s, dataLen, msgFlags))) - WLog_ERR(TAG, "cliprdr_process_filecontents_request failed with error %lu!", + WLog_ERR(TAG, "cliprdr_process_filecontents_request failed with error %u!", error); break; @@ -529,20 +529,20 @@ static UINT cliprdr_order_recv(cliprdrPlugin* cliprdr, wStream* s) case CB_FILECONTENTS_RESPONSE: if ((error = cliprdr_process_filecontents_response(cliprdr, s, dataLen, msgFlags))) - WLog_ERR(TAG, "cliprdr_process_filecontents_response failed with error %lu!", + WLog_ERR(TAG, "cliprdr_process_filecontents_response failed with error %u!", error); break; case CB_LOCK_CLIPDATA: if ((error = cliprdr_process_lock_clipdata(cliprdr, s, dataLen, msgFlags))) - WLog_ERR(TAG, "cliprdr_process_lock_clipdata failed with error %lu!", error); + WLog_ERR(TAG, "cliprdr_process_lock_clipdata failed with error %u!", error); break; case CB_UNLOCK_CLIPDATA: if ((error = cliprdr_process_unlock_clipdata(cliprdr, s, dataLen, msgFlags))) - WLog_ERR(TAG, "cliprdr_process_lock_clipdata failed with error %lu!", error); + WLog_ERR(TAG, "cliprdr_process_lock_clipdata failed with error %u!", error); break; @@ -1030,7 +1030,7 @@ static VOID VCAPITYPE cliprdr_virtual_channel_open_event_ex(LPVOID lpUserParam, case CHANNEL_EVENT_DATA_RECEIVED: if ((error = cliprdr_virtual_channel_event_data_received(cliprdr, pData, dataLength, totalLength, dataFlags))) - WLog_ERR(TAG, "failed with error %lu", error); + WLog_ERR(TAG, "failed with error %u", error); break; @@ -1079,7 +1079,7 @@ static void* cliprdr_virtual_channel_client_thread(void* arg) if ((error = cliprdr_order_recv(cliprdr, data))) { - WLog_ERR(TAG, "cliprdr_order_recv failed with error %lu!", error); + WLog_ERR(TAG, "cliprdr_order_recv failed with error %u!", error); break; } } @@ -1147,7 +1147,7 @@ static UINT cliprdr_virtual_channel_event_disconnected(cliprdrPlugin* cliprdr) && (WaitForSingleObject(cliprdr->thread, INFINITE) == WAIT_FAILED)) { rc = GetLastError(); - WLog_ERR(TAG, "WaitForSingleObject failed with error %lu", rc); + WLog_ERR(TAG, "WaitForSingleObject failed with error %u", rc); return rc; } @@ -1202,7 +1202,7 @@ static VOID VCAPITYPE cliprdr_virtual_channel_init_event_ex(LPVOID lpUserParam, case CHANNEL_EVENT_CONNECTED: if ((error = cliprdr_virtual_channel_event_connected(cliprdr, pData, dataLength))) - WLog_ERR(TAG, "cliprdr_virtual_channel_event_connected failed with error %lu!", + WLog_ERR(TAG, "cliprdr_virtual_channel_event_connected failed with error %u!", error); break; @@ -1210,13 +1210,13 @@ static VOID VCAPITYPE cliprdr_virtual_channel_init_event_ex(LPVOID lpUserParam, case CHANNEL_EVENT_DISCONNECTED: if ((error = cliprdr_virtual_channel_event_disconnected(cliprdr))) WLog_ERR(TAG, - "cliprdr_virtual_channel_event_disconnected failed with error %lu!", error); + "cliprdr_virtual_channel_event_disconnected failed with error %u!", error); break; case CHANNEL_EVENT_TERMINATED: if ((error = cliprdr_virtual_channel_event_terminated(cliprdr))) - WLog_ERR(TAG, "cliprdr_virtual_channel_event_terminated failed with error %lu!", + WLog_ERR(TAG, "cliprdr_virtual_channel_event_terminated failed with error %u!", error); break; diff --git a/channels/cliprdr/server/cliprdr_main.c b/channels/cliprdr/server/cliprdr_main.c index 80955c7..761ee97 100644 --- a/channels/cliprdr/server/cliprdr_main.c +++ b/channels/cliprdr/server/cliprdr_main.c @@ -545,7 +545,7 @@ static UINT cliprdr_server_receive_capabilities(CliprdrServerContext* context, case CB_CAPSTYPE_GENERAL: if ((error = cliprdr_server_receive_general_capability(context, s))) { - WLog_ERR(TAG, "cliprdr_server_receive_general_capability failed with error %lu", + WLog_ERR(TAG, "cliprdr_server_receive_general_capability failed with error %u", error); return error; } @@ -580,7 +580,7 @@ static UINT cliprdr_server_receive_temporary_directory(CliprdrServerContext* if ((slength = Stream_GetRemainingLength(s)) < 520) { WLog_ERR(TAG, - "Stream_GetRemainingLength returned %d but should at least be 520", slength); + "Stream_GetRemainingLength returned %lu but should at least be 520", (unsigned long) slength); return CHANNEL_RC_NO_MEMORY; } @@ -613,7 +613,7 @@ static UINT cliprdr_server_receive_temporary_directory(CliprdrServerContext* IFCALLRET(context->TempDirectory, error, context, &tempDirectory); if (error) - WLog_ERR(TAG, "TempDirectory failed with error %lu!", error); + WLog_ERR(TAG, "TempDirectory failed with error %u!", error); return error; } @@ -790,7 +790,7 @@ static UINT cliprdr_server_receive_format_list(CliprdrServerContext* context, IFCALLRET(context->ClientFormatList, error, context, &formatList); if (error) - WLog_ERR(TAG, "ClientFormatList failed with error %lu!", error); + WLog_ERR(TAG, "ClientFormatList failed with error %u!", error); out: @@ -821,7 +821,7 @@ static UINT cliprdr_server_receive_format_list_response( &formatListResponse); if (error) - WLog_ERR(TAG, "ClientFormatListResponse failed with error %lu!", error); + WLog_ERR(TAG, "ClientFormatListResponse failed with error %u!", error); return error; } @@ -851,7 +851,7 @@ static UINT cliprdr_server_receive_lock_clipdata(CliprdrServerContext* context, IFCALLRET(context->ClientLockClipboardData, error, context, &lockClipboardData); if (error) - WLog_ERR(TAG, "ClientLockClipboardData failed with error %lu!", error); + WLog_ERR(TAG, "ClientLockClipboardData failed with error %u!", error); return error; } @@ -883,7 +883,7 @@ static UINT cliprdr_server_receive_unlock_clipdata(CliprdrServerContext* &unlockClipboardData); if (error) - WLog_ERR(TAG, "ClientUnlockClipboardData failed with error %lu!", error); + WLog_ERR(TAG, "ClientUnlockClipboardData failed with error %u!", error); return error; } @@ -914,7 +914,7 @@ static UINT cliprdr_server_receive_format_data_request(CliprdrServerContext* IFCALLRET(context->ClientFormatDataRequest, error, context, &formatDataRequest); if (error) - WLog_ERR(TAG, "ClientFormatDataRequest failed with error %lu!", error); + WLog_ERR(TAG, "ClientFormatDataRequest failed with error %u!", error); return error; } @@ -951,7 +951,7 @@ static UINT cliprdr_server_receive_format_data_response( &formatDataResponse); if (error) - WLog_ERR(TAG, "ClientFormatDataResponse failed with error %lu!", error); + WLog_ERR(TAG, "ClientFormatDataResponse failed with error %u!", error); free(formatDataResponse.requestedFormatData); return error; @@ -993,7 +993,7 @@ static UINT cliprdr_server_receive_filecontents_request( IFCALLRET(context->ClientFileContentsRequest, error, context, &request); if (error) - WLog_ERR(TAG, "ClientFileContentsRequest failed with error %lu!", error); + WLog_ERR(TAG, "ClientFileContentsRequest failed with error %u!", error); return error; } @@ -1025,7 +1025,7 @@ static UINT cliprdr_server_receive_filecontents_response( IFCALLRET(context->ClientFileContentsResponse, error, context, &response); if (error) - WLog_ERR(TAG, "ClientFileContentsResponse failed with error %lu!", error); + WLog_ERR(TAG, "ClientFileContentsResponse failed with error %u!", error); return error; } @@ -1047,7 +1047,7 @@ static UINT cliprdr_server_receive_pdu(CliprdrServerContext* context, { case CB_CLIP_CAPS: if ((error = cliprdr_server_receive_capabilities(context, s, header))) - WLog_ERR(TAG, "cliprdr_server_receive_capabilities failed with error %lu!", + WLog_ERR(TAG, "cliprdr_server_receive_capabilities failed with error %u!", error); break; @@ -1055,13 +1055,13 @@ static UINT cliprdr_server_receive_pdu(CliprdrServerContext* context, case CB_TEMP_DIRECTORY: if ((error = cliprdr_server_receive_temporary_directory(context, s, header))) WLog_ERR(TAG, - "cliprdr_server_receive_temporary_directory failed with error %lu!", error); + "cliprdr_server_receive_temporary_directory failed with error %u!", error); break; case CB_FORMAT_LIST: if ((error = cliprdr_server_receive_format_list(context, s, header))) - WLog_ERR(TAG, "cliprdr_server_receive_format_list failed with error %lu!", + WLog_ERR(TAG, "cliprdr_server_receive_format_list failed with error %u!", error); break; @@ -1069,20 +1069,20 @@ static UINT cliprdr_server_receive_pdu(CliprdrServerContext* context, case CB_FORMAT_LIST_RESPONSE: if ((error = cliprdr_server_receive_format_list_response(context, s, header))) WLog_ERR(TAG, - "cliprdr_server_receive_format_list_response failed with error %lu!", error); + "cliprdr_server_receive_format_list_response failed with error %u!", error); break; case CB_LOCK_CLIPDATA: if ((error = cliprdr_server_receive_lock_clipdata(context, s, header))) - WLog_ERR(TAG, "cliprdr_server_receive_lock_clipdata failed with error %lu!", + WLog_ERR(TAG, "cliprdr_server_receive_lock_clipdata failed with error %u!", error); break; case CB_UNLOCK_CLIPDATA: if ((error = cliprdr_server_receive_unlock_clipdata(context, s, header))) - WLog_ERR(TAG, "cliprdr_server_receive_unlock_clipdata failed with error %lu!", + WLog_ERR(TAG, "cliprdr_server_receive_unlock_clipdata failed with error %u!", error); break; @@ -1090,28 +1090,28 @@ static UINT cliprdr_server_receive_pdu(CliprdrServerContext* context, case CB_FORMAT_DATA_REQUEST: if ((error = cliprdr_server_receive_format_data_request(context, s, header))) WLog_ERR(TAG, - "cliprdr_server_receive_format_data_request failed with error %lu!", error); + "cliprdr_server_receive_format_data_request failed with error %u!", error); break; case CB_FORMAT_DATA_RESPONSE: if ((error = cliprdr_server_receive_format_data_response(context, s, header))) WLog_ERR(TAG, - "cliprdr_server_receive_format_data_response failed with error %lu!", error); + "cliprdr_server_receive_format_data_response failed with error %u!", error); break; case CB_FILECONTENTS_REQUEST: if ((error = cliprdr_server_receive_filecontents_request(context, s, header))) WLog_ERR(TAG, - "cliprdr_server_receive_filecontents_request failed with error %lu!", error); + "cliprdr_server_receive_filecontents_request failed with error %u!", error); break; case CB_FILECONTENTS_RESPONSE: if ((error = cliprdr_server_receive_filecontents_response(context, s, header))) WLog_ERR(TAG, - "cliprdr_server_receive_filecontents_response failed with error %lu!", error); + "cliprdr_server_receive_filecontents_response failed with error %u!", error); break; @@ -1164,13 +1164,13 @@ static UINT cliprdr_server_init(CliprdrServerContext* context) if ((error = context->ServerCapabilities(context, &capabilities))) { - WLog_ERR(TAG, "ServerCapabilities failed with error %lu!", error); + WLog_ERR(TAG, "ServerCapabilities failed with error %u!", error); return error; } if ((error = context->MonitorReady(context, &monitorReady))) { - WLog_ERR(TAG, "MonitorReady failed with error %lu!", error); + WLog_ERR(TAG, "MonitorReady failed with error %u!", error); return error; } @@ -1203,7 +1203,7 @@ UINT cliprdr_server_read(CliprdrServerContext* context) if (status == WAIT_FAILED) { error = GetLastError(); - WLog_ERR(TAG, "WaitForSingleObject failed with error %lu", error); + WLog_ERR(TAG, "WaitForSingleObject failed with error %u", error); return error; } @@ -1245,7 +1245,7 @@ UINT cliprdr_server_read(CliprdrServerContext* context) if (status == WAIT_FAILED) { error = GetLastError(); - WLog_ERR(TAG, "WaitForSingleObject failed with error %lu", error); + WLog_ERR(TAG, "WaitForSingleObject failed with error %u", error); return error; } @@ -1270,7 +1270,7 @@ UINT cliprdr_server_read(CliprdrServerContext* context) if ((error = cliprdr_server_receive_pdu(context, s, &header))) { - WLog_ERR(TAG, "cliprdr_server_receive_pdu failed with error code %lu!", error); + WLog_ERR(TAG, "cliprdr_server_receive_pdu failed with error code %u!", error); return error; } @@ -1281,7 +1281,7 @@ UINT cliprdr_server_read(CliprdrServerContext* context) if (status == WAIT_FAILED) { error = GetLastError(); - WLog_ERR(TAG, "WaitForSingleObject failed with error %lu", error); + WLog_ERR(TAG, "WaitForSingleObject failed with error %u", error); return error; } @@ -1336,7 +1336,7 @@ static void* cliprdr_server_thread(void* arg) if ((error = cliprdr_server_init(context))) { - WLog_ERR(TAG, "cliprdr_server_init failed with error %lu!", error); + WLog_ERR(TAG, "cliprdr_server_init failed with error %u!", error); goto out; } @@ -1347,7 +1347,7 @@ static void* cliprdr_server_thread(void* arg) if (status == WAIT_FAILED) { error = GetLastError(); - WLog_ERR(TAG, "WaitForMultipleObjects failed with error %lu", error); + WLog_ERR(TAG, "WaitForMultipleObjects failed with error %u", error); goto out; } @@ -1356,7 +1356,7 @@ static void* cliprdr_server_thread(void* arg) if (status == WAIT_FAILED) { error = GetLastError(); - WLog_ERR(TAG, "WaitForSingleObject failed with error %lu", error); + WLog_ERR(TAG, "WaitForSingleObject failed with error %u", error); goto out; } @@ -1368,7 +1368,7 @@ static void* cliprdr_server_thread(void* arg) if (status == WAIT_FAILED) { error = GetLastError(); - WLog_ERR(TAG, "WaitForSingleObject failed with error %lu", error); + WLog_ERR(TAG, "WaitForSingleObject failed with error %u", error); goto out; } @@ -1376,7 +1376,7 @@ static void* cliprdr_server_thread(void* arg) { if ((error = context->CheckEventHandle(context))) { - WLog_ERR(TAG, "CheckEventHandle failed with error %lu!", error); + WLog_ERR(TAG, "CheckEventHandle failed with error %u!", error); break; } } @@ -1507,7 +1507,7 @@ static UINT cliprdr_server_stop(CliprdrServerContext* context) if (WaitForSingleObject(cliprdr->Thread, INFINITE) == WAIT_FAILED) { error = GetLastError(); - WLog_ERR(TAG, "WaitForSingleObject failed with error %lu", error); + WLog_ERR(TAG, "WaitForSingleObject failed with error %u", error); return error; } diff --git a/channels/drdynvc/client/drdynvc_main.c b/channels/drdynvc/client/drdynvc_main.c index 2a53ed2..46fc212 100644 --- a/channels/drdynvc/client/drdynvc_main.c +++ b/channels/drdynvc/client/drdynvc_main.c @@ -345,7 +345,7 @@ static void dvcman_free(IWTSVirtualChannelManager* pChannelMgr) if (pPlugin->Terminated) if ((error = pPlugin->Terminated(pPlugin))) - WLog_ERR(TAG, "Terminated failed with error %lu!", error); + WLog_ERR(TAG, "Terminated failed with error %u!", error); } dvcman->num_plugins = 0; @@ -372,7 +372,7 @@ static UINT dvcman_init(IWTSVirtualChannelManager* pChannelMgr) if (pPlugin->Initialize) if ((error = pPlugin->Initialize(pPlugin, pChannelMgr))) { - WLog_ERR(TAG, "Initialize failed with error %lu!", error); + WLog_ERR(TAG, "Initialize failed with error %u!", error); return error; } } @@ -461,7 +461,7 @@ static UINT dvcman_create_channel(IWTSVirtualChannelManager* pChannelMgr, listener->iface.pInterface); if (error) - WLog_ERR(TAG, "context.ReceiveSamples failed with error %lu", error); + WLog_ERR(TAG, "context.ReceiveSamples failed with error %u", error); return error; } @@ -469,7 +469,7 @@ static UINT dvcman_create_channel(IWTSVirtualChannelManager* pChannelMgr, { if (error) { - WLog_ERR(TAG, "OnNewChannelConnection failed with error %lu!", error); + WLog_ERR(TAG, "OnNewChannelConnection failed with error %u!", error); return error; } else @@ -509,7 +509,7 @@ static UINT dvcman_open_channel(IWTSVirtualChannelManager* pChannelMgr, if ((pCallback->OnOpen) && (error = pCallback->OnOpen(pCallback))) { - WLog_ERR(TAG, "OnOpen failed with eror %lu!", error); + WLog_ERR(TAG, "OnOpen failed with eror %u!", error); return error; } @@ -552,7 +552,7 @@ static UINT dvcman_close_channel(IWTSVirtualChannelManager* pChannelMgr, if (error) { - WLog_ERR(TAG, "OnChannelDisconnected returned with error %lu!", error); + WLog_ERR(TAG, "OnChannelDisconnected returned with error %u!", error); return error; } @@ -561,7 +561,7 @@ static UINT dvcman_close_channel(IWTSVirtualChannelManager* pChannelMgr, if ((ichannel->Close) && (error = ichannel->Close(ichannel))) { - WLog_ERR(TAG, "Close failed with eror %lu!", error); + WLog_ERR(TAG, "Close failed with eror %u!", error); return error; } } @@ -965,14 +965,14 @@ static UINT drdynvc_process_create_request(drdynvcPlugin* drdynvc, int Sp, { if ((status = dvcman_open_channel(drdynvc->channel_mgr, ChannelId))) { - WLog_ERR(TAG, "dvcman_open_channel failed with error %lu!", status); + WLog_ERR(TAG, "dvcman_open_channel failed with error %u!", status); return status; } } else { if ((status = dvcman_close_channel(drdynvc->channel_mgr, ChannelId))) - WLog_ERR(TAG, "dvcman_close_channel failed with error %lu!", status); + WLog_ERR(TAG, "dvcman_close_channel failed with error %u!", status); } return status; @@ -1035,7 +1035,7 @@ static UINT drdynvc_process_close_request(drdynvcPlugin* drdynvc, int Sp, if ((error = dvcman_close_channel(drdynvc->channel_mgr, ChannelId))) { - WLog_ERR(TAG, "dvcman_close_channel failed with error %lu!", error); + WLog_ERR(TAG, "dvcman_close_channel failed with error %u!", error); return error; } @@ -1074,8 +1074,7 @@ static UINT drdynvc_order_recv(drdynvcPlugin* drdynvc, wStream* s) Cmd = (value & 0xf0) >> 4; Sp = (value & 0x0c) >> 2; cbChId = (value & 0x03) >> 0; - WLog_DBG(TAG, "order_recv: Cmd=0x%x, Sp=%d cbChId=%d, ChannelId=%d", Cmd, Sp, - cbChId); + WLog_DBG(TAG, "order_recv: Cmd=0x%x, Sp=%d cbChId=%d", Cmd, Sp,cbChId); switch (Cmd) { @@ -1184,7 +1183,7 @@ static void VCAPITYPE drdynvc_virtual_channel_open_event_ex(LPVOID lpUserParam, case CHANNEL_EVENT_DATA_RECEIVED: if ((error = drdynvc_virtual_channel_event_data_received(drdynvc, pData, dataLength, totalLength, dataFlags))) - WLog_ERR(TAG, "drdynvc_virtual_channel_event_data_received failed with error %lu", error); + WLog_ERR(TAG, "drdynvc_virtual_channel_event_data_received failed with error %u", error); break; @@ -1233,7 +1232,7 @@ static void* drdynvc_virtual_channel_client_thread(void* arg) if ((error = drdynvc_order_recv(drdynvc, data))) { Stream_Free(data, TRUE); - WLog_ERR(TAG, "drdynvc_order_recv failed with error %lu!", error); + WLog_ERR(TAG, "drdynvc_order_recv failed with error %u!", error); break; } @@ -1303,7 +1302,7 @@ static UINT drdynvc_virtual_channel_event_connected(drdynvcPlugin* drdynvc, LPVO if ((error = dvcman_init(drdynvc->channel_mgr))) { - WLog_ERR(TAG, "dvcman_init failed with error %lu!", error); + WLog_ERR(TAG, "dvcman_init failed with error %u!", error); goto error; } @@ -1335,7 +1334,7 @@ static UINT drdynvc_virtual_channel_event_disconnected(drdynvcPlugin* drdynvc) (WaitForSingleObject(drdynvc->thread, INFINITE) == WAIT_FAILED)) { status = GetLastError(); - WLog_ERR(TAG, "WaitForSingleObject failed with error %lu", status); + WLog_ERR(TAG, "WaitForSingleObject failed with error %u", status); return status; } @@ -1397,19 +1396,19 @@ static VOID VCAPITYPE drdynvc_virtual_channel_init_event_ex(LPVOID lpUserParam, { case CHANNEL_EVENT_CONNECTED: if ((error = drdynvc_virtual_channel_event_connected(drdynvc, pData, dataLength))) - WLog_ERR(TAG, "drdynvc_virtual_channel_event_connected failed with error %lu", error); + WLog_ERR(TAG, "drdynvc_virtual_channel_event_connected failed with error %u", error); break; case CHANNEL_EVENT_DISCONNECTED: if ((error = drdynvc_virtual_channel_event_disconnected(drdynvc))) - WLog_ERR(TAG, "drdynvc_virtual_channel_event_disconnected failed with error %lu", error); + WLog_ERR(TAG, "drdynvc_virtual_channel_event_disconnected failed with error %u", error); break; case CHANNEL_EVENT_TERMINATED: if ((error = drdynvc_virtual_channel_event_terminated(drdynvc))) - WLog_ERR(TAG, "drdynvc_virtual_channel_event_terminated failed with error %lu", error); + WLog_ERR(TAG, "drdynvc_virtual_channel_event_terminated failed with error %u", error); break; } diff --git a/channels/drdynvc/server/drdynvc_main.c b/channels/drdynvc/server/drdynvc_main.c index bf2b40e..d1b8a30 100644 --- a/channels/drdynvc/server/drdynvc_main.c +++ b/channels/drdynvc/server/drdynvc_main.c @@ -161,7 +161,7 @@ static UINT drdynvc_server_stop(DrdynvcServerContext* context) if (WaitForSingleObject(context->priv->Thread, INFINITE) == WAIT_FAILED) { error = GetLastError(); - WLog_ERR(TAG, "WaitForSingleObject failed with error %lu!", error); + WLog_ERR(TAG, "WaitForSingleObject failed with error %u!", error); return error; } diff --git a/channels/drive/client/drive_file.c b/channels/drive/client/drive_file.c index 49ccc20..c9c64be 100644 --- a/channels/drive/client/drive_file.c +++ b/channels/drive/client/drive_file.c @@ -547,7 +547,7 @@ BOOL drive_file_set_information(DRIVE_FILE* file, UINT32 FsInformationClass, UIN hFd = CreateFileA(file->fullpath, GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); if (hFd == INVALID_HANDLE_VALUE) { - WLog_ERR(TAG, "Unable to set file time %s to %d", file->fullpath); + WLog_ERR(TAG, "Unable to create file %s", file->fullpath); return FALSE; } if (liCreationTime.QuadPart != 0) @@ -576,7 +576,7 @@ BOOL drive_file_set_information(DRIVE_FILE* file, UINT32 FsInformationClass, UIN } if (!SetFileTime(hFd, pftCreationTime, pftLastAccessTime, pftLastWriteTime)) { - WLog_ERR(TAG, "Unable to set file time %s to %d", file->fullpath); + WLog_ERR(TAG, "Unable to set file time on %s", file->fullpath); CloseHandle(hFd); return FALSE; } @@ -592,13 +592,13 @@ BOOL drive_file_set_information(DRIVE_FILE* file, UINT32 FsInformationClass, UIN hFd = CreateFileA(file->fullpath, GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); if (hFd == INVALID_HANDLE_VALUE) { - WLog_ERR(TAG, "Unable to truncate %s to %d", file->fullpath, size); + WLog_ERR(TAG, "Unable to truncate %s to %lld", file->fullpath, (long long) size); return FALSE; } liSize.QuadPart = size; if (SetFilePointer(hFd, liSize.LowPart, &liSize.HighPart, FILE_BEGIN) == 0) { - WLog_ERR(TAG, "Unable to truncate %s to %d", file->fullpath, size); + WLog_ERR(TAG, "Unable to truncate %s to %lld", file->fullpath, (long long) size); CloseHandle(hFd); return FALSE; } diff --git a/channels/drive/client/drive_main.c b/channels/drive/client/drive_main.c index 1df2ddd..3344cc9 100644 --- a/channels/drive/client/drive_main.c +++ b/channels/drive/client/drive_main.c @@ -708,7 +708,7 @@ static void* drive_thread_func(void* arg) if (irp) if ((error = drive_process_irp(drive, irp))) { - WLog_ERR(TAG, "drive_process_irp failed with error %lu!", error); + WLog_ERR(TAG, "drive_process_irp failed with error %u!", error); break; } } @@ -753,7 +753,7 @@ static UINT drive_free(DEVICE* device) && (WaitForSingleObject(drive->thread, INFINITE) == WAIT_FAILED)) { error = GetLastError(); - WLog_ERR(TAG, "WaitForSingleObject failed with error %lu", error); + WLog_ERR(TAG, "WaitForSingleObject failed with error %u", error); return error; } @@ -844,7 +844,7 @@ UINT drive_register_drive_path(PDEVICE_SERVICE_ENTRY_POINTS pEntryPoints, if ((error = pEntryPoints->RegisterDevice(pEntryPoints->devman, (DEVICE*) drive))) { - WLog_ERR(TAG, "RegisterDevice failed with error %lu!", error); + WLog_ERR(TAG, "RegisterDevice failed with error %u!", error); goto out_error; } diff --git a/channels/echo/server/echo_main.c b/channels/echo/server/echo_main.c index 277a37e..1a2f6fd 100644 --- a/channels/echo/server/echo_main.c +++ b/channels/echo/server/echo_main.c @@ -83,7 +83,7 @@ static UINT echo_server_open_channel(echo_server* echo) if (WaitForSingleObject(hEvent, 1000) == WAIT_FAILED) { Error = GetLastError(); - WLog_ERR(TAG, "WaitForSingleObject failed with error %lu!", Error); + WLog_ERR(TAG, "WaitForSingleObject failed with error %lu!", (unsigned long)Error); return Error; } @@ -121,12 +121,12 @@ static void* echo_server_thread_func(void* arg) if ((error = echo_server_open_channel(echo))) { UINT error2 = 0; - WLog_ERR(TAG, "echo_server_open_channel failed with error %lu!", error); + WLog_ERR(TAG, "echo_server_open_channel failed with error %u!", error); IFCALLRET(echo->context.OpenResult, error2, &echo->context, ECHO_SERVER_OPEN_RESULT_NOTSUPPORTED); if (error2) - WLog_ERR(TAG, "echo server's OpenResult callback failed with error %lu", + WLog_ERR(TAG, "echo server's OpenResult callback failed with error %u", error2); goto out; @@ -158,7 +158,7 @@ static void* echo_server_thread_func(void* arg) if (status == WAIT_FAILED) { error = GetLastError(); - WLog_ERR(TAG, "WaitForMultipleObjects failed with error %lu", error); + WLog_ERR(TAG, "WaitForMultipleObjects failed with error %u", error); break; } @@ -168,7 +168,7 @@ static void* echo_server_thread_func(void* arg) ECHO_SERVER_OPEN_RESULT_CLOSED); if (error) - WLog_ERR(TAG, "OpenResult failed with error %lu!", error); + WLog_ERR(TAG, "OpenResult failed with error %u!", error); break; } @@ -180,7 +180,7 @@ static void* echo_server_thread_func(void* arg) ECHO_SERVER_OPEN_RESULT_ERROR); if (error) - WLog_ERR(TAG, "OpenResult failed with error %lu!", error); + WLog_ERR(TAG, "OpenResult failed with error %u!", error); break; } @@ -194,7 +194,7 @@ static void* echo_server_thread_func(void* arg) ECHO_SERVER_OPEN_RESULT_OK); if (error) - WLog_ERR(TAG, "OpenResult failed with error %lu!", error); + WLog_ERR(TAG, "OpenResult failed with error %u!", error); break; } @@ -217,7 +217,7 @@ static void* echo_server_thread_func(void* arg) if (status == WAIT_FAILED) { error = GetLastError(); - WLog_ERR(TAG, "WaitForMultipleObjects failed with error %lu", error); + WLog_ERR(TAG, "WaitForMultipleObjects failed with error %u", error); break; } @@ -250,7 +250,7 @@ static void* echo_server_thread_func(void* arg) if (error) { - WLog_ERR(TAG, "Response failed with error %lu!", error); + WLog_ERR(TAG, "Response failed with error %u!", error); break; } } @@ -315,7 +315,7 @@ static UINT echo_server_close(echo_server_context* context) if (WaitForSingleObject(echo->thread, INFINITE) == WAIT_FAILED) { error = GetLastError(); - WLog_ERR(TAG, "WaitForSingleObject failed with error %lu", error); + WLog_ERR(TAG, "WaitForSingleObject failed with error %u", error); return error; } diff --git a/channels/encomsp/client/encomsp_main.c b/channels/encomsp/client/encomsp_main.c index d57c4c0..578085d 100644 --- a/channels/encomsp/client/encomsp_main.c +++ b/channels/encomsp/client/encomsp_main.c @@ -178,7 +178,7 @@ static UINT encomsp_recv_filter_updated_pdu(encomspPlugin* encomsp, wStream* s, IFCALLRET(context->FilterUpdated, error, context, &pdu); if (error) - WLog_ERR(TAG, "context->FilterUpdated failed with error %lu", error); + WLog_ERR(TAG, "context->FilterUpdated failed with error %u", error); return error; } @@ -214,7 +214,7 @@ static UINT encomsp_recv_application_created_pdu(encomspPlugin* encomsp, if ((error = encomsp_read_unicode_string(s, &(pdu.Name)))) { - WLog_ERR(TAG, "encomsp_read_unicode_string failed with error %lu", error); + WLog_ERR(TAG, "encomsp_read_unicode_string failed with error %u", error); return error; } @@ -240,7 +240,7 @@ static UINT encomsp_recv_application_created_pdu(encomspPlugin* encomsp, IFCALLRET(context->ApplicationCreated, error, context, &pdu); if (error) - WLog_ERR(TAG, "context->ApplicationCreated failed with error %lu", error); + WLog_ERR(TAG, "context->ApplicationCreated failed with error %u", error); return error; } @@ -294,7 +294,7 @@ static UINT encomsp_recv_application_removed_pdu(encomspPlugin* encomsp, IFCALLRET(context->ApplicationRemoved, error, context, &pdu); if (error) - WLog_ERR(TAG, "context->ApplicationRemoved failed with error %lu", error); + WLog_ERR(TAG, "context->ApplicationRemoved failed with error %u", error); return error; } @@ -331,7 +331,7 @@ static UINT encomsp_recv_window_created_pdu(encomspPlugin* encomsp, wStream* s, if ((error = encomsp_read_unicode_string(s, &(pdu.Name)))) { - WLog_ERR(TAG, "encomsp_read_unicode_string failed with error %lu", error); + WLog_ERR(TAG, "encomsp_read_unicode_string failed with error %u", error); return error; } @@ -357,7 +357,7 @@ static UINT encomsp_recv_window_created_pdu(encomspPlugin* encomsp, wStream* s, IFCALLRET(context->WindowCreated, error, context, &pdu); if (error) - WLog_ERR(TAG, "context->WindowCreated failed with error %lu", error); + WLog_ERR(TAG, "context->WindowCreated failed with error %u", error); return error; } @@ -411,7 +411,7 @@ static UINT encomsp_recv_window_removed_pdu(encomspPlugin* encomsp, wStream* s, IFCALLRET(context->WindowRemoved, error, context, &pdu); if (error) - WLog_ERR(TAG, "context->WindowRemoved failed with error %lu", error); + WLog_ERR(TAG, "context->WindowRemoved failed with error %u", error); return error; } @@ -465,7 +465,7 @@ static UINT encomsp_recv_show_window_pdu(encomspPlugin* encomsp, wStream* s, IFCALLRET(context->ShowWindow, error, context, &pdu); if (error) - WLog_ERR(TAG, "context->ShowWindow failed with error %lu", error); + WLog_ERR(TAG, "context->ShowWindow failed with error %u", error); return error; } @@ -502,7 +502,7 @@ static UINT encomsp_recv_participant_created_pdu(encomspPlugin* encomsp, if ((error = encomsp_read_unicode_string(s, &(pdu.FriendlyName)))) { - WLog_ERR(TAG, "encomsp_read_unicode_string failed with error %lu", error); + WLog_ERR(TAG, "encomsp_read_unicode_string failed with error %u", error); return error; } @@ -528,7 +528,7 @@ static UINT encomsp_recv_participant_created_pdu(encomspPlugin* encomsp, IFCALLRET(context->ParticipantCreated, error, context, &pdu); if (error) - WLog_ERR(TAG, "context->ParticipantCreated failed with error %lu", error); + WLog_ERR(TAG, "context->ParticipantCreated failed with error %u", error); return error; } @@ -584,7 +584,7 @@ static UINT encomsp_recv_participant_removed_pdu(encomspPlugin* encomsp, IFCALLRET(context->ParticipantRemoved, error, context, &pdu); if (error) - WLog_ERR(TAG, "context->ParticipantRemoved failed with error %lu", error); + WLog_ERR(TAG, "context->ParticipantRemoved failed with error %u", error); return error; } @@ -639,7 +639,7 @@ static UINT encomsp_recv_change_participant_control_level_pdu( IFCALLRET(context->ChangeParticipantControlLevel, error, context, &pdu); if (error) - WLog_ERR(TAG, "context->ChangeParticipantControlLevel failed with error %lu", + WLog_ERR(TAG, "context->ChangeParticipantControlLevel failed with error %u", error); return error; @@ -670,7 +670,7 @@ static UINT encomsp_send_change_participant_control_level_pdu( if ((error = encomsp_write_header(s, (ENCOMSP_ORDER_HEADER*) pdu))) { - WLog_ERR(TAG, "encomsp_write_header failed with error %lu!", error); + WLog_ERR(TAG, "encomsp_write_header failed with error %u!", error); return error; } @@ -721,7 +721,7 @@ static UINT encomsp_recv_graphics_stream_paused_pdu(encomspPlugin* encomsp, IFCALLRET(context->GraphicsStreamPaused, error, context, &pdu); if (error) - WLog_ERR(TAG, "context->GraphicsStreamPaused failed with error %lu", error); + WLog_ERR(TAG, "context->GraphicsStreamPaused failed with error %u", error); return error; } @@ -767,7 +767,7 @@ static UINT encomsp_recv_graphics_stream_resumed_pdu(encomspPlugin* encomsp, IFCALLRET(context->GraphicsStreamResumed, error, context, &pdu); if (error) - WLog_ERR(TAG, "context->GraphicsStreamResumed failed with error %lu", error); + WLog_ERR(TAG, "context->GraphicsStreamResumed failed with error %u", error); return error; } @@ -786,7 +786,7 @@ static UINT encomsp_process_receive(encomspPlugin* encomsp, wStream* s) { if ((error = encomsp_read_header(s, &header))) { - WLog_ERR(TAG, "encomsp_read_header failed with error %lu!", error); + WLog_ERR(TAG, "encomsp_read_header failed with error %u!", error); return error; } @@ -797,7 +797,7 @@ static UINT encomsp_process_receive(encomspPlugin* encomsp, wStream* s) case ODTYPE_FILTER_STATE_UPDATED: if ((error = encomsp_recv_filter_updated_pdu(encomsp, s, &header))) { - WLog_ERR(TAG, "encomsp_recv_filter_updated_pdu failed with error %lu!", error); + WLog_ERR(TAG, "encomsp_recv_filter_updated_pdu failed with error %u!", error); return error; } @@ -806,7 +806,7 @@ static UINT encomsp_process_receive(encomspPlugin* encomsp, wStream* s) case ODTYPE_APP_REMOVED: if ((error = encomsp_recv_application_removed_pdu(encomsp, s, &header))) { - WLog_ERR(TAG, "encomsp_recv_application_removed_pdu failed with error %lu!", + WLog_ERR(TAG, "encomsp_recv_application_removed_pdu failed with error %u!", error); return error; } @@ -816,7 +816,7 @@ static UINT encomsp_process_receive(encomspPlugin* encomsp, wStream* s) case ODTYPE_APP_CREATED: if ((error = encomsp_recv_application_created_pdu(encomsp, s, &header))) { - WLog_ERR(TAG, "encomsp_recv_application_removed_pdu failed with error %lu!", + WLog_ERR(TAG, "encomsp_recv_application_removed_pdu failed with error %u!", error); return error; } @@ -826,7 +826,7 @@ static UINT encomsp_process_receive(encomspPlugin* encomsp, wStream* s) case ODTYPE_WND_REMOVED: if ((error = encomsp_recv_window_removed_pdu(encomsp, s, &header))) { - WLog_ERR(TAG, "encomsp_recv_window_removed_pdu failed with error %lu!", error); + WLog_ERR(TAG, "encomsp_recv_window_removed_pdu failed with error %u!", error); return error; } @@ -835,7 +835,7 @@ static UINT encomsp_process_receive(encomspPlugin* encomsp, wStream* s) case ODTYPE_WND_CREATED: if ((error = encomsp_recv_window_created_pdu(encomsp, s, &header))) { - WLog_ERR(TAG, "encomsp_recv_window_created_pdu failed with error %lu!", error); + WLog_ERR(TAG, "encomsp_recv_window_created_pdu failed with error %u!", error); return error; } @@ -844,7 +844,7 @@ static UINT encomsp_process_receive(encomspPlugin* encomsp, wStream* s) case ODTYPE_WND_SHOW: if ((error = encomsp_recv_show_window_pdu(encomsp, s, &header))) { - WLog_ERR(TAG, "encomsp_recv_show_window_pdu failed with error %lu!", error); + WLog_ERR(TAG, "encomsp_recv_show_window_pdu failed with error %u!", error); return error; } @@ -853,7 +853,7 @@ static UINT encomsp_process_receive(encomspPlugin* encomsp, wStream* s) case ODTYPE_PARTICIPANT_REMOVED: if ((error = encomsp_recv_participant_removed_pdu(encomsp, s, &header))) { - WLog_ERR(TAG, "encomsp_recv_participant_removed_pdu failed with error %lu!", + WLog_ERR(TAG, "encomsp_recv_participant_removed_pdu failed with error %u!", error); return error; } @@ -863,7 +863,7 @@ static UINT encomsp_process_receive(encomspPlugin* encomsp, wStream* s) case ODTYPE_PARTICIPANT_CREATED: if ((error = encomsp_recv_participant_created_pdu(encomsp, s, &header))) { - WLog_ERR(TAG, "encomsp_recv_participant_created_pdu failed with error %lu!", + WLog_ERR(TAG, "encomsp_recv_participant_created_pdu failed with error %u!", error); return error; } @@ -875,7 +875,7 @@ static UINT encomsp_process_receive(encomspPlugin* encomsp, wStream* s) &header))) { WLog_ERR(TAG, - "encomsp_recv_change_participant_control_level_pdu failed with error %lu!", + "encomsp_recv_change_participant_control_level_pdu failed with error %u!", error); return error; } @@ -885,7 +885,7 @@ static UINT encomsp_process_receive(encomspPlugin* encomsp, wStream* s) case ODTYPE_GRAPHICS_STREAM_PAUSED: if ((error = encomsp_recv_graphics_stream_paused_pdu(encomsp, s, &header))) { - WLog_ERR(TAG, "encomsp_recv_graphics_stream_paused_pdu failed with error %lu!", + WLog_ERR(TAG, "encomsp_recv_graphics_stream_paused_pdu failed with error %u!", error); return error; } @@ -895,7 +895,7 @@ static UINT encomsp_process_receive(encomspPlugin* encomsp, wStream* s) case ODTYPE_GRAPHICS_STREAM_RESUMED: if ((error = encomsp_recv_graphics_stream_resumed_pdu(encomsp, s, &header))) { - WLog_ERR(TAG, "encomsp_recv_graphics_stream_resumed_pdu failed with error %lu!", + WLog_ERR(TAG, "encomsp_recv_graphics_stream_resumed_pdu failed with error %u!", error); return error; } @@ -1019,7 +1019,7 @@ static VOID VCAPITYPE encomsp_virtual_channel_open_event_ex(LPVOID lpUserParam, if ((error = encomsp_virtual_channel_event_data_received(encomsp, pData, dataLength, totalLength, dataFlags))) WLog_ERR(TAG, - "encomsp_virtual_channel_event_data_received failed with error %lu", error); + "encomsp_virtual_channel_event_data_received failed with error %u", error); break; @@ -1070,7 +1070,7 @@ static void* encomsp_virtual_channel_client_thread(void* arg) if ((error = encomsp_process_receive(encomsp, data))) { - WLog_ERR(TAG, "encomsp_process_receive failed with error %lu!", error); + WLog_ERR(TAG, "encomsp_process_receive failed with error %u!", error); break; } } @@ -1137,7 +1137,7 @@ static UINT encomsp_virtual_channel_event_disconnected(encomspPlugin* encomsp) && (WaitForSingleObject(encomsp->thread, INFINITE) == WAIT_FAILED)) { rc = GetLastError(); - WLog_ERR(TAG, "WaitForSingleObject failed with error %lu", rc); + WLog_ERR(TAG, "WaitForSingleObject failed with error %u", rc); return rc; } @@ -1195,7 +1195,7 @@ static VOID VCAPITYPE encomsp_virtual_channel_init_event_ex(LPVOID lpUserParam, case CHANNEL_EVENT_CONNECTED: if ((error = encomsp_virtual_channel_event_connected(encomsp, pData, dataLength))) - WLog_ERR(TAG, "encomsp_virtual_channel_event_connected failed with error %lu", + WLog_ERR(TAG, "encomsp_virtual_channel_event_connected failed with error %u", error); break; @@ -1203,7 +1203,7 @@ static VOID VCAPITYPE encomsp_virtual_channel_init_event_ex(LPVOID lpUserParam, case CHANNEL_EVENT_DISCONNECTED: if ((error = encomsp_virtual_channel_event_disconnected(encomsp))) WLog_ERR(TAG, - "encomsp_virtual_channel_event_disconnected failed with error %lu", error); + "encomsp_virtual_channel_event_disconnected failed with error %u", error); break; diff --git a/channels/encomsp/server/encomsp_main.c b/channels/encomsp/server/encomsp_main.c index 4c3cbae..b9948b8 100644 --- a/channels/encomsp/server/encomsp_main.c +++ b/channels/encomsp/server/encomsp_main.c @@ -122,7 +122,7 @@ static UINT encomsp_recv_change_participant_control_level_pdu( IFCALLRET(context->ChangeParticipantControlLevel, error, context, &pdu); if (error) - WLog_ERR(TAG, "context->ChangeParticipantControlLevel failed with error %lu", + WLog_ERR(TAG, "context->ChangeParticipantControlLevel failed with error %u", error); return error; @@ -143,7 +143,7 @@ static UINT encomsp_server_receive_pdu(EncomspServerContext* context, { if ((error = encomsp_read_header(s, &header))) { - WLog_ERR(TAG, "encomsp_read_header failed with error %lu!", error); + WLog_ERR(TAG, "encomsp_read_header failed with error %u!", error); return error; } @@ -157,7 +157,7 @@ static UINT encomsp_server_receive_pdu(EncomspServerContext* context, &header))) { WLog_ERR(TAG, - "encomsp_recv_change_participant_control_level_pdu failed with error %lu!", + "encomsp_recv_change_participant_control_level_pdu failed with error %u!", error); return error; } @@ -220,7 +220,7 @@ static void* encomsp_server_thread(void* arg) if (status == WAIT_FAILED) { error = GetLastError(); - WLog_ERR(TAG, "WaitForMultipleObjects failed with error %lu", error); + WLog_ERR(TAG, "WaitForMultipleObjects failed with error %u", error); break; } @@ -229,7 +229,7 @@ static void* encomsp_server_thread(void* arg) if (status == WAIT_FAILED) { error = GetLastError(); - WLog_ERR(TAG, "WaitForSingleObject failed with error %lu", error); + WLog_ERR(TAG, "WaitForSingleObject failed with error %u", error); break; } @@ -269,7 +269,7 @@ static void* encomsp_server_thread(void* arg) if ((error = encomsp_server_receive_pdu(context, s))) { - WLog_ERR(TAG, "encomsp_server_receive_pdu failed with error %lu!", error); + WLog_ERR(TAG, "encomsp_server_receive_pdu failed with error %u!", error); break; } @@ -333,7 +333,7 @@ static UINT encomsp_server_stop(EncomspServerContext* context) if (WaitForSingleObject(context->priv->Thread, INFINITE) == WAIT_FAILED) { error = GetLastError(); - WLog_ERR(TAG, "WaitForSingleObject failed with error %lu", error); + WLog_ERR(TAG, "WaitForSingleObject failed with error %u", error); return error; } diff --git a/channels/parallel/client/parallel_main.c b/channels/parallel/client/parallel_main.c index c38e4de..0614ffc 100644 --- a/channels/parallel/client/parallel_main.c +++ b/channels/parallel/client/parallel_main.c @@ -379,7 +379,7 @@ static UINT parallel_free(DEVICE* device) && (WaitForSingleObject(parallel->thread, INFINITE) == WAIT_FAILED)) { error = GetLastError(); - WLog_ERR(TAG, "WaitForSingleObject failed with error %lu!", error); + WLog_ERR(TAG, "WaitForSingleObject failed with error %u!", error); return error; } @@ -461,7 +461,7 @@ UINT DeviceServiceEntry(PDEVICE_SERVICE_ENTRY_POINTS pEntryPoints) if ((error = pEntryPoints->RegisterDevice(pEntryPoints->devman, (DEVICE*) parallel))) { - WLog_ERR(TAG, "RegisterDevice failed with error %lu!", error); + WLog_ERR(TAG, "RegisterDevice failed with error %u!", error); goto error_out; } diff --git a/channels/printer/client/printer_main.c b/channels/printer/client/printer_main.c index 210cb77..6d1b3e1 100644 --- a/channels/printer/client/printer_main.c +++ b/channels/printer/client/printer_main.c @@ -153,7 +153,7 @@ static UINT printer_process_irp_write(PRINTER_DEVICE* printer_dev, IRP* irp) if (error) { - WLog_ERR(TAG, "printjob->Write failed with error %lu!", error); + WLog_ERR(TAG, "printjob->Write failed with error %u!", error); return error; } @@ -188,7 +188,7 @@ static UINT printer_process_irp(PRINTER_DEVICE* printer_dev, IRP* irp) case IRP_MJ_CREATE: if ((error = printer_process_irp_create(printer_dev, irp))) { - WLog_ERR(TAG, "printer_process_irp_create failed with error %lu!", error); + WLog_ERR(TAG, "printer_process_irp_create failed with error %u!", error); return error; } @@ -197,7 +197,7 @@ static UINT printer_process_irp(PRINTER_DEVICE* printer_dev, IRP* irp) case IRP_MJ_CLOSE: if ((error = printer_process_irp_close(printer_dev, irp))) { - WLog_ERR(TAG, "printer_process_irp_close failed with error %lu!", error); + WLog_ERR(TAG, "printer_process_irp_close failed with error %u!", error); return error; } @@ -206,7 +206,7 @@ static UINT printer_process_irp(PRINTER_DEVICE* printer_dev, IRP* irp) case IRP_MJ_WRITE: if ((error = printer_process_irp_write(printer_dev, irp))) { - WLog_ERR(TAG, "printer_process_irp_write failed with error %lu!", error); + WLog_ERR(TAG, "printer_process_irp_write failed with error %u!", error); return error; } @@ -215,7 +215,7 @@ static UINT printer_process_irp(PRINTER_DEVICE* printer_dev, IRP* irp) case IRP_MJ_DEVICE_CONTROL: if ((error = printer_process_irp_device_control(printer_dev, irp))) { - WLog_ERR(TAG, "printer_process_irp_device_control failed with error %lu!", + WLog_ERR(TAG, "printer_process_irp_device_control failed with error %u!", error); return error; } @@ -245,7 +245,7 @@ static void* printer_thread_func(void* arg) if (rc == WAIT_FAILED) { error = GetLastError(); - WLog_ERR(TAG, "WaitForMultipleObjects failed with error %lu!", error); + WLog_ERR(TAG, "WaitForMultipleObjects failed with error %u!", error); break; } @@ -307,7 +307,7 @@ static UINT printer_free(DEVICE* device) if (WaitForSingleObject(printer_dev->thread, INFINITE) == WAIT_FAILED) { error = GetLastError(); - WLog_ERR(TAG, "WaitForSingleObject failed with error %lu", error); + WLog_ERR(TAG, "WaitForSingleObject failed with error %u", error); return error; } @@ -514,7 +514,7 @@ UINT DeviceServiceEntry(PDEVICE_SERVICE_ENTRY_POINTS pEntryPoints) if ((error = printer_register(pEntryPoints, printer))) { - WLog_ERR(TAG, "printer_register failed with error %lu!", error); + WLog_ERR(TAG, "printer_register failed with error %u!", error); return error; } } @@ -528,7 +528,7 @@ UINT DeviceServiceEntry(PDEVICE_SERVICE_ENTRY_POINTS pEntryPoints) if ((error = printer_register(pEntryPoints, printer))) { - WLog_ERR(TAG, "printer_register failed with error %lu!", error); + WLog_ERR(TAG, "printer_register failed with error %u!", error); free(printers); return error; } diff --git a/channels/rail/client/rail_main.c b/channels/rail/client/rail_main.c index 42a7fd0..2025e35 100644 --- a/channels/rail/client/rail_main.c +++ b/channels/rail/client/rail_main.c @@ -179,14 +179,14 @@ static UINT rail_send_client_sysparam(RailClientContext* context, if ((error = rail_write_client_sysparam_order(s, sysparam))) { - WLog_ERR(TAG, "rail_write_client_sysparam_order failed with error %lu!", error); + WLog_ERR(TAG, "rail_write_client_sysparam_order failed with error %u!", error); Stream_Free(s, TRUE); return error; } if ((error = rail_send_pdu(rail, s, RDP_RAIL_ORDER_SYSPARAM))) { - WLog_ERR(TAG, "rail_send_pdu failed with error %lu!", error); + WLog_ERR(TAG, "rail_send_pdu failed with error %u!", error); } Stream_Free(s, TRUE); @@ -209,7 +209,7 @@ static UINT rail_client_system_param(RailClientContext* context, if ((error = rail_send_client_sysparam(context, sysparam))) { - WLog_ERR(TAG, "rail_send_client_sysparam failed with error %lu!", error); + WLog_ERR(TAG, "rail_send_client_sysparam failed with error %u!", error); return error; } } @@ -220,7 +220,7 @@ static UINT rail_client_system_param(RailClientContext* context, if ((error = rail_send_client_sysparam(context, sysparam))) { - WLog_ERR(TAG, "rail_send_client_sysparam failed with error %lu!", error); + WLog_ERR(TAG, "rail_send_client_sysparam failed with error %u!", error); return error; } } @@ -231,7 +231,7 @@ static UINT rail_client_system_param(RailClientContext* context, if ((error = rail_send_client_sysparam(context, sysparam))) { - WLog_ERR(TAG, "rail_send_client_sysparam failed with error %lu!", error); + WLog_ERR(TAG, "rail_send_client_sysparam failed with error %u!", error); return error; } } @@ -242,7 +242,7 @@ static UINT rail_client_system_param(RailClientContext* context, if ((error = rail_send_client_sysparam(context, sysparam))) { - WLog_ERR(TAG, "rail_send_client_sysparam failed with error %lu!", error); + WLog_ERR(TAG, "rail_send_client_sysparam failed with error %u!", error); return error; } } @@ -253,7 +253,7 @@ static UINT rail_client_system_param(RailClientContext* context, if ((error = rail_send_client_sysparam(context, sysparam))) { - WLog_ERR(TAG, "rail_send_client_sysparam failed with error %lu!", error); + WLog_ERR(TAG, "rail_send_client_sysparam failed with error %u!", error); return error; } } @@ -264,7 +264,7 @@ static UINT rail_client_system_param(RailClientContext* context, if ((error = rail_send_client_sysparam(context, sysparam))) { - WLog_ERR(TAG, "rail_send_client_sysparam failed with error %lu!", error); + WLog_ERR(TAG, "rail_send_client_sysparam failed with error %u!", error); return error; } } @@ -275,7 +275,7 @@ static UINT rail_client_system_param(RailClientContext* context, if ((error = rail_send_client_sysparam(context, sysparam))) { - WLog_ERR(TAG, "rail_send_client_sysparam failed with error %lu!", error); + WLog_ERR(TAG, "rail_send_client_sysparam failed with error %u!", error); return error; } } @@ -558,7 +558,7 @@ static VOID VCAPITYPE rail_virtual_channel_open_event_ex(LPVOID lpUserParam, DWO case CHANNEL_EVENT_DATA_RECEIVED: if ((error = rail_virtual_channel_event_data_received(rail, pData, dataLength, totalLength, dataFlags))) - WLog_ERR(TAG, "rail_virtual_channel_event_data_received failed with error %lu!", + WLog_ERR(TAG, "rail_virtual_channel_event_data_received failed with error %u!", error); break; @@ -677,7 +677,7 @@ static UINT rail_virtual_channel_event_disconnected(railPlugin* rail) && (WaitForSingleObject(rail->thread, INFINITE) == WAIT_FAILED)) { rc = GetLastError(); - WLog_ERR(TAG, "WaitForSingleObject failed with error %lu", rc); + WLog_ERR(TAG, "WaitForSingleObject failed with error %u", rc); return rc; } @@ -727,14 +727,14 @@ static VOID VCAPITYPE rail_virtual_channel_init_event_ex(LPVOID lpUserParam, LPV { case CHANNEL_EVENT_CONNECTED: if ((error = rail_virtual_channel_event_connected(rail, pData, dataLength))) - WLog_ERR(TAG, "rail_virtual_channel_event_connected failed with error %lu!", + WLog_ERR(TAG, "rail_virtual_channel_event_connected failed with error %u!", error); break; case CHANNEL_EVENT_DISCONNECTED: if ((error = rail_virtual_channel_event_disconnected(rail))) - WLog_ERR(TAG, "rail_virtual_channel_event_disconnected failed with error %lu!", + WLog_ERR(TAG, "rail_virtual_channel_event_disconnected failed with error %u!", error); break; diff --git a/channels/rail/client/rail_orders.c b/channels/rail/client/rail_orders.c index 570740e..d8729cc 100644 --- a/channels/rail/client/rail_orders.c +++ b/channels/rail/client/rail_orders.c @@ -268,17 +268,17 @@ UINT rail_write_client_exec_order(wStream* s, RAIL_EXEC_ORDER* exec) Stream_Write_UINT16(s, exec->arguments.length); /* argumentsLength (2 bytes) */ if ((error = rail_write_unicode_string_value(s, &exec->exeOrFile))) { - WLog_ERR(TAG, "rail_write_unicode_string_value failed with error %lu", error); + WLog_ERR(TAG, "rail_write_unicode_string_value failed with error %u", error); return error; } if ((error = rail_write_unicode_string_value(s, &exec->workingDir))) { - WLog_ERR(TAG, "rail_write_unicode_string_value failed with error %lu", error); + WLog_ERR(TAG, "rail_write_unicode_string_value failed with error %u", error); return error; } if ((error = rail_write_unicode_string_value(s, &exec->arguments))) { - WLog_ERR(TAG, "rail_write_unicode_string_value failed with error %lu", error); + WLog_ERR(TAG, "rail_write_unicode_string_value failed with error %u", error); return error; } return error; @@ -408,7 +408,7 @@ UINT rail_recv_handshake_order(railPlugin* rail, RAIL_HANDSHAKE_ORDER* handshake if ((error = rail_read_handshake_order(s, handshake))) { - WLog_ERR(TAG, "rail_read_handshake_order failed with error %lu!", error); + WLog_ERR(TAG, "rail_read_handshake_order failed with error %u!", error); return error; } @@ -416,7 +416,7 @@ UINT rail_recv_handshake_order(railPlugin* rail, RAIL_HANDSHAKE_ORDER* handshake { IFCALLRET(context->ServerHandshake, error, context, handshake); if (error) - WLog_ERR(TAG, "context.ServerHandshake failed with error %lu", error); + WLog_ERR(TAG, "context.ServerHandshake failed with error %u", error); } return error; @@ -434,7 +434,7 @@ UINT rail_recv_handshake_ex_order(railPlugin* rail, RAIL_HANDSHAKE_EX_ORDER* han if ((error = rail_read_handshake_ex_order(s, handshakeEx))) { - WLog_ERR(TAG, "rail_read_handshake_ex_order failed with error %lu!", error); + WLog_ERR(TAG, "rail_read_handshake_ex_order failed with error %u!", error); return error; } @@ -442,7 +442,7 @@ UINT rail_recv_handshake_ex_order(railPlugin* rail, RAIL_HANDSHAKE_EX_ORDER* han { IFCALLRET(context->ClientHandshakeEx, error, context, handshakeEx); if (error) - WLog_ERR(TAG, "context.ClientHandshakeEx failed with error %lu", error); + WLog_ERR(TAG, "context.ClientHandshakeEx failed with error %u", error); } @@ -463,7 +463,7 @@ UINT rail_recv_exec_result_order(railPlugin* rail, RAIL_EXEC_RESULT_ORDER* execR if ((error = rail_read_server_exec_result_order(s, execResult))) { - WLog_ERR(TAG, "rail_read_server_exec_result_order failed with error %lu!", error); + WLog_ERR(TAG, "rail_read_server_exec_result_order failed with error %u!", error); return error; } @@ -471,7 +471,7 @@ UINT rail_recv_exec_result_order(railPlugin* rail, RAIL_EXEC_RESULT_ORDER* execR { IFCALLRET(context->ServerExecuteResult, error, context, execResult); if (error) - WLog_ERR(TAG, "context.ServerExecuteResult failed with error %lu", error); + WLog_ERR(TAG, "context.ServerExecuteResult failed with error %u", error); } @@ -490,7 +490,7 @@ UINT rail_recv_server_sysparam_order(railPlugin* rail, RAIL_SYSPARAM_ORDER* sysp if ((error = rail_read_server_sysparam_order(s, sysparam))) { - WLog_ERR(TAG, "rail_read_server_sysparam_order failed with error %lu!", error); + WLog_ERR(TAG, "rail_read_server_sysparam_order failed with error %u!", error); return error; } @@ -498,7 +498,7 @@ UINT rail_recv_server_sysparam_order(railPlugin* rail, RAIL_SYSPARAM_ORDER* sysp { IFCALLRET(context->ServerSystemParam, error, context, sysparam); if (error) - WLog_ERR(TAG, "context.ServerSystemParam failed with error %lu", error); + WLog_ERR(TAG, "context.ServerSystemParam failed with error %u", error); } return error; @@ -516,7 +516,7 @@ UINT rail_recv_server_minmaxinfo_order(railPlugin* rail, RAIL_MINMAXINFO_ORDER* if ((error = rail_read_server_minmaxinfo_order(s, minMaxInfo))) { - WLog_ERR(TAG, "rail_read_server_minmaxinfo_order failed with error %lu!", error); + WLog_ERR(TAG, "rail_read_server_minmaxinfo_order failed with error %u!", error); return error; } @@ -524,7 +524,7 @@ UINT rail_recv_server_minmaxinfo_order(railPlugin* rail, RAIL_MINMAXINFO_ORDER* { IFCALLRET(context->ServerMinMaxInfo, error, context, minMaxInfo); if (error) - WLog_ERR(TAG, "context.ServerMinMaxInfo failed with error %lu", error); + WLog_ERR(TAG, "context.ServerMinMaxInfo failed with error %u", error); } return error; @@ -542,7 +542,7 @@ UINT rail_recv_server_localmovesize_order(railPlugin* rail, RAIL_LOCALMOVESIZE_O if ((error = rail_read_server_localmovesize_order(s, localMoveSize))) { - WLog_ERR(TAG, "rail_read_server_localmovesize_order failed with error %lu!", error); + WLog_ERR(TAG, "rail_read_server_localmovesize_order failed with error %u!", error); return error; } @@ -550,7 +550,7 @@ UINT rail_recv_server_localmovesize_order(railPlugin* rail, RAIL_LOCALMOVESIZE_O { IFCALLRET(context->ServerLocalMoveSize, error, context, localMoveSize); if (error) - WLog_ERR(TAG, "context.ServerLocalMoveSize failed with error %lu", error); + WLog_ERR(TAG, "context.ServerLocalMoveSize failed with error %u", error); } return error; @@ -568,7 +568,7 @@ UINT rail_recv_server_get_appid_resp_order(railPlugin* rail, RAIL_GET_APPID_RESP if ((error = rail_read_server_get_appid_resp_order(s, getAppIdResp))) { - WLog_ERR(TAG, "rail_read_server_get_appid_resp_order failed with error %lu!", error); + WLog_ERR(TAG, "rail_read_server_get_appid_resp_order failed with error %u!", error); return error; } @@ -576,7 +576,7 @@ UINT rail_recv_server_get_appid_resp_order(railPlugin* rail, RAIL_GET_APPID_RESP { IFCALLRET(context->ServerGetAppIdResponse, error, context, getAppIdResp); if (error) - WLog_ERR(TAG, "context.ServerGetAppIdResponse failed with error %lu", error); + WLog_ERR(TAG, "context.ServerGetAppIdResponse failed with error %u", error); } return error; @@ -594,7 +594,7 @@ UINT rail_recv_langbar_info_order(railPlugin* rail, RAIL_LANGBAR_INFO_ORDER* lan if ((error = rail_read_langbar_info_order(s, langBarInfo))) { - WLog_ERR(TAG, "rail_read_langbar_info_order failed with error %lu!", error); + WLog_ERR(TAG, "rail_read_langbar_info_order failed with error %u!", error); return error; } @@ -602,7 +602,7 @@ UINT rail_recv_langbar_info_order(railPlugin* rail, RAIL_LANGBAR_INFO_ORDER* lan { IFCALLRET(context->ServerLanguageBarInfo, error, context, langBarInfo); if (error) - WLog_ERR(TAG, "context.ServerLanguageBarInfo failed with error %lu", error); + WLog_ERR(TAG, "context.ServerLanguageBarInfo failed with error %u", error); } return error; @@ -621,12 +621,12 @@ UINT rail_order_recv(railPlugin* rail, wStream* s) if ((error = rail_read_pdu_header(s, &orderType, &orderLength))) { - WLog_ERR(TAG, "rail_read_pdu_header failed with error %lu!", error); + WLog_ERR(TAG, "rail_read_pdu_header failed with error %u!", error); return error; } - WLog_Print(rail->log, WLOG_DEBUG, "Received %s PDU, length:%lu", - RAIL_ORDER_TYPE_STRINGS[((orderType & 0xF0) >> 3) + (orderType & 0x0F)], orderLength); + WLog_Print(rail->log, WLOG_DEBUG, "Received %s PDU, length:%u", + RAIL_ORDER_TYPE_STRINGS[((orderType & 0xF0) >> 3) + (orderType & 0x0F)], (unsigned)orderLength); switch (orderType) { @@ -780,12 +780,12 @@ UINT rail_send_client_exec_order(railPlugin* rail, RAIL_EXEC_ORDER* exec) if ((error = rail_write_client_exec_order(s, exec))) { - WLog_ERR(TAG, "rail_write_client_exec_order failed with error %lu!", error); + WLog_ERR(TAG, "rail_write_client_exec_order failed with error %u!", error); return error; } if ((error = rail_send_pdu(rail, s, RDP_RAIL_ORDER_EXEC))) { - WLog_ERR(TAG, "rail_send_pdu failed with error %lu!", error); + WLog_ERR(TAG, "rail_send_pdu failed with error %u!", error); return error; } Stream_Free(s, TRUE); @@ -834,13 +834,13 @@ UINT rail_send_client_sysparam_order(railPlugin* rail, RAIL_SYSPARAM_ORDER* sysp if ((error = rail_write_client_sysparam_order(s, sysparam))) { - WLog_ERR(TAG, "rail_write_client_sysparam_order failed with error %lu!", error); + WLog_ERR(TAG, "rail_write_client_sysparam_order failed with error %u!", error); return error; } if ((error = rail_send_pdu(rail, s, RDP_RAIL_ORDER_SYSPARAM))) { - WLog_ERR(TAG, "rail_send_pdu failed with error %lu!", error); + WLog_ERR(TAG, "rail_send_pdu failed with error %u!", error); return error; } @@ -862,7 +862,7 @@ UINT rail_send_client_sysparams_order(railPlugin* rail, RAIL_SYSPARAM_ORDER* sys sysparam->param = SPI_SET_HIGH_CONTRAST; if ((error = rail_send_client_sysparam_order(rail, sysparam))) { - WLog_ERR(TAG, "rail_send_client_sysparam_order failed with error %lu!", error); + WLog_ERR(TAG, "rail_send_client_sysparam_order failed with error %u!", error); return error; } } @@ -872,7 +872,7 @@ UINT rail_send_client_sysparams_order(railPlugin* rail, RAIL_SYSPARAM_ORDER* sys sysparam->param = SPI_TASKBAR_POS; if ((error = rail_send_client_sysparam_order(rail, sysparam))) { - WLog_ERR(TAG, "rail_send_client_sysparam_order failed with error %lu!", error); + WLog_ERR(TAG, "rail_send_client_sysparam_order failed with error %u!", error); return error; } } @@ -882,7 +882,7 @@ UINT rail_send_client_sysparams_order(railPlugin* rail, RAIL_SYSPARAM_ORDER* sys sysparam->param = SPI_SET_MOUSE_BUTTON_SWAP; if ((error = rail_send_client_sysparam_order(rail, sysparam))) { - WLog_ERR(TAG, "rail_send_client_sysparam_order failed with error %lu!", error); + WLog_ERR(TAG, "rail_send_client_sysparam_order failed with error %u!", error); return error; } } @@ -892,7 +892,7 @@ UINT rail_send_client_sysparams_order(railPlugin* rail, RAIL_SYSPARAM_ORDER* sys sysparam->param = SPI_SET_KEYBOARD_PREF; if ((error = rail_send_client_sysparam_order(rail, sysparam))) { - WLog_ERR(TAG, "rail_send_client_sysparam_order failed with error %lu!", error); + WLog_ERR(TAG, "rail_send_client_sysparam_order failed with error %u!", error); return error; } } @@ -902,7 +902,7 @@ UINT rail_send_client_sysparams_order(railPlugin* rail, RAIL_SYSPARAM_ORDER* sys sysparam->param = SPI_SET_DRAG_FULL_WINDOWS; if ((error = rail_send_client_sysparam_order(rail, sysparam))) { - WLog_ERR(TAG, "rail_send_client_sysparam_order failed with error %lu!", error); + WLog_ERR(TAG, "rail_send_client_sysparam_order failed with error %u!", error); return error; } } @@ -912,7 +912,7 @@ UINT rail_send_client_sysparams_order(railPlugin* rail, RAIL_SYSPARAM_ORDER* sys sysparam->param = SPI_SET_KEYBOARD_CUES; if ((error = rail_send_client_sysparam_order(rail, sysparam))) { - WLog_ERR(TAG, "rail_send_client_sysparam_order failed with error %lu!", error); + WLog_ERR(TAG, "rail_send_client_sysparam_order failed with error %u!", error); return error; } } @@ -922,7 +922,7 @@ UINT rail_send_client_sysparams_order(railPlugin* rail, RAIL_SYSPARAM_ORDER* sys sysparam->param = SPI_SET_WORK_AREA; if ((error = rail_send_client_sysparam_order(rail, sysparam))) { - WLog_ERR(TAG, "rail_send_client_sysparam_order failed with error %lu!", error); + WLog_ERR(TAG, "rail_send_client_sysparam_order failed with error %u!", error); return error; } } diff --git a/channels/rdpdr/client/rdpdr_main.c b/channels/rdpdr/client/rdpdr_main.c index 3f3c50a..2b227d9 100644 --- a/channels/rdpdr/client/rdpdr_main.c +++ b/channels/rdpdr/client/rdpdr_main.c @@ -252,7 +252,7 @@ LRESULT CALLBACK hotplug_proc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam) if ((error = rdpdr_send_device_list_remove_request(rdpdr, 1, ids))) { // dont end on error, just report ? - WLog_ERR(TAG, "rdpdr_send_device_list_remove_request failed with error %lu!", + WLog_ERR(TAG, "rdpdr_send_device_list_remove_request failed with error %u!", error); } @@ -346,7 +346,7 @@ static UINT drive_hotplug_thread_terminate(rdpdrPlugin* rdpdr) if (rdpdr->hotplug_wnd && !PostMessage(rdpdr->hotplug_wnd, WM_QUIT, 0, 0)) { error = GetLastError(); - WLog_ERR(TAG, "PostMessage failed with error %lu", error); + WLog_ERR(TAG, "PostMessage failed with error %u", error); } return error; @@ -451,7 +451,7 @@ static UINT handle_hotplug(rdpdrPlugin* rdpdr) if ((error = rdpdr_send_device_list_remove_request(rdpdr, 1, ids))) { - WLog_ERR(TAG, "rdpdr_send_device_list_remove_request failed with error %lu!", + WLog_ERR(TAG, "rdpdr_send_device_list_remove_request failed with error %u!", error); goto cleanup; } @@ -529,7 +529,7 @@ static void drive_hotplug_fsevent_callback(ConstFSEventStreamRef streamRef, { if ((error = handle_hotplug(rdpdr))) { - WLog_ERR(TAG, "handle_hotplug failed with error %lu!", error); + WLog_ERR(TAG, "handle_hotplug failed with error %u!", error); } else rdpdr_send_device_list_announce_request(rdpdr, TRUE); @@ -545,7 +545,7 @@ void first_hotplug(rdpdrPlugin* rdpdr) if ((error = handle_hotplug(rdpdr))) { - WLog_ERR(TAG, "handle_hotplug failed with error %lu!", error); + WLog_ERR(TAG, "handle_hotplug failed with error %u!", error); } } @@ -590,7 +590,7 @@ static UINT drive_hotplug_thread_terminate(rdpdrPlugin* rdpdr) if (WaitForSingleObject(rdpdr->hotplugThread, INFINITE) == WAIT_FAILED) { error = GetLastError(); - WLog_ERR(TAG, "WaitForSingleObject failed with error %lu!", error); + WLog_ERR(TAG, "WaitForSingleObject failed with error %u!", error); return error; } @@ -783,7 +783,7 @@ static UINT handle_hotplug(rdpdrPlugin* rdpdr) if ((error = rdpdr_send_device_list_remove_request(rdpdr, 1, ids))) { - WLog_ERR(TAG, "rdpdr_send_device_list_remove_request failed with error %lu!", + WLog_ERR(TAG, "rdpdr_send_device_list_remove_request failed with error %u!", error); goto cleanup; } @@ -848,7 +848,7 @@ static void first_hotplug(rdpdrPlugin* rdpdr) if ((error = handle_hotplug(rdpdr))) { - WLog_ERR(TAG, "handle_hotplug failed with error %lu!", error); + WLog_ERR(TAG, "handle_hotplug failed with error %u!", error); } } @@ -891,7 +891,7 @@ static void* drive_hotplug_thread_func(void* arg) if (status == WAIT_FAILED) { error = GetLastError(); - WLog_ERR(TAG, "WaitForSingleObject failed with error %lu!", error); + WLog_ERR(TAG, "WaitForSingleObject failed with error %u!", error); goto out; } @@ -903,7 +903,7 @@ static void* drive_hotplug_thread_func(void* arg) /* file /proc/mounts changed, handle this */ if ((error = handle_hotplug(rdpdr))) { - WLog_ERR(TAG, "handle_hotplug failed with error %lu!", error); + WLog_ERR(TAG, "handle_hotplug failed with error %u!", error); goto out; } else @@ -944,7 +944,7 @@ static UINT drive_hotplug_thread_terminate(rdpdrPlugin* rdpdr) if (WaitForSingleObject(rdpdr->hotplugThread, INFINITE) == WAIT_FAILED) { error = GetLastError(); - WLog_ERR(TAG, "WaitForSingleObject failed with error %lu!", error); + WLog_ERR(TAG, "WaitForSingleObject failed with error %u!", error); return error; } @@ -1006,7 +1006,7 @@ static UINT rdpdr_process_connect(rdpdrPlugin* rdpdr) if ((error = devman_load_device_service(rdpdr->devman, device, rdpdr->rdpcontext))) { - WLog_ERR(TAG, "devman_load_device_service failed with error %lu!", error); + WLog_ERR(TAG, "devman_load_device_service failed with error %u!", error); return error; } } @@ -1218,14 +1218,14 @@ static UINT rdpdr_process_irp(rdpdrPlugin* rdpdr, wStream* s) if (!irp) { - WLog_ERR(TAG, "irp_new failed with %lu!", error); + WLog_ERR(TAG, "irp_new failed with %u!", error); return error; } IFCALLRET(irp->device->IRPRequest, error, irp->device, irp); if (error) - WLog_ERR(TAG, "device->IRPRequest failed with error %lu", error); + WLog_ERR(TAG, "device->IRPRequest failed with error %u", error); return error; } @@ -1295,19 +1295,19 @@ static UINT rdpdr_process_receive(rdpdrPlugin* rdpdr, wStream* s) if ((error = rdpdr_send_client_announce_reply(rdpdr))) { - WLog_ERR(TAG, "rdpdr_send_client_announce_reply failed with error %lu", error); + WLog_ERR(TAG, "rdpdr_send_client_announce_reply failed with error %u", error); return error; } if ((error = rdpdr_send_client_name_request(rdpdr))) { - WLog_ERR(TAG, "rdpdr_send_client_name_request failed with error %lu", error); + WLog_ERR(TAG, "rdpdr_send_client_name_request failed with error %u", error); return error; } if ((error = rdpdr_process_init(rdpdr))) { - WLog_ERR(TAG, "rdpdr_process_init failed with error %lu", error); + WLog_ERR(TAG, "rdpdr_process_init failed with error %u", error); return error; } @@ -1319,7 +1319,7 @@ static UINT rdpdr_process_receive(rdpdrPlugin* rdpdr, wStream* s) if ((error = rdpdr_send_capability_response(rdpdr))) { - WLog_ERR(TAG, "rdpdr_send_capability_response failed with error %lu", error); + WLog_ERR(TAG, "rdpdr_send_capability_response failed with error %u", error); return error; } @@ -1331,7 +1331,7 @@ static UINT rdpdr_process_receive(rdpdrPlugin* rdpdr, wStream* s) if ((error = rdpdr_send_device_list_announce_request(rdpdr, FALSE))) { - WLog_ERR(TAG, "rdpdr_send_device_list_announce_request failed with error %lu", + WLog_ERR(TAG, "rdpdr_send_device_list_announce_request failed with error %u", error); return error; } @@ -1341,7 +1341,7 @@ static UINT rdpdr_process_receive(rdpdrPlugin* rdpdr, wStream* s) case PAKID_CORE_USER_LOGGEDON: if ((error = rdpdr_send_device_list_announce_request(rdpdr, TRUE))) { - WLog_ERR(TAG, "rdpdr_send_device_list_announce_request failed with error %lu", + WLog_ERR(TAG, "rdpdr_send_device_list_announce_request failed with error %u", error); return error; } @@ -1361,7 +1361,7 @@ static UINT rdpdr_process_receive(rdpdrPlugin* rdpdr, wStream* s) case PAKID_CORE_DEVICE_IOREQUEST: if ((error = rdpdr_process_irp(rdpdr, s))) { - WLog_ERR(TAG, "rdpdr_process_irp failed with error %lu", error); + WLog_ERR(TAG, "rdpdr_process_irp failed with error %u", error); return error; } @@ -1528,7 +1528,7 @@ static VOID VCAPITYPE rdpdr_virtual_channel_open_event_ex(LPVOID lpUserParam, DW if ((error = rdpdr_virtual_channel_event_data_received(rdpdr, pData, dataLength, totalLength, dataFlags))) WLog_ERR(TAG, - "rdpdr_virtual_channel_event_data_received failed with error %lu!", error); + "rdpdr_virtual_channel_event_data_received failed with error %u!", error); break; @@ -1562,7 +1562,7 @@ static void* rdpdr_virtual_channel_client_thread(void* arg) if ((error = rdpdr_process_connect(rdpdr))) { - WLog_ERR(TAG, "rdpdr_process_connect failed with error %lu!", error); + WLog_ERR(TAG, "rdpdr_process_connect failed with error %u!", error); if (rdpdr->rdpcontext) setChannelError(rdpdr->rdpcontext, error, @@ -1588,7 +1588,7 @@ static void* rdpdr_virtual_channel_client_thread(void* arg) if ((error = rdpdr_process_receive(rdpdr, data))) { - WLog_ERR(TAG, "rdpdr_process_receive failed with error %lu!", error); + WLog_ERR(TAG, "rdpdr_process_receive failed with error %u!", error); if (rdpdr->rdpcontext) setChannelError(rdpdr->rdpcontext, error, @@ -1656,7 +1656,7 @@ static UINT rdpdr_virtual_channel_event_disconnected(rdpdrPlugin* rdpdr) && (WaitForSingleObject(rdpdr->thread, INFINITE) == WAIT_FAILED)) { error = GetLastError(); - WLog_ERR(TAG, "WaitForSingleObject failed with error %lu!", error); + WLog_ERR(TAG, "WaitForSingleObject failed with error %u!", error); return error; } @@ -1667,7 +1667,7 @@ static UINT rdpdr_virtual_channel_event_disconnected(rdpdrPlugin* rdpdr) if ((error = drive_hotplug_thread_terminate(rdpdr))) { - WLog_ERR(TAG, "drive_hotplug_thread_terminate failed with error %lu!", error); + WLog_ERR(TAG, "drive_hotplug_thread_terminate failed with error %u!", error); return error; } @@ -1722,14 +1722,14 @@ static VOID VCAPITYPE rdpdr_virtual_channel_init_event_ex(LPVOID lpUserParam, LP case CHANNEL_EVENT_CONNECTED: if ((error = rdpdr_virtual_channel_event_connected(rdpdr, pData, dataLength))) - WLog_ERR(TAG, "rdpdr_virtual_channel_event_connected failed with error %lu!", + WLog_ERR(TAG, "rdpdr_virtual_channel_event_connected failed with error %u!", error); break; case CHANNEL_EVENT_DISCONNECTED: if ((error = rdpdr_virtual_channel_event_disconnected(rdpdr))) - WLog_ERR(TAG, "rdpdr_virtual_channel_event_disconnected failed with error %lu!", + WLog_ERR(TAG, "rdpdr_virtual_channel_event_disconnected failed with error %u!", error); break; diff --git a/channels/rdpdr/server/rdpdr_main.c b/channels/rdpdr/server/rdpdr_main.c index 2ee7885..1bf112a 100644 --- a/channels/rdpdr/server/rdpdr_main.c +++ b/channels/rdpdr/server/rdpdr_main.c @@ -565,7 +565,7 @@ static UINT rdpdr_server_send_core_capability_request(RdpdrServerContext* if ((error = rdpdr_server_write_general_capability_set(context, s))) { WLog_ERR(TAG, - "rdpdr_server_write_general_capability_set failed with error %lu!", error); + "rdpdr_server_write_general_capability_set failed with error %u!", error); return error; } @@ -573,7 +573,7 @@ static UINT rdpdr_server_send_core_capability_request(RdpdrServerContext* { if ((error = rdpdr_server_write_drive_capability_set(context, s))) { - WLog_ERR(TAG, "rdpdr_server_write_drive_capability_set failed with error %lu!", + WLog_ERR(TAG, "rdpdr_server_write_drive_capability_set failed with error %u!", error); return error; } @@ -583,7 +583,7 @@ static UINT rdpdr_server_send_core_capability_request(RdpdrServerContext* { if ((error = rdpdr_server_write_port_capability_set(context, s))) { - WLog_ERR(TAG, "rdpdr_server_write_port_capability_set failed with error %lu!", + WLog_ERR(TAG, "rdpdr_server_write_port_capability_set failed with error %u!", error); return error; } @@ -594,7 +594,7 @@ static UINT rdpdr_server_send_core_capability_request(RdpdrServerContext* if ((error = rdpdr_server_write_printer_capability_set(context, s))) { WLog_ERR(TAG, - "rdpdr_server_write_printer_capability_set failed with error %lu!", error); + "rdpdr_server_write_printer_capability_set failed with error %u!", error); return error; } } @@ -604,7 +604,7 @@ static UINT rdpdr_server_send_core_capability_request(RdpdrServerContext* if ((error = rdpdr_server_write_smartcard_capability_set(context, s))) { WLog_ERR(TAG, - "rdpdr_server_write_printer_capability_set failed with error %lu!", error); + "rdpdr_server_write_printer_capability_set failed with error %u!", error); return error; } } @@ -643,7 +643,7 @@ static UINT rdpdr_server_receive_core_capability_response( { if ((status = rdpdr_server_read_capability_set_header(s, &capabilityHeader))) { - WLog_ERR(TAG, "rdpdr_server_read_capability_set_header failed with error %lu!", + WLog_ERR(TAG, "rdpdr_server_read_capability_set_header failed with error %u!", status); return status; } @@ -654,7 +654,7 @@ static UINT rdpdr_server_receive_core_capability_response( if ((status = rdpdr_server_read_general_capability_set(context, s, &capabilityHeader))) { - WLog_ERR(TAG, "rdpdr_server_read_general_capability_set failed with error %lu!", + WLog_ERR(TAG, "rdpdr_server_read_general_capability_set failed with error %u!", status); return status; } @@ -665,7 +665,7 @@ static UINT rdpdr_server_receive_core_capability_response( if ((status = rdpdr_server_read_printer_capability_set(context, s, &capabilityHeader))) { - WLog_ERR(TAG, "rdpdr_server_read_printer_capability_set failed with error %lu!", + WLog_ERR(TAG, "rdpdr_server_read_printer_capability_set failed with error %u!", status); return status; } @@ -676,7 +676,7 @@ static UINT rdpdr_server_receive_core_capability_response( if ((status = rdpdr_server_read_port_capability_set(context, s, &capabilityHeader))) { - WLog_ERR(TAG, "rdpdr_server_read_port_capability_set failed with error %lu!", + WLog_ERR(TAG, "rdpdr_server_read_port_capability_set failed with error %u!", status); return status; } @@ -687,7 +687,7 @@ static UINT rdpdr_server_receive_core_capability_response( if ((status = rdpdr_server_read_drive_capability_set(context, s, &capabilityHeader))) { - WLog_ERR(TAG, "rdpdr_server_read_drive_capability_set failed with error %lu!", + WLog_ERR(TAG, "rdpdr_server_read_drive_capability_set failed with error %u!", status); return status; } @@ -699,7 +699,7 @@ static UINT rdpdr_server_receive_core_capability_response( &capabilityHeader))) { WLog_ERR(TAG, - "rdpdr_server_read_smartcard_capability_set failed with error %lu!", status); + "rdpdr_server_read_smartcard_capability_set failed with error %u!", status); return status; } @@ -1020,7 +1020,7 @@ static UINT rdpdr_server_receive_pdu(RdpdrServerContext* context, wStream* s, case PAKID_CORE_CLIENTID_CONFIRM: if ((error = rdpdr_server_receive_announce_response(context, s, header))) { - WLog_ERR(TAG, "rdpdr_server_receive_announce_response failed with error %lu!", + WLog_ERR(TAG, "rdpdr_server_receive_announce_response failed with error %u!", error); return error; } @@ -1030,7 +1030,7 @@ static UINT rdpdr_server_receive_pdu(RdpdrServerContext* context, wStream* s, case PAKID_CORE_CLIENT_NAME: if ((error = rdpdr_server_receive_client_name_request(context, s, header))) { - WLog_ERR(TAG, "rdpdr_server_receive_client_name_request failed with error %lu!", + WLog_ERR(TAG, "rdpdr_server_receive_client_name_request failed with error %u!", error); return error; } @@ -1038,13 +1038,13 @@ static UINT rdpdr_server_receive_pdu(RdpdrServerContext* context, wStream* s, if ((error = rdpdr_server_send_core_capability_request(context))) { WLog_ERR(TAG, - "rdpdr_server_send_core_capability_request failed with error %lu!", error); + "rdpdr_server_send_core_capability_request failed with error %u!", error); return error; } if ((error = rdpdr_server_send_client_id_confirm(context))) { - WLog_ERR(TAG, "rdpdr_server_send_client_id_confirm failed with error %lu!", + WLog_ERR(TAG, "rdpdr_server_send_client_id_confirm failed with error %u!", error); return error; } @@ -1055,14 +1055,14 @@ static UINT rdpdr_server_receive_pdu(RdpdrServerContext* context, wStream* s, if ((error = rdpdr_server_receive_core_capability_response(context, s, header))) { WLog_ERR(TAG, - "rdpdr_server_receive_core_capability_response failed with error %lu!", error); + "rdpdr_server_receive_core_capability_response failed with error %u!", error); return error; } if (context->priv->UserLoggedOnPdu) if ((error = rdpdr_server_send_user_logged_on(context))) { - WLog_ERR(TAG, "rdpdr_server_send_user_logged_on failed with error %lu!", error); + WLog_ERR(TAG, "rdpdr_server_send_user_logged_on failed with error %u!", error); return error; } @@ -1073,7 +1073,7 @@ static UINT rdpdr_server_receive_pdu(RdpdrServerContext* context, wStream* s, header))) { WLog_ERR(TAG, - "rdpdr_server_receive_device_list_announce_request failed with error %lu!", + "rdpdr_server_receive_device_list_announce_request failed with error %u!", error); return error; } @@ -1090,7 +1090,7 @@ static UINT rdpdr_server_receive_pdu(RdpdrServerContext* context, wStream* s, if ((error = rdpdr_server_receive_device_io_completion(context, s, header))) { WLog_ERR(TAG, - "rdpdr_server_receive_device_io_completion failed with error %lu!", error); + "rdpdr_server_receive_device_io_completion failed with error %u!", error); return error; } @@ -1101,7 +1101,7 @@ static UINT rdpdr_server_receive_pdu(RdpdrServerContext* context, wStream* s, header))) { WLog_ERR(TAG, - "rdpdr_server_receive_device_io_completion failed with error %lu!", error); + "rdpdr_server_receive_device_io_completion failed with error %u!", error); return error; } @@ -1176,7 +1176,7 @@ static void* rdpdr_server_thread(void* arg) if ((error = rdpdr_server_send_announce_request(context))) { - WLog_ERR(TAG, "rdpdr_server_send_announce_request failed with error %lu!", + WLog_ERR(TAG, "rdpdr_server_send_announce_request failed with error %u!", error); goto out_stream; } @@ -1189,7 +1189,7 @@ static void* rdpdr_server_thread(void* arg) if (status == WAIT_FAILED) { error = GetLastError(); - WLog_ERR(TAG, "WaitForMultipleObjects failed with error %lu!", error); + WLog_ERR(TAG, "WaitForMultipleObjects failed with error %u!", error); goto out_stream; } @@ -1198,7 +1198,7 @@ static void* rdpdr_server_thread(void* arg) if (status == WAIT_FAILED) { error = GetLastError(); - WLog_ERR(TAG, "WaitForSingleObject failed with error %lu!", error); + WLog_ERR(TAG, "WaitForSingleObject failed with error %u!", error); goto out_stream; } @@ -1226,7 +1226,7 @@ static void* rdpdr_server_thread(void* arg) if ((error = rdpdr_server_receive_pdu(context, s, &header))) { - WLog_ERR(TAG, "rdpdr_server_receive_pdu failed with error %lu!", error); + WLog_ERR(TAG, "rdpdr_server_receive_pdu failed with error %u!", error); goto out_stream; } } @@ -1295,7 +1295,7 @@ static UINT rdpdr_server_stop(RdpdrServerContext* context) if (WaitForSingleObject(context->priv->Thread, INFINITE) == WAIT_FAILED) { error = GetLastError(); - WLog_ERR(TAG, "WaitForSingleObject failed with error %lu!", error); + WLog_ERR(TAG, "WaitForSingleObject failed with error %u!", error); return error; } @@ -1906,7 +1906,7 @@ static UINT rdpdr_server_drive_query_directory_callback2( if ((error = rdpdr_server_read_file_directory_information(s, &fdi))) { WLog_ERR(TAG, - "rdpdr_server_read_file_directory_information failed with error %lu!", error); + "rdpdr_server_read_file_directory_information failed with error %u!", error); return error; } } diff --git a/channels/rdpei/client/rdpei_main.c b/channels/rdpei/client/rdpei_main.c index d3fa8f2..559ab77 100644 --- a/channels/rdpei/client/rdpei_main.c +++ b/channels/rdpei/client/rdpei_main.c @@ -196,7 +196,7 @@ static void* rdpei_schedule_thread(void* arg) if (status == WAIT_FAILED) { error = GetLastError(); - WLog_ERR(TAG, "WaitForMultipleObjects failed with error %lu!", error); + WLog_ERR(TAG, "WaitForMultipleObjects failed with error %u!", error); break; } @@ -207,7 +207,7 @@ static void* rdpei_schedule_thread(void* arg) if ((error = rdpei_add_frame(context))) { - WLog_ERR(TAG, "rdpei_add_frame failed with error %lu!", error); + WLog_ERR(TAG, "rdpei_add_frame failed with error %u!", error); break; } @@ -215,7 +215,7 @@ static void* rdpei_schedule_thread(void* arg) { if ((error = rdpei_send_frame(context))) { - WLog_ERR(TAG, "rdpei_send_frame failed with error %lu!", error); + WLog_ERR(TAG, "rdpei_send_frame failed with error %u!", error); break; } } @@ -426,7 +426,7 @@ UINT rdpei_send_touch_event_pdu(RDPEI_CHANNEL_CALLBACK* callback, if ((status = rdpei_write_touch_frame(s, frame))) { - WLog_ERR(TAG, "rdpei_write_touch_frame failed with error %lu!", status); + WLog_ERR(TAG, "rdpei_write_touch_frame failed with error %u!", status); Stream_Free(s, TRUE); return status; } @@ -471,7 +471,7 @@ UINT rdpei_recv_suspend_touch_pdu(RDPEI_CHANNEL_CALLBACK* callback, wStream* s) IFCALLRET(rdpei->SuspendTouch, error, rdpei); if (error) - WLog_ERR(TAG, "rdpei->SuspendTouch failed with error %lu!", error); + WLog_ERR(TAG, "rdpei->SuspendTouch failed with error %u!", error); return error; } @@ -488,7 +488,7 @@ UINT rdpei_recv_resume_touch_pdu(RDPEI_CHANNEL_CALLBACK* callback, wStream* s) IFCALLRET(rdpei->ResumeTouch, error, rdpei); if (error) - WLog_ERR(TAG, "rdpei->ResumeTouch failed with error %lu!", error); + WLog_ERR(TAG, "rdpei->ResumeTouch failed with error %u!", error); return error; } @@ -515,13 +515,13 @@ UINT rdpei_recv_pdu(RDPEI_CHANNEL_CALLBACK* callback, wStream* s) case EVENTID_SC_READY: if ((error = rdpei_recv_sc_ready_pdu(callback, s))) { - WLog_ERR(TAG, "rdpei_recv_sc_ready_pdu failed with error %lu!", error); + WLog_ERR(TAG, "rdpei_recv_sc_ready_pdu failed with error %u!", error); return error; } if ((error = rdpei_send_cs_ready_pdu(callback))) { - WLog_ERR(TAG, "rdpei_send_cs_ready_pdu failed with error %lu!", error); + WLog_ERR(TAG, "rdpei_send_cs_ready_pdu failed with error %u!", error); return error; } @@ -530,7 +530,7 @@ UINT rdpei_recv_pdu(RDPEI_CHANNEL_CALLBACK* callback, wStream* s) case EVENTID_SUSPEND_TOUCH: if ((error = rdpei_recv_suspend_touch_pdu(callback, s))) { - WLog_ERR(TAG, "rdpei_recv_suspend_touch_pdu failed with error %lu!", error); + WLog_ERR(TAG, "rdpei_recv_suspend_touch_pdu failed with error %u!", error); return error; } @@ -539,7 +539,7 @@ UINT rdpei_recv_pdu(RDPEI_CHANNEL_CALLBACK* callback, wStream* s) case EVENTID_RESUME_TOUCH: if ((error = rdpei_recv_resume_touch_pdu(callback, s))) { - WLog_ERR(TAG, "rdpei_recv_resume_touch_pdu failed with error %lu!", error); + WLog_ERR(TAG, "rdpei_recv_resume_touch_pdu failed with error %u!", error); return error; } @@ -634,7 +634,7 @@ static UINT rdpei_plugin_initialize(IWTSPlugin* pPlugin, if ((error = pChannelMgr->CreateListener(pChannelMgr, RDPEI_DVC_CHANNEL_NAME, 0, (IWTSListenerCallback*) rdpei->listener_callback, &(rdpei->listener)))) { - WLog_ERR(TAG, "ChannelMgr->CreateListener failed with error %lu!", error); + WLog_ERR(TAG, "ChannelMgr->CreateListener failed with error %u!", error); goto error_out; } @@ -687,7 +687,7 @@ static UINT rdpei_plugin_terminated(IWTSPlugin* pPlugin) if (WaitForSingleObject(rdpei->thread, INFINITE) == WAIT_FAILED) { error = GetLastError(); - WLog_ERR(TAG, "WaitForSingleObject failed with error %lu!", error); + WLog_ERR(TAG, "WaitForSingleObject failed with error %u!", error); return error; } @@ -737,7 +737,7 @@ UINT rdpei_send_frame(RdpeiClientContext* context) if ((error = rdpei_send_touch_event_pdu(callback, &rdpei->frame))) { - WLog_ERR(TAG, "rdpei_send_touch_event_pdu failed with error %lu!", error); + WLog_ERR(TAG, "rdpei_send_touch_event_pdu failed with error %u!", error); return error; } @@ -901,7 +901,7 @@ UINT rdpei_touch_end(RdpeiClientContext* context, int externalId, int x, int y, { if ((error = context->TouchUpdate(context, externalId, x, y, &tempvalue))) { - WLog_ERR(TAG, "context->TouchUpdate failed with error %lu!", error); + WLog_ERR(TAG, "context->TouchUpdate failed with error %u!", error); return error; } } @@ -913,7 +913,7 @@ UINT rdpei_touch_end(RdpeiClientContext* context, int externalId, int x, int y, if ((error = context->AddContact(context, &contact))) { - WLog_ERR(TAG, "context->AddContact failed with error %lu!", error); + WLog_ERR(TAG, "context->AddContact failed with error %u!", error); return error; } @@ -998,7 +998,7 @@ UINT DVCPluginEntry(IDRDYNVC_ENTRY_POINTS* pEntryPoints) if ((error = pEntryPoints->RegisterPlugin(pEntryPoints, "rdpei", (IWTSPlugin*) rdpei))) { - WLog_ERR(TAG, "EntryPoints->RegisterPlugin failed with error %lu!", error); + WLog_ERR(TAG, "EntryPoints->RegisterPlugin failed with error %u!", error); error = CHANNEL_RC_NO_MEMORY; goto error_out; } diff --git a/channels/rdpei/server/rdpei_main.c b/channels/rdpei/server/rdpei_main.c index cd17086..e015796 100644 --- a/channels/rdpei/server/rdpei_main.c +++ b/channels/rdpei/server/rdpei_main.c @@ -185,7 +185,7 @@ static UINT read_cs_ready_message(RdpeiServerContext *context, wStream *s) IFCALLRET(context->onClientReady, error, context); if (error) - WLog_ERR(TAG, "context->onClientReady failed with error %lu", error); + WLog_ERR(TAG, "context->onClientReady failed with error %u", error); return error; } @@ -271,7 +271,7 @@ static UINT read_touch_frame(RdpeiServerContext *context, wStream *s, RDPINPUT_T { if ((error = read_touch_contact_data(context, s, contact))) { - WLog_ERR(TAG, "read_touch_contact_data failed with error %lu!", error); + WLog_ERR(TAG, "read_touch_contact_data failed with error %u!", error); frame->contactCount = i; touch_frame_reset(frame); return error; @@ -311,7 +311,7 @@ static UINT read_touch_event(RdpeiServerContext *context, wStream *s) { if ((error = read_touch_frame(context, s, frame))) { - WLog_ERR(TAG, "read_touch_contact_data failed with error %lu!", error); + WLog_ERR(TAG, "read_touch_contact_data failed with error %u!", error); event->frameCount = i; goto out_cleanup; } @@ -320,7 +320,7 @@ static UINT read_touch_event(RdpeiServerContext *context, wStream *s) IFCALLRET(context->onTouchEvent, error, context, event); if (error) - WLog_ERR(TAG, "context->onTouchEvent failed with error %lu", error); + WLog_ERR(TAG, "context->onTouchEvent failed with error %u", error); out_cleanup: touch_event_reset(event); @@ -347,7 +347,7 @@ static UINT read_dismiss_hovering_contact(RdpeiServerContext *context, wStream * IFCALLRET(context->onTouchReleased, error, context, contactId); if (error) - WLog_ERR(TAG, "context->onTouchReleased failed with error %lu", error); + WLog_ERR(TAG, "context->onTouchReleased failed with error %u", error); return error; } @@ -420,7 +420,7 @@ UINT rdpei_server_handle_messages(RdpeiServerContext *context) { if ((error = read_cs_ready_message(context, s))) { - WLog_ERR(TAG, "read_cs_ready_message failed with error %lu", error); + WLog_ERR(TAG, "read_cs_ready_message failed with error %u", error); return error; } break; @@ -428,14 +428,14 @@ UINT rdpei_server_handle_messages(RdpeiServerContext *context) { case EVENTID_TOUCH: if ((error = read_touch_event(context, s))) { - WLog_ERR(TAG, "read_touch_event failed with error %lu", error); + WLog_ERR(TAG, "read_touch_event failed with error %u", error); return error; } break; case EVENTID_DISMISS_HOVERING_CONTACT: if ((error = read_dismiss_hovering_contact(context, s))) { - WLog_ERR(TAG, "read_dismiss_hovering_contact failed with error %lu", error); + WLog_ERR(TAG, "read_dismiss_hovering_contact failed with error %u", error); return error; } break; diff --git a/channels/rdpgfx/client/rdpgfx_codec.c b/channels/rdpgfx/client/rdpgfx_codec.c index 323cda5..2f096e8 100644 --- a/channels/rdpgfx/client/rdpgfx_codec.c +++ b/channels/rdpgfx/client/rdpgfx_codec.c @@ -88,7 +88,7 @@ static UINT rdpgfx_read_h264_metablock(RDPGFX_PLUGIN* gfx, wStream* s, regionRect = &(meta->regionRects[index]); if ((error = rdpgfx_read_rect16(s, regionRect))) { - WLog_ERR(TAG, "rdpgfx_read_rect16 failed with error %lu!", error); + WLog_ERR(TAG, "rdpgfx_read_rect16 failed with error %u!", error); goto error_out; } WLog_DBG(TAG, "regionRects[%d]: left: %d top: %d right: %d bottom: %d", @@ -146,7 +146,7 @@ static UINT rdpgfx_decode_AVC420(RDPGFX_PLUGIN* gfx, RDPGFX_SURFACE_COMMAND* cmd if ((error = rdpgfx_read_h264_metablock(gfx, s, &(h264.meta)))) { - WLog_ERR(TAG, "rdpgfx_read_h264_metablock failed with error %lu!", error); + WLog_ERR(TAG, "rdpgfx_read_h264_metablock failed with error %u!", error); return error; } @@ -161,7 +161,7 @@ static UINT rdpgfx_decode_AVC420(RDPGFX_PLUGIN* gfx, RDPGFX_SURFACE_COMMAND* cmd { IFCALLRET(context->SurfaceCommand, error, context, cmd); if (error) - WLog_ERR(TAG, "context->SurfaceCommand failed with error %lu", error); + WLog_ERR(TAG, "context->SurfaceCommand failed with error %u", error); } free(h264.meta.regionRects); @@ -205,7 +205,7 @@ static UINT rdpgfx_decode_AVC444(RDPGFX_PLUGIN* gfx, RDPGFX_SURFACE_COMMAND* cmd pos1 = Stream_GetPosition(s); if ((error = rdpgfx_read_h264_metablock(gfx, s, &(h264.bitstream[0].meta)))) { - WLog_ERR(TAG, "rdpgfx_read_h264_metablock failed with error %lu!", error); + WLog_ERR(TAG, "rdpgfx_read_h264_metablock failed with error %u!", error); return error; } pos2 = Stream_GetPosition(s); @@ -223,7 +223,7 @@ static UINT rdpgfx_decode_AVC444(RDPGFX_PLUGIN* gfx, RDPGFX_SURFACE_COMMAND* cmd if ((error = rdpgfx_read_h264_metablock(gfx, s, &(h264.bitstream[1].meta)))) { - WLog_ERR(TAG, "rdpgfx_read_h264_metablock failed with error %lu!", error); + WLog_ERR(TAG, "rdpgfx_read_h264_metablock failed with error %u!", error); return error; } @@ -244,7 +244,7 @@ static UINT rdpgfx_decode_AVC444(RDPGFX_PLUGIN* gfx, RDPGFX_SURFACE_COMMAND* cmd { IFCALLRET(context->SurfaceCommand, error, context, cmd); if (error) - WLog_ERR(TAG, "context->SurfaceCommand failed with error %lu", error); + WLog_ERR(TAG, "context->SurfaceCommand failed with error %u", error); } free(h264.bitstream[0].meta.regionRects); @@ -270,7 +270,7 @@ UINT rdpgfx_decode(RDPGFX_PLUGIN* gfx, RDPGFX_SURFACE_COMMAND* cmd) case RDPGFX_CODECID_AVC420: if ((error = rdpgfx_decode_AVC420(gfx, cmd))) { - WLog_ERR(TAG, "rdpgfx_decode_AVC420 failed with error %lu", error); + WLog_ERR(TAG, "rdpgfx_decode_AVC420 failed with error %u", error); return error; } break; @@ -278,7 +278,7 @@ UINT rdpgfx_decode(RDPGFX_PLUGIN* gfx, RDPGFX_SURFACE_COMMAND* cmd) case RDPGFX_CODECID_AVC444: if ((error = rdpgfx_decode_AVC444(gfx, cmd))) { - WLog_ERR(TAG, "rdpgfx_decode_AVC444 failed with error %lu", error); + WLog_ERR(TAG, "rdpgfx_decode_AVC444 failed with error %u", error); return error; } break; @@ -288,7 +288,7 @@ UINT rdpgfx_decode(RDPGFX_PLUGIN* gfx, RDPGFX_SURFACE_COMMAND* cmd) { IFCALLRET(context->SurfaceCommand, error, context, cmd); if (error) - WLog_ERR(TAG, "context->SurfaceCommand failed with error %lu", error); + WLog_ERR(TAG, "context->SurfaceCommand failed with error %u", error); } break; } diff --git a/channels/rdpgfx/client/rdpgfx_main.c b/channels/rdpgfx/client/rdpgfx_main.c index e99e73a..703dce9 100644 --- a/channels/rdpgfx/client/rdpgfx_main.c +++ b/channels/rdpgfx/client/rdpgfx_main.c @@ -119,7 +119,7 @@ static UINT rdpgfx_send_caps_advertise_pdu(RDPGFX_CHANNEL_CALLBACK* callback) if ((error = rdpgfx_write_header(s, &header))) { - WLog_ERR(TAG, "rdpgfx_write_header failed with error %lu!", error); + WLog_ERR(TAG, "rdpgfx_write_header failed with error %u!", error); return error; } @@ -193,7 +193,7 @@ static UINT rdpgfx_send_frame_acknowledge_pdu(RDPGFX_CHANNEL_CALLBACK* callback, if ((error = rdpgfx_write_header(s, &header))) { - WLog_ERR(TAG, "rdpgfx_write_header failed with error %lu!", error); + WLog_ERR(TAG, "rdpgfx_write_header failed with error %u!", error); return error; } @@ -277,7 +277,7 @@ static UINT rdpgfx_recv_reset_graphics_pdu(RDPGFX_CHANNEL_CALLBACK* callback, IFCALLRET(context->ResetGraphics, error, context, &pdu); if (error) - WLog_ERR(TAG, "context->ResetGraphics failed with error %lu", error); + WLog_ERR(TAG, "context->ResetGraphics failed with error %u", error); } free(pdu.monitorDefArray); @@ -311,7 +311,7 @@ static UINT rdpgfx_recv_evict_cache_entry_pdu(RDPGFX_CHANNEL_CALLBACK* callback, IFCALLRET(context->EvictCacheEntry, error, context, &pdu); if (error) - WLog_ERR(TAG, "context->EvictCacheEntry failed with error %lu", error); + WLog_ERR(TAG, "context->EvictCacheEntry failed with error %u", error); } return error; @@ -366,7 +366,7 @@ static UINT rdpgfx_recv_cache_import_reply_pdu(RDPGFX_CHANNEL_CALLBACK* callback IFCALLRET(context->CacheImportReply, error, context, &pdu); if (error) - WLog_ERR(TAG, "context->CacheImportReply failed with error %lu", error); + WLog_ERR(TAG, "context->CacheImportReply failed with error %u", error); } free(pdu.cacheSlots); @@ -405,7 +405,7 @@ static UINT rdpgfx_recv_create_surface_pdu(RDPGFX_CHANNEL_CALLBACK* callback, IFCALLRET(context->CreateSurface, error, context, &pdu); if (error) - WLog_ERR(TAG, "context->CreateSurface failed with error %lu", error); + WLog_ERR(TAG, "context->CreateSurface failed with error %u", error); } return error; @@ -438,7 +438,7 @@ static UINT rdpgfx_recv_delete_surface_pdu(RDPGFX_CHANNEL_CALLBACK* callback, IFCALLRET(context->DeleteSurface, error, context, &pdu); if (error) - WLog_ERR(TAG, "context->DeleteSurface failed with error %lu", error); + WLog_ERR(TAG, "context->DeleteSurface failed with error %u", error); } return error; @@ -473,7 +473,7 @@ static UINT rdpgfx_recv_start_frame_pdu(RDPGFX_CHANNEL_CALLBACK* callback, IFCALLRET(context->StartFrame, error, context, &pdu); if (error) - WLog_ERR(TAG, "context->StartFrame failed with error %lu", error); + WLog_ERR(TAG, "context->StartFrame failed with error %u", error); } gfx->UnacknowledgedFrames++; @@ -501,7 +501,7 @@ static UINT rdpgfx_recv_end_frame_pdu(RDPGFX_CHANNEL_CALLBACK* callback, } Stream_Read_UINT32(s, pdu.frameId); /* frameId (4 bytes) */ - WLog_DBG(TAG, "RecvEndFramePdu: frameId: %d", pdu.frameId); + WLog_DBG(TAG, "RecvEndFramePdu: frameId: %lu", (unsigned long) pdu.frameId); if (context) { @@ -509,7 +509,7 @@ static UINT rdpgfx_recv_end_frame_pdu(RDPGFX_CHANNEL_CALLBACK* callback, if (error) { - WLog_ERR(TAG, "context->EndFrame failed with error %lu", error); + WLog_ERR(TAG, "context->EndFrame failed with error %u", error); return error; } } @@ -525,14 +525,14 @@ static UINT rdpgfx_recv_end_frame_pdu(RDPGFX_CHANNEL_CALLBACK* callback, if (gfx->TotalDecodedFrames == 1) if ((error = rdpgfx_send_frame_acknowledge_pdu(callback, &ack))) - WLog_ERR(TAG, "rdpgfx_send_frame_acknowledge_pdu failed with error %lu", error); + WLog_ERR(TAG, "rdpgfx_send_frame_acknowledge_pdu failed with error %u", error); } else { ack.queueDepth = QUEUE_DEPTH_UNAVAILABLE; if ((error = rdpgfx_send_frame_acknowledge_pdu(callback, &ack))) - WLog_ERR(TAG, "rdpgfx_send_frame_acknowledge_pdu failed with error %lu", error); + WLog_ERR(TAG, "rdpgfx_send_frame_acknowledge_pdu failed with error %u", error); } return error; @@ -563,7 +563,7 @@ static UINT rdpgfx_recv_wire_to_surface_1_pdu(RDPGFX_CHANNEL_CALLBACK* callback, if ((error = rdpgfx_read_rect16(s, &(pdu.destRect)))) /* destRect (8 bytes) */ { - WLog_ERR(TAG, "rdpgfx_read_rect16 failed with error %lu", error); + WLog_ERR(TAG, "rdpgfx_read_rect16 failed with error %u", error); return error; } @@ -578,12 +578,13 @@ static UINT rdpgfx_recv_wire_to_surface_1_pdu(RDPGFX_CHANNEL_CALLBACK* callback, pdu.bitmapData = Stream_Pointer(s); Stream_Seek(s, pdu.bitmapDataLength); WLog_DBG(TAG, - "RecvWireToSurface1Pdu: surfaceId: %lu codecId: %s (0x%04lX) pixelFormat: 0x%04lX " - "destRect: left: %lu top: %lu right: %lu bottom: %lu bitmapDataLength: %lu", - pdu.surfaceId, rdpgfx_get_codec_id_string(pdu.codecId), pdu.codecId, - pdu.pixelFormat, - pdu.destRect.left, pdu.destRect.top, pdu.destRect.right, pdu.destRect.bottom, - pdu.bitmapDataLength); + "RecvWireToSurface1Pdu: surfaceId: %lu codecId: %s (0x%04lX) pixelFormat: 0x%04lX " + "destRect: left: %lu top: %lu right: %lu bottom: %lu bitmapDataLength: %lu", + (unsigned long) pdu.surfaceId, rdpgfx_get_codec_id_string(pdu.codecId), + (unsigned long) pdu.codecId, (unsigned long) pdu.pixelFormat, + (unsigned long) pdu.destRect.left, (unsigned long) pdu.destRect.top, + (unsigned long) pdu.destRect.right, (unsigned long) pdu.destRect.bottom, + (unsigned long) pdu.bitmapDataLength); cmd.surfaceId = pdu.surfaceId; cmd.codecId = pdu.codecId; cmd.contextId = 0; @@ -612,7 +613,7 @@ static UINT rdpgfx_recv_wire_to_surface_1_pdu(RDPGFX_CHANNEL_CALLBACK* callback, cmd.data = pdu.bitmapData; if ((error = rdpgfx_decode(gfx, &cmd))) - WLog_ERR(TAG, "rdpgfx_decode failed with error %lu!", error); + WLog_ERR(TAG, "rdpgfx_decode failed with error %u!", error); return error; } @@ -666,7 +667,7 @@ static UINT rdpgfx_recv_wire_to_surface_2_pdu(RDPGFX_CHANNEL_CALLBACK* callback, IFCALLRET(context->SurfaceCommand, error, context, &cmd); if (error) - WLog_ERR(TAG, "context->SurfaceCommand failed with error %lu", error); + WLog_ERR(TAG, "context->SurfaceCommand failed with error %u", error); } return error; @@ -701,7 +702,7 @@ static UINT rdpgfx_recv_delete_encoding_context_pdu(RDPGFX_CHANNEL_CALLBACK* IFCALLRET(context->DeleteEncodingContext, error, context, &pdu); if (error) - WLog_ERR(TAG, "context->DeleteEncodingContext failed with error %lu", error); + WLog_ERR(TAG, "context->DeleteEncodingContext failed with error %u", error); } return error; @@ -732,7 +733,7 @@ static UINT rdpgfx_recv_solid_fill_pdu(RDPGFX_CHANNEL_CALLBACK* callback, wStrea if ((error = rdpgfx_read_color32(s, &(pdu.fillPixel)))) /* fillPixel (4 bytes) */ { - WLog_ERR(TAG, "rdpgfx_read_color32 failed with error %lu!", error); + WLog_ERR(TAG, "rdpgfx_read_color32 failed with error %u!", error); return error; } @@ -758,7 +759,7 @@ static UINT rdpgfx_recv_solid_fill_pdu(RDPGFX_CHANNEL_CALLBACK* callback, wStrea if ((error = rdpgfx_read_rect16(s, fillRect))) { - WLog_ERR(TAG, "rdpgfx_read_rect16 failed with error %lu!", error); + WLog_ERR(TAG, "rdpgfx_read_rect16 failed with error %u!", error); free(pdu.fillRects); return error; } @@ -772,7 +773,7 @@ static UINT rdpgfx_recv_solid_fill_pdu(RDPGFX_CHANNEL_CALLBACK* callback, wStrea IFCALLRET(context->SolidFill, error, context, &pdu); if (error) - WLog_ERR(TAG, "context->SolidFill failed with error %lu", error); + WLog_ERR(TAG, "context->SolidFill failed with error %u", error); } free(pdu.fillRects); @@ -805,7 +806,7 @@ static UINT rdpgfx_recv_surface_to_surface_pdu(RDPGFX_CHANNEL_CALLBACK* if ((error = rdpgfx_read_rect16(s, &(pdu.rectSrc)))) /* rectSrc (8 bytes ) */ { - WLog_ERR(TAG, "rdpgfx_read_rect16 failed with error %lu!", error); + WLog_ERR(TAG, "rdpgfx_read_rect16 failed with error %u!", error); return error; } @@ -832,7 +833,7 @@ static UINT rdpgfx_recv_surface_to_surface_pdu(RDPGFX_CHANNEL_CALLBACK* if ((error = rdpgfx_read_point16(s, destPt))) { - WLog_ERR(TAG, "rdpgfx_read_point16 failed with error %lu!", error); + WLog_ERR(TAG, "rdpgfx_read_point16 failed with error %u!", error); free(pdu.destPts); return error; } @@ -849,7 +850,7 @@ static UINT rdpgfx_recv_surface_to_surface_pdu(RDPGFX_CHANNEL_CALLBACK* IFCALLRET(context->SurfaceToSurface, error, context, &pdu); if (error) - WLog_ERR(TAG, "context->SurfaceToSurface failed with error %lu", error); + WLog_ERR(TAG, "context->SurfaceToSurface failed with error %u", error); } free(pdu.destPts); @@ -881,7 +882,7 @@ static UINT rdpgfx_recv_surface_to_cache_pdu(RDPGFX_CHANNEL_CALLBACK* callback, if ((error = rdpgfx_read_rect16(s, &(pdu.rectSrc)))) /* rectSrc (8 bytes ) */ { - WLog_ERR(TAG, "rdpgfx_read_rect16 failed with error %lu!", error); + WLog_ERR(TAG, "rdpgfx_read_rect16 failed with error %u!", error); return error; } @@ -897,7 +898,7 @@ static UINT rdpgfx_recv_surface_to_cache_pdu(RDPGFX_CHANNEL_CALLBACK* callback, IFCALLRET(context->SurfaceToCache, error, context, &pdu); if (error) - WLog_ERR(TAG, "context->SurfaceToCache failed with error %lu", error); + WLog_ERR(TAG, "context->SurfaceToCache failed with error %u", error); } return error; @@ -949,7 +950,7 @@ static UINT rdpgfx_recv_cache_to_surface_pdu(RDPGFX_CHANNEL_CALLBACK* callback, if ((error = rdpgfx_read_point16(s, destPt))) { - WLog_ERR(TAG, "rdpgfx_read_point16 failed with error %lu", error); + WLog_ERR(TAG, "rdpgfx_read_point16 failed with error %u", error); free(pdu.destPts); return error; } @@ -964,7 +965,7 @@ static UINT rdpgfx_recv_cache_to_surface_pdu(RDPGFX_CHANNEL_CALLBACK* callback, IFCALLRET(context->CacheToSurface, error, context, &pdu); if (error) - WLog_ERR(TAG, "context->CacheToSurface failed with error %lu", error); + WLog_ERR(TAG, "context->CacheToSurface failed with error %u", error); } free(pdu.destPts); @@ -1003,7 +1004,7 @@ static UINT rdpgfx_recv_map_surface_to_output_pdu(RDPGFX_CHANNEL_CALLBACK* IFCALLRET(context->MapSurfaceToOutput, error, context, &pdu); if (error) - WLog_ERR(TAG, "context->MapSurfaceToOutput failed with error %lu", error); + WLog_ERR(TAG, "context->MapSurfaceToOutput failed with error %u", error); } return error; @@ -1041,7 +1042,7 @@ static UINT rdpgfx_recv_map_surface_to_window_pdu(RDPGFX_CHANNEL_CALLBACK* callb IFCALLRET(context->MapSurfaceToWindow, error, context, &pdu); if (error) - WLog_ERR(TAG, "context->MapSurfaceToWindow failed with error %lu", error); + WLog_ERR(TAG, "context->MapSurfaceToWindow failed with error %u", error); } return error; @@ -1061,7 +1062,7 @@ static UINT rdpgfx_recv_pdu(RDPGFX_CHANNEL_CALLBACK* callback, wStream* s) if ((error = rdpgfx_read_header(s, &header))) { - WLog_ERR(TAG, "rdpgfx_read_header failed with error %lu!", error); + WLog_ERR(TAG, "rdpgfx_read_header failed with error %u!", error); return error; } @@ -1075,110 +1076,110 @@ static UINT rdpgfx_recv_pdu(RDPGFX_CHANNEL_CALLBACK* callback, wStream* s) { case RDPGFX_CMDID_WIRETOSURFACE_1: if ((error = rdpgfx_recv_wire_to_surface_1_pdu(callback, s))) - WLog_ERR(TAG, "rdpgfx_recv_wire_to_surface_1_pdu failed with error %lu!", + WLog_ERR(TAG, "rdpgfx_recv_wire_to_surface_1_pdu failed with error %u!", error); break; case RDPGFX_CMDID_WIRETOSURFACE_2: if ((error = rdpgfx_recv_wire_to_surface_2_pdu(callback, s))) - WLog_ERR(TAG, "rdpgfx_recv_wire_to_surface_2_pdu failed with error %lu!", + WLog_ERR(TAG, "rdpgfx_recv_wire_to_surface_2_pdu failed with error %u!", error); break; case RDPGFX_CMDID_DELETEENCODINGCONTEXT: if ((error = rdpgfx_recv_delete_encoding_context_pdu(callback, s))) - WLog_ERR(TAG, "rdpgfx_recv_delete_encoding_context_pdu failed with error %lu!", + WLog_ERR(TAG, "rdpgfx_recv_delete_encoding_context_pdu failed with error %u!", error); break; case RDPGFX_CMDID_SOLIDFILL: if ((error = rdpgfx_recv_solid_fill_pdu(callback, s))) - WLog_ERR(TAG, "rdpgfx_recv_solid_fill_pdu failed with error %lu!", error); + WLog_ERR(TAG, "rdpgfx_recv_solid_fill_pdu failed with error %u!", error); break; case RDPGFX_CMDID_SURFACETOSURFACE: if ((error = rdpgfx_recv_surface_to_surface_pdu(callback, s))) - WLog_ERR(TAG, "rdpgfx_recv_surface_to_surface_pdu failed with error %lu!", + WLog_ERR(TAG, "rdpgfx_recv_surface_to_surface_pdu failed with error %u!", error); break; case RDPGFX_CMDID_SURFACETOCACHE: if ((error = rdpgfx_recv_surface_to_cache_pdu(callback, s))) - WLog_ERR(TAG, "rdpgfx_recv_surface_to_cache_pdu failed with error %lu!", error); + WLog_ERR(TAG, "rdpgfx_recv_surface_to_cache_pdu failed with error %u!", error); break; case RDPGFX_CMDID_CACHETOSURFACE: if ((error = rdpgfx_recv_cache_to_surface_pdu(callback, s))) - WLog_ERR(TAG, "rdpgfx_recv_cache_to_surface_pdu failed with error %lu!", error); + WLog_ERR(TAG, "rdpgfx_recv_cache_to_surface_pdu failed with error %u!", error); break; case RDPGFX_CMDID_EVICTCACHEENTRY: if ((error = rdpgfx_recv_evict_cache_entry_pdu(callback, s))) - WLog_ERR(TAG, "rdpgfx_recv_evict_cache_entry_pdu failed with error %lu!", + WLog_ERR(TAG, "rdpgfx_recv_evict_cache_entry_pdu failed with error %u!", error); break; case RDPGFX_CMDID_CREATESURFACE: if ((error = rdpgfx_recv_create_surface_pdu(callback, s))) - WLog_ERR(TAG, "rdpgfx_recv_create_surface_pdu failed with error %lu!", error); + WLog_ERR(TAG, "rdpgfx_recv_create_surface_pdu failed with error %u!", error); break; case RDPGFX_CMDID_DELETESURFACE: if ((error = rdpgfx_recv_delete_surface_pdu(callback, s))) - WLog_ERR(TAG, "rdpgfx_recv_delete_surface_pdu failed with error %lu!", error); + WLog_ERR(TAG, "rdpgfx_recv_delete_surface_pdu failed with error %u!", error); break; case RDPGFX_CMDID_STARTFRAME: if ((error = rdpgfx_recv_start_frame_pdu(callback, s))) - WLog_ERR(TAG, "rdpgfx_recv_start_frame_pdu failed with error %lu!", error); + WLog_ERR(TAG, "rdpgfx_recv_start_frame_pdu failed with error %u!", error); break; case RDPGFX_CMDID_ENDFRAME: if ((error = rdpgfx_recv_end_frame_pdu(callback, s))) - WLog_ERR(TAG, "rdpgfx_recv_end_frame_pdu failed with error %lu!", error); + WLog_ERR(TAG, "rdpgfx_recv_end_frame_pdu failed with error %u!", error); break; case RDPGFX_CMDID_RESETGRAPHICS: if ((error = rdpgfx_recv_reset_graphics_pdu(callback, s))) - WLog_ERR(TAG, "rdpgfx_recv_reset_graphics_pdu failed with error %lu!", error); + WLog_ERR(TAG, "rdpgfx_recv_reset_graphics_pdu failed with error %u!", error); break; case RDPGFX_CMDID_MAPSURFACETOOUTPUT: if ((error = rdpgfx_recv_map_surface_to_output_pdu(callback, s))) - WLog_ERR(TAG, "rdpgfx_recv_map_surface_to_output_pdu failed with error %lu!", + WLog_ERR(TAG, "rdpgfx_recv_map_surface_to_output_pdu failed with error %u!", error); break; case RDPGFX_CMDID_CACHEIMPORTREPLY: if ((error = rdpgfx_recv_cache_import_reply_pdu(callback, s))) - WLog_ERR(TAG, "rdpgfx_recv_cache_import_reply_pdu failed with error %lu!", + WLog_ERR(TAG, "rdpgfx_recv_cache_import_reply_pdu failed with error %u!", error); break; case RDPGFX_CMDID_CAPSCONFIRM: if ((error = rdpgfx_recv_caps_confirm_pdu(callback, s))) - WLog_ERR(TAG, "rdpgfx_recv_caps_confirm_pdu failed with error %lu!", error); + WLog_ERR(TAG, "rdpgfx_recv_caps_confirm_pdu failed with error %u!", error); break; case RDPGFX_CMDID_MAPSURFACETOWINDOW: if ((error = rdpgfx_recv_map_surface_to_window_pdu(callback, s))) - WLog_ERR(TAG, "rdpgfx_recv_map_surface_to_window_pdu failed with error %lu!", + WLog_ERR(TAG, "rdpgfx_recv_map_surface_to_window_pdu failed with error %u!", error); break; @@ -1243,7 +1244,7 @@ static UINT rdpgfx_on_data_received(IWTSVirtualChannelCallback* { if ((error = rdpgfx_recv_pdu(callback, s))) { - WLog_ERR(TAG, "rdpgfx_recv_pdu failed with error %lu!", error); + WLog_ERR(TAG, "rdpgfx_recv_pdu failed with error %u!", error); break; } } @@ -1428,7 +1429,7 @@ static UINT rdpgfx_plugin_terminated(IWTSPlugin* pPlugin) if (error) { - WLog_ERR(TAG, "context->DeleteSurface failed with error %lu", error); + WLog_ERR(TAG, "context->DeleteSurface failed with error %u", error); free(pKeys); free(context); free(gfx); @@ -1453,7 +1454,7 @@ static UINT rdpgfx_plugin_terminated(IWTSPlugin* pPlugin) if (error) { - WLog_ERR(TAG, "context->EvictCacheEntry failed with error %lu", error); + WLog_ERR(TAG, "context->EvictCacheEntry failed with error %u", error); free(context); free(gfx); return error; diff --git a/channels/rdpgfx/server/rdpgfx_main.c b/channels/rdpgfx/server/rdpgfx_main.c index 63aefba..ca4c673 100644 --- a/channels/rdpgfx/server/rdpgfx_main.c +++ b/channels/rdpgfx/server/rdpgfx_main.c @@ -168,7 +168,7 @@ static wStream* rdpgfx_server_single_packet_new(UINT16 cmdId, UINT32 dataLen) if ((error = rdpgfx_server_packet_init_header(s, cmdId, pduLength))) { - WLog_ERR(TAG, "Failed to init header with error %lu!", error); + WLog_ERR(TAG, "Failed to init header with error %u!", error); goto error; } @@ -234,7 +234,7 @@ static UINT rdpgfx_send_reset_graphics_pdu(RdpgfxServerContext* context, if (pdu->monitorCount >= 16) { WLog_ERR(TAG, "Monitor count MUST be less than or equal to 16: %lu", - pdu->monitorCount); + (unsigned long) pdu->monitorCount); return ERROR_INVALID_DATA; } @@ -516,7 +516,7 @@ static UINT rdpgfx_write_h264_metablock(wStream* s, RDPGFX_H264_METABLOCK* meta) if ((error = rdpgfx_write_rect16(s, regionRect))) { - WLog_ERR(TAG, "rdpgfx_write_rect16 failed with error %lu!", error); + WLog_ERR(TAG, "rdpgfx_write_rect16 failed with error %u!", error); return error; } } @@ -547,7 +547,7 @@ static INLINE UINT rdpgfx_write_h264_avc420(wStream* s, if ((error = rdpgfx_write_h264_metablock(s, &(havc420->meta)))) { - WLog_ERR(TAG, "rdpgfx_write_h264_metablock failed with error %lu!", + WLog_ERR(TAG, "rdpgfx_write_h264_metablock failed with error %u!", error); return error; } @@ -748,7 +748,7 @@ static UINT rdpgfx_send_surface_frame_command(RdpgfxServerContext* context, if (error != CHANNEL_RC_OK) { - WLog_ERR(TAG, "Failed to init header with error %lu!", error); + WLog_ERR(TAG, "Failed to init header with error %u!", error); goto error; } @@ -764,7 +764,7 @@ static UINT rdpgfx_send_surface_frame_command(RdpgfxServerContext* context, if (error != CHANNEL_RC_OK) { - WLog_ERR(TAG, "Failed to init header with error %lu!", error); + WLog_ERR(TAG, "Failed to init header with error %u!", error); goto error; } @@ -787,7 +787,7 @@ static UINT rdpgfx_send_surface_frame_command(RdpgfxServerContext* context, if (error != CHANNEL_RC_OK) { - WLog_ERR(TAG, "Failed to init header with error %lu!", error); + WLog_ERR(TAG, "Failed to init header with error %u!", error); goto error; } @@ -850,7 +850,7 @@ static UINT rdpgfx_send_solid_fill_pdu(RdpgfxServerContext* context, /* fillPixel (4 bytes) */ if ((error = rdpgfx_write_color32(s, &(pdu->fillPixel)))) { - WLog_ERR(TAG, "rdpgfx_write_color32 failed with error %lu!", error); + WLog_ERR(TAG, "rdpgfx_write_color32 failed with error %u!", error); goto error; } @@ -862,7 +862,7 @@ static UINT rdpgfx_send_solid_fill_pdu(RdpgfxServerContext* context, if ((error = rdpgfx_write_rect16(s, fillRect))) { - WLog_ERR(TAG, "rdpgfx_write_rect16 failed with error %lu!", error); + WLog_ERR(TAG, "rdpgfx_write_rect16 failed with error %u!", error); goto error; } } @@ -900,7 +900,7 @@ static UINT rdpgfx_send_surface_to_surface_pdu(RdpgfxServerContext* context, /* rectSrc (8 bytes ) */ if ((error = rdpgfx_write_rect16(s, &(pdu->rectSrc)))) { - WLog_ERR(TAG, "rdpgfx_write_rect16 failed with error %lu!", error); + WLog_ERR(TAG, "rdpgfx_write_rect16 failed with error %u!", error); goto error; } @@ -912,7 +912,7 @@ static UINT rdpgfx_send_surface_to_surface_pdu(RdpgfxServerContext* context, if ((error = rdpgfx_write_point16(s, destPt))) { - WLog_ERR(TAG, "rdpgfx_write_point16 failed with error %lu!", error); + WLog_ERR(TAG, "rdpgfx_write_point16 failed with error %u!", error); goto error; } } @@ -948,7 +948,7 @@ static UINT rdpgfx_send_surface_to_cache_pdu(RdpgfxServerContext* context, /* rectSrc (8 bytes ) */ if ((error = rdpgfx_write_rect16(s, &(pdu->rectSrc)))) { - WLog_ERR(TAG, "rdpgfx_write_rect16 failed with error %lu!", error); + WLog_ERR(TAG, "rdpgfx_write_rect16 failed with error %u!", error); goto error; } @@ -989,7 +989,7 @@ static UINT rdpgfx_send_cache_to_surface_pdu(RdpgfxServerContext* context, if ((error = rdpgfx_write_point16(s, destPt))) { - WLog_ERR(TAG, "rdpgfx_write_point16 failed with error %lu", error); + WLog_ERR(TAG, "rdpgfx_write_point16 failed with error %u", error); goto error; } } @@ -1075,7 +1075,7 @@ static UINT rdpgfx_recv_frame_acknowledge_pdu(RdpgfxServerContext* context, IFCALLRET(context->FrameAcknowledge, error, context, &pdu); if (error) - WLog_ERR(TAG, "context->FrameAcknowledge failed with error %lu", + WLog_ERR(TAG, "context->FrameAcknowledge failed with error %u", error); } @@ -1140,7 +1140,7 @@ static UINT rdpgfx_recv_cache_import_offer_pdu(RdpgfxServerContext* context, IFCALLRET(context->CacheImportOffer, error, context, &pdu); if (error) - WLog_ERR(TAG, "context->CacheImportOffer failed with error %lu", + WLog_ERR(TAG, "context->CacheImportOffer failed with error %u", error); } @@ -1191,7 +1191,7 @@ static UINT rdpgfx_recv_caps_advertise_pdu(RdpgfxServerContext* context, if (capsDataLength != 4) { - WLog_ERR(TAG, "capsDataLength does not equal to 4: %lu", + WLog_ERR(TAG, "capsDataLength does not equal to 4: %u", capsDataLength); free(capsSets); return ERROR_INVALID_DATA; @@ -1205,7 +1205,7 @@ static UINT rdpgfx_recv_caps_advertise_pdu(RdpgfxServerContext* context, IFCALLRET(context->CapsAdvertise, error, context, &pdu); if (error) - WLog_ERR(TAG, "context->CapsAdvertise failed with error %lu", error); + WLog_ERR(TAG, "context->CapsAdvertise failed with error %u", error); } free(capsSets); @@ -1239,7 +1239,7 @@ static UINT rdpgfx_recv_qoe_frame_acknowledge_pdu(RdpgfxServerContext* context, IFCALLRET(context->QoeFrameAcknowledge, error, context, &pdu); if (error) - WLog_ERR(TAG, "context->QoeFrameAcknowledge failed with error %lu", + WLog_ERR(TAG, "context->QoeFrameAcknowledge failed with error %u", error); } @@ -1260,7 +1260,7 @@ static UINT rdpgfx_server_receive_pdu(RdpgfxServerContext* context, wStream* s) if ((error = rdpgfx_read_header(s, &header))) { - WLog_ERR(TAG, "rdpgfx_read_header failed with error %lu!", error); + WLog_ERR(TAG, "rdpgfx_read_header failed with error %u!", error); return error; } @@ -1273,28 +1273,28 @@ static UINT rdpgfx_server_receive_pdu(RdpgfxServerContext* context, wStream* s) case RDPGFX_CMDID_FRAMEACKNOWLEDGE: if ((error = rdpgfx_recv_frame_acknowledge_pdu(context, s))) WLog_ERR(TAG, "rdpgfx_recv_frame_acknowledge_pdu " - "failed with error %lu!", error); + "failed with error %u!", error); break; case RDPGFX_CMDID_CACHEIMPORTOFFER: if ((error = rdpgfx_recv_cache_import_offer_pdu(context, s))) WLog_ERR(TAG, "rdpgfx_recv_cache_import_offer_pdu " - "failed with error %lu!", error); + "failed with error %u!", error); break; case RDPGFX_CMDID_CAPSADVERTISE: if ((error = rdpgfx_recv_caps_advertise_pdu(context, s))) WLog_ERR(TAG, "rdpgfx_recv_caps_advertise_pdu " - "failed with error %lu!", error); + "failed with error %u!", error); break; case RDPGFX_CMDID_QOEFRAMEACKNOWLEDGE: if ((error = rdpgfx_recv_qoe_frame_acknowledge_pdu(context, s))) WLog_ERR(TAG, "rdpgfx_recv_qoe_frame_acknowledge_pdu " - "failed with error %lu!", error); + "failed with error %u!", error); break; @@ -1347,7 +1347,7 @@ static void* rdpgfx_server_thread_func(void* arg) if (status == WAIT_FAILED) { error = GetLastError(); - WLog_ERR(TAG, "WaitForMultipleObjects failed with error %lu", error); + WLog_ERR(TAG, "WaitForMultipleObjects failed with error %u", error); break; } @@ -1357,7 +1357,7 @@ static void* rdpgfx_server_thread_func(void* arg) if ((error = rdpgfx_server_handle_messages(context))) { - WLog_ERR(TAG, "rdpgfx_server_handle_messages failed with error %lu", + WLog_ERR(TAG, "rdpgfx_server_handle_messages failed with error %u", error); break; } @@ -1475,7 +1475,7 @@ static BOOL rdpgfx_server_close(RdpgfxServerContext* context) if (WaitForSingleObject(priv->thread, INFINITE) == WAIT_FAILED) { WLog_ERR(TAG, "WaitForSingleObject failed with error %lu", - GetLastError()); + (unsigned long)GetLastError()); return FALSE; } @@ -1656,7 +1656,7 @@ UINT rdpgfx_server_handle_messages(RdpgfxServerContext* context) if ((ret = rdpgfx_server_receive_pdu(context, s))) { WLog_ERR(TAG, "rdpgfx_server_receive_pdu " - "failed with error %lu!", ret); + "failed with error %u!", ret); return ret; } } diff --git a/channels/rdpsnd/client/alsa/rdpsnd_alsa.c b/channels/rdpsnd/client/alsa/rdpsnd_alsa.c index 01b9c9b..49c766d 100644 --- a/channels/rdpsnd/client/alsa/rdpsnd_alsa.c +++ b/channels/rdpsnd/client/alsa/rdpsnd_alsa.c @@ -686,7 +686,7 @@ UINT freerdp_rdpsnd_client_subsystem_entry(PFREERDP_RDPSND_DEVICE_ENTRY_POINTS p { if ((error = rdpsnd_alsa_parse_addin_args((rdpsndDevicePlugin *) alsa, args))) { - WLog_ERR(TAG, "rdpsnd_alsa_parse_addin_args failed with error %lu", error); + WLog_ERR(TAG, "rdpsnd_alsa_parse_addin_args failed with error %u", error); goto error_parse_args; } } diff --git a/channels/rdpsnd/client/rdpsnd_main.c b/channels/rdpsnd/client/rdpsnd_main.c index 27740ec..5be9cab 100644 --- a/channels/rdpsnd/client/rdpsnd_main.c +++ b/channels/rdpsnd/client/rdpsnd_main.c @@ -121,7 +121,7 @@ static void* rdpsnd_schedule_thread(void* arg) if (status == WAIT_FAILED) { error = GetLastError(); - WLog_ERR(TAG, "WaitForMultipleObjects failed with error %lu!", error); + WLog_ERR(TAG, "WaitForMultipleObjects failed with error %u!", error); break; } @@ -130,7 +130,7 @@ static void* rdpsnd_schedule_thread(void* arg) if (status == WAIT_FAILED) { error = GetLastError(); - WLog_ERR(TAG, "WaitForSingleObject failed with error %lu!", error); + WLog_ERR(TAG, "WaitForSingleObject failed with error %u!", error); break; } @@ -142,7 +142,7 @@ static void* rdpsnd_schedule_thread(void* arg) if (status == WAIT_FAILED) { error = GetLastError(); - WLog_ERR(TAG, "WaitForSingleObject failed with error %lu!", error); + WLog_ERR(TAG, "WaitForSingleObject failed with error %u!", error); break; } @@ -811,7 +811,7 @@ static UINT rdpsnd_load_device_plugin(rdpsndPlugin* rdpsnd, const char* name, entryPoints.args = args; if ((error = entry(&entryPoints))) - WLog_ERR(TAG, "%s entry returns error %lu", name, error); + WLog_ERR(TAG, "%s entry returns error %u", name, error); WLog_INFO(TAG, "Loaded %s backend for rdpsnd", name); return error; @@ -955,7 +955,7 @@ static UINT rdpsnd_process_connect(rdpsndPlugin* rdpsnd) if ((status = rdpsnd_load_device_plugin(rdpsnd, rdpsnd->subsystem, args))) { - WLog_ERR(TAG, "unable to load the %s subsystem plugin because of error %lu", + WLog_ERR(TAG, "unable to load the %s subsystem plugin because of error %u", rdpsnd->subsystem, status); return status; } @@ -970,7 +970,7 @@ static UINT rdpsnd_process_connect(rdpsndPlugin* rdpsnd) device_name = ""; if ((status = rdpsnd_load_device_plugin(rdpsnd, subsystem_name, args))) - WLog_ERR(TAG, "unable to load the %s subsystem plugin because of error %lu", + WLog_ERR(TAG, "unable to load the %s subsystem plugin because of error %u", subsystem_name, status); } @@ -983,7 +983,7 @@ static UINT rdpsnd_process_connect(rdpsndPlugin* rdpsnd) device_name = ""; if ((status = rdpsnd_load_device_plugin(rdpsnd, subsystem_name, args))) - WLog_ERR(TAG, "unable to load the %s subsystem plugin because of error %lu", + WLog_ERR(TAG, "unable to load the %s subsystem plugin because of error %u", subsystem_name, status); } @@ -996,7 +996,7 @@ static UINT rdpsnd_process_connect(rdpsndPlugin* rdpsnd) device_name = ""; if ((status = rdpsnd_load_device_plugin(rdpsnd, subsystem_name, args))) - WLog_ERR(TAG, "unable to load the %s subsystem plugin because of error %lu", + WLog_ERR(TAG, "unable to load the %s subsystem plugin because of error %u", subsystem_name, status); } @@ -1009,7 +1009,7 @@ static UINT rdpsnd_process_connect(rdpsndPlugin* rdpsnd) device_name = "default"; if ((status = rdpsnd_load_device_plugin(rdpsnd, subsystem_name, args))) - WLog_ERR(TAG, "unable to load the %s subsystem plugin because of error %lu", + WLog_ERR(TAG, "unable to load the %s subsystem plugin because of error %u", subsystem_name, status); } @@ -1022,7 +1022,7 @@ static UINT rdpsnd_process_connect(rdpsndPlugin* rdpsnd) device_name = ""; if ((status = rdpsnd_load_device_plugin(rdpsnd, subsystem_name, args))) - WLog_ERR(TAG, "unable to load the %s subsystem plugin because of error %lu", + WLog_ERR(TAG, "unable to load the %s subsystem plugin because of error %u", subsystem_name, status); } @@ -1035,7 +1035,7 @@ static UINT rdpsnd_process_connect(rdpsndPlugin* rdpsnd) device_name = "default"; if ((status = rdpsnd_load_device_plugin(rdpsnd, subsystem_name, args))) - WLog_ERR(TAG, "unable to load the %s subsystem plugin because of error %lu", + WLog_ERR(TAG, "unable to load the %s subsystem plugin because of error %u", subsystem_name, status); } @@ -1048,7 +1048,7 @@ static UINT rdpsnd_process_connect(rdpsndPlugin* rdpsnd) device_name = ""; if ((status = rdpsnd_load_device_plugin(rdpsnd, subsystem_name, args))) - WLog_ERR(TAG, "unable to load the %s subsystem plugin because of error %lu", + WLog_ERR(TAG, "unable to load the %s subsystem plugin because of error %u", subsystem_name, status); } @@ -1103,7 +1103,7 @@ static void rdpsnd_process_disconnect(rdpsndPlugin* rdpsnd) if (WaitForSingleObject(rdpsnd->ScheduleThread, INFINITE) == WAIT_FAILED) { - WLog_ERR(TAG, "WaitForSingleObject failed with error %lu!", GetLastError()); + WLog_ERR(TAG, "WaitForSingleObject failed with error %lu!", (unsigned long) GetLastError()); return; } @@ -1221,7 +1221,7 @@ static VOID VCAPITYPE rdpsnd_virtual_channel_open_event_ex(LPVOID lpUserParam, D if ((error = rdpsnd_virtual_channel_event_data_received(rdpsnd, pData, dataLength, totalLength, dataFlags))) WLog_ERR(TAG, - "rdpsnd_virtual_channel_event_data_received failed with error %lu", error); + "rdpsnd_virtual_channel_event_data_received failed with error %u", error); break; @@ -1349,7 +1349,7 @@ static UINT rdpsnd_virtual_channel_event_disconnected(rdpsndPlugin* rdpsnd) if (WaitForSingleObject(rdpsnd->thread, INFINITE) == WAIT_FAILED) { error = GetLastError(); - WLog_ERR(TAG, "WaitForSingleObject failed with error %lu!", error); + WLog_ERR(TAG, "WaitForSingleObject failed with error %u!", error); return error; } @@ -1424,7 +1424,7 @@ static VOID VCAPITYPE rdpsnd_virtual_channel_init_event_ex(LPVOID lpUserParam, L { case CHANNEL_EVENT_CONNECTED: if ((error = rdpsnd_virtual_channel_event_connected(plugin, pData, dataLength))) - WLog_ERR(TAG, "rdpsnd_virtual_channel_event_connected failed with error %lu!", + WLog_ERR(TAG, "rdpsnd_virtual_channel_event_connected failed with error %u!", error); break; @@ -1432,7 +1432,7 @@ static VOID VCAPITYPE rdpsnd_virtual_channel_init_event_ex(LPVOID lpUserParam, L case CHANNEL_EVENT_DISCONNECTED: if ((error = rdpsnd_virtual_channel_event_disconnected(plugin))) WLog_ERR(TAG, - "rdpsnd_virtual_channel_event_disconnected failed with error %lu!", error); + "rdpsnd_virtual_channel_event_disconnected failed with error %u!", error); break; @@ -1440,7 +1440,7 @@ static VOID VCAPITYPE rdpsnd_virtual_channel_init_event_ex(LPVOID lpUserParam, L if (plugin->thread != NULL) if ((error = rdpsnd_virtual_channel_event_disconnected(plugin))) WLog_ERR(TAG, - "rdpsnd_virtual_channel_event_disconnected failed with error %lu!", error); + "rdpsnd_virtual_channel_event_disconnected failed with error %u!", error); rdpsnd_virtual_channel_event_terminated(plugin); plugin = NULL; diff --git a/channels/rdpsnd/server/rdpsnd_main.c b/channels/rdpsnd/server/rdpsnd_main.c index 09f6d27..83f6118 100644 --- a/channels/rdpsnd/server/rdpsnd_main.c +++ b/channels/rdpsnd/server/rdpsnd_main.c @@ -115,7 +115,7 @@ static UINT rdpsnd_server_recv_waveconfirm(RdpsndServerContext* context, IFCALLRET(context->ConfirmBlock, error, context, confirmBlockNum, timestamp); if (error) - WLog_ERR(TAG, "context->ConfirmBlock failed with error %lu", error); + WLog_ERR(TAG, "context->ConfirmBlock failed with error %u", error); return error; } @@ -253,7 +253,7 @@ static void* rdpsnd_server_thread(void* arg) if ((error = rdpsnd_server_send_formats(context, context->priv->rdpsnd_pdu))) { - WLog_ERR(TAG, "rdpsnd_server_send_formats failed with error %lu", error); + WLog_ERR(TAG, "rdpsnd_server_send_formats failed with error %u", error); goto out; } @@ -264,7 +264,7 @@ static void* rdpsnd_server_thread(void* arg) if (status == WAIT_FAILED) { error = GetLastError(); - WLog_ERR(TAG, "WaitForMultipleObjects failed with error %lu!", error); + WLog_ERR(TAG, "WaitForMultipleObjects failed with error %u!", error); break; } @@ -273,7 +273,7 @@ static void* rdpsnd_server_thread(void* arg) if (status == WAIT_FAILED) { error = GetLastError(); - WLog_ERR(TAG, "WaitForSingleObject failed with error %lu!", error); + WLog_ERR(TAG, "WaitForSingleObject failed with error %u!", error); break; } @@ -282,7 +282,7 @@ static void* rdpsnd_server_thread(void* arg) if ((error = rdpsnd_server_handle_messages(context))) { - WLog_ERR(TAG, "rdpsnd_server_handle_messages failed with error %lu", error); + WLog_ERR(TAG, "rdpsnd_server_handle_messages failed with error %u", error); break; } } @@ -555,7 +555,7 @@ static UINT rdpsnd_server_send_samples(RdpsndServerContext* context, { if ((error = rdpsnd_server_send_audio_pdu(context, wTimestamp))) { - WLog_ERR(TAG, "rdpsnd_server_send_audio_pdu failed with error %lu", error); + WLog_ERR(TAG, "rdpsnd_server_send_audio_pdu failed with error %u", error); break; } } @@ -616,7 +616,7 @@ static UINT rdpsnd_server_close(RdpsndServerContext* context) } else if ((error = rdpsnd_server_send_audio_pdu(context, 0))) { - WLog_ERR(TAG, "rdpsnd_server_send_audio_pdu failed with error %lu", error); + WLog_ERR(TAG, "rdpsnd_server_send_audio_pdu failed with error %u", error); } } @@ -742,7 +742,7 @@ static UINT rdpsnd_server_stop(RdpsndServerContext* context) if (WaitForSingleObject(context->priv->Thread, INFINITE) == WAIT_FAILED) { error = GetLastError(); - WLog_ERR(TAG, "WaitForSingleObject failed with error %lu!", error); + WLog_ERR(TAG, "WaitForSingleObject failed with error %u!", error); return error; } diff --git a/channels/remdesk/client/remdesk_main.c b/channels/remdesk/client/remdesk_main.c index 4e76ef7..715f5a9 100644 --- a/channels/remdesk/client/remdesk_main.c +++ b/channels/remdesk/client/remdesk_main.c @@ -156,7 +156,7 @@ static UINT remdesk_read_channel_header(wStream* s, if ((ChannelNameLen % 2) != 0) { - WLog_ERR(TAG, "ChannelNameLen % 2) != 0 "); + WLog_ERR(TAG, "ChannelNameLen %% 2) != 0 "); return ERROR_INVALID_DATA; } @@ -293,7 +293,7 @@ static UINT remdesk_send_ctl_version_info_pdu(remdeskPlugin* remdesk) Stream_SealLength(s); if ((error = remdesk_virtual_channel_write(remdesk, s))) - WLog_ERR(TAG, "remdesk_virtual_channel_write failed with error %lu!", error); + WLog_ERR(TAG, "remdesk_virtual_channel_write failed with error %u!", error); if (error != CHANNEL_RC_OK) Stream_Free(s, TRUE); @@ -341,7 +341,7 @@ static UINT remdesk_send_ctl_authenticate_pdu(remdeskPlugin* remdesk) if ((error = remdesk_generate_expert_blob(remdesk))) { - WLog_ERR(TAG, "remdesk_generate_expert_blob failed with error %lu", error); + WLog_ERR(TAG, "remdesk_generate_expert_blob failed with error %u", error); return error; } @@ -384,7 +384,7 @@ static UINT remdesk_send_ctl_authenticate_pdu(remdeskPlugin* remdesk) Stream_SealLength(s); if ((error = remdesk_virtual_channel_write(remdesk, s))) - WLog_ERR(TAG, "remdesk_virtual_channel_write failed with error %lu!", error); + WLog_ERR(TAG, "remdesk_virtual_channel_write failed with error %u!", error); out: free(raConnectionStringW); @@ -436,7 +436,7 @@ static UINT remdesk_send_ctl_remote_control_desktop_pdu(remdeskPlugin* remdesk) Stream_SealLength(s); if ((error = remdesk_virtual_channel_write(remdesk, s))) - WLog_ERR(TAG, "remdesk_virtual_channel_write failed with error %lu!", error); + WLog_ERR(TAG, "remdesk_virtual_channel_write failed with error %u!", error); out: free(raConnectionStringW); @@ -463,7 +463,7 @@ static UINT remdesk_send_ctl_verify_password_pdu(remdeskPlugin* remdesk) if ((error = remdesk_generate_expert_blob(remdesk))) { - WLog_ERR(TAG, "remdesk_generate_expert_blob failed with error %lu!", error); + WLog_ERR(TAG, "remdesk_generate_expert_blob failed with error %u!", error); return error; } @@ -493,7 +493,7 @@ static UINT remdesk_send_ctl_verify_password_pdu(remdeskPlugin* remdesk) Stream_SealLength(s); if ((error = remdesk_virtual_channel_write(remdesk, s))) - WLog_ERR(TAG, "remdesk_virtual_channel_write failed with error %lu!", error); + WLog_ERR(TAG, "remdesk_virtual_channel_write failed with error %u!", error); out: free(expertBlobW); @@ -517,7 +517,7 @@ static UINT remdesk_send_ctl_expert_on_vista_pdu(remdeskPlugin* remdesk) if ((error = remdesk_generate_expert_blob(remdesk))) { - WLog_ERR(TAG, "remdesk_generate_expert_blob failed with error %lu!", error); + WLog_ERR(TAG, "remdesk_generate_expert_blob failed with error %u!", error); return error; } @@ -568,7 +568,7 @@ static UINT remdesk_recv_ctl_pdu(remdeskPlugin* remdesk, wStream* s, case REMDESK_CTL_RESULT: if ((error = remdesk_recv_ctl_result_pdu(remdesk, s, header, &result))) - WLog_ERR(TAG, "remdesk_recv_ctl_result_pdu failed with error %lu", error); + WLog_ERR(TAG, "remdesk_recv_ctl_result_pdu failed with error %u", error); break; @@ -577,7 +577,7 @@ static UINT remdesk_recv_ctl_pdu(remdeskPlugin* remdesk, wStream* s, case REMDESK_CTL_SERVER_ANNOUNCE: if ((error = remdesk_recv_ctl_server_announce_pdu(remdesk, s, header))) - WLog_ERR(TAG, "remdesk_recv_ctl_server_announce_pdu failed with error %lu", + WLog_ERR(TAG, "remdesk_recv_ctl_server_announce_pdu failed with error %u", error); break; @@ -588,7 +588,7 @@ static UINT remdesk_recv_ctl_pdu(remdeskPlugin* remdesk, wStream* s, case REMDESK_CTL_VERSIONINFO: if ((error = remdesk_recv_ctl_version_info_pdu(remdesk, s, header))) { - WLog_ERR(TAG, "remdesk_recv_ctl_version_info_pdu failed with error %lu", error); + WLog_ERR(TAG, "remdesk_recv_ctl_version_info_pdu failed with error %u", error); break; } @@ -596,20 +596,20 @@ static UINT remdesk_recv_ctl_pdu(remdeskPlugin* remdesk, wStream* s, { if ((error = remdesk_send_ctl_version_info_pdu(remdesk))) { - WLog_ERR(TAG, "remdesk_send_ctl_version_info_pdu failed with error %lu", error); + WLog_ERR(TAG, "remdesk_send_ctl_version_info_pdu failed with error %u", error); break; } if ((error = remdesk_send_ctl_authenticate_pdu(remdesk))) { - WLog_ERR(TAG, "remdesk_send_ctl_authenticate_pdu failed with error %lu", error); + WLog_ERR(TAG, "remdesk_send_ctl_authenticate_pdu failed with error %u", error); break; } if ((error = remdesk_send_ctl_remote_control_desktop_pdu(remdesk))) { WLog_ERR(TAG, - "remdesk_send_ctl_remote_control_desktop_pdu failed with error %lu", error); + "remdesk_send_ctl_remote_control_desktop_pdu failed with error %u", error); break; } } @@ -617,14 +617,14 @@ static UINT remdesk_recv_ctl_pdu(remdeskPlugin* remdesk, wStream* s, { if ((error = remdesk_send_ctl_expert_on_vista_pdu(remdesk))) { - WLog_ERR(TAG, "remdesk_send_ctl_expert_on_vista_pdu failed with error %lu", + WLog_ERR(TAG, "remdesk_send_ctl_expert_on_vista_pdu failed with error %u", error); break; } if ((error = remdesk_send_ctl_verify_password_pdu(remdesk))) { - WLog_ERR(TAG, "remdesk_send_ctl_verify_password_pdu failed with error %lu", + WLog_ERR(TAG, "remdesk_send_ctl_verify_password_pdu failed with error %u", error); break; } @@ -675,7 +675,7 @@ static UINT remdesk_process_receive(remdeskPlugin* remdesk, wStream* s) if ((status = remdesk_read_channel_header(s, &header))) { - WLog_ERR(TAG, "remdesk_read_channel_header failed with error %lu", status); + WLog_ERR(TAG, "remdesk_read_channel_header failed with error %u", status); return status; } @@ -820,7 +820,7 @@ static VOID VCAPITYPE remdesk_virtual_channel_open_event_ex(LPVOID lpUserParam, if ((error = remdesk_virtual_channel_event_data_received(remdesk, pData, dataLength, totalLength, dataFlags))) WLog_ERR(TAG, - "remdesk_virtual_channel_event_data_received failed with error %lu!", error); + "remdesk_virtual_channel_event_data_received failed with error %u!", error); break; @@ -832,7 +832,7 @@ static VOID VCAPITYPE remdesk_virtual_channel_open_event_ex(LPVOID lpUserParam, break; default: - WLog_ERR(TAG, "unhandled event %lu!", event); + WLog_ERR(TAG, "unhandled event %u!", event); error = ERROR_INTERNAL_ERROR; } @@ -874,7 +874,7 @@ static void* remdesk_virtual_channel_client_thread(void* arg) if ((error = remdesk_process_receive(remdesk, data))) { - WLog_ERR(TAG, "remdesk_process_receive failed with error %lu!", error); + WLog_ERR(TAG, "remdesk_process_receive failed with error %u!", error); break; } } @@ -949,7 +949,7 @@ static UINT remdesk_virtual_channel_event_disconnected(remdeskPlugin* remdesk) && (WaitForSingleObject(remdesk->thread, INFINITE) == WAIT_FAILED)) { rc = GetLastError(); - WLog_ERR(TAG, "WaitForSingleObject failed with error %lu", rc); + WLog_ERR(TAG, "WaitForSingleObject failed with error %u", rc); return rc; } @@ -1000,7 +1000,7 @@ static VOID VCAPITYPE remdesk_virtual_channel_init_event_ex(LPVOID lpUserParam, case CHANNEL_EVENT_CONNECTED: if ((error = remdesk_virtual_channel_event_connected(remdesk, pData, dataLength))) - WLog_ERR(TAG, "remdesk_virtual_channel_event_connected failed with error %lu", + WLog_ERR(TAG, "remdesk_virtual_channel_event_connected failed with error %u", error); break; @@ -1008,7 +1008,7 @@ static VOID VCAPITYPE remdesk_virtual_channel_init_event_ex(LPVOID lpUserParam, case CHANNEL_EVENT_DISCONNECTED: if ((error = remdesk_virtual_channel_event_disconnected(remdesk))) WLog_ERR(TAG, - "remdesk_virtual_channel_event_disconnected failed with error %lu", error); + "remdesk_virtual_channel_event_disconnected failed with error %u", error); break; diff --git a/channels/remdesk/server/remdesk_main.c b/channels/remdesk/server/remdesk_main.c index 4531740..8ee8dc3 100644 --- a/channels/remdesk/server/remdesk_main.c +++ b/channels/remdesk/server/remdesk_main.c @@ -73,7 +73,7 @@ static UINT remdesk_read_channel_header(wStream* s, if ((ChannelNameLen % 2) != 0) { - WLog_ERR(TAG, "(ChannelNameLen % 2) != 0!"); + WLog_ERR(TAG, "(ChannelNameLen %% 2) != 0!"); return ERROR_INVALID_DATA; } @@ -135,7 +135,7 @@ static UINT remdesk_write_ctl_header(wStream* s, REMDESK_CTL_HEADER* ctlHeader) if ((error = remdesk_write_channel_header(s, (REMDESK_CHANNEL_HEADER*) ctlHeader))) { - WLog_ERR(TAG, "remdesk_write_channel_header failed with error %lu!", error); + WLog_ERR(TAG, "remdesk_write_channel_header failed with error %u!", error); return error; } @@ -173,7 +173,7 @@ static UINT remdesk_send_ctl_result_pdu(RemdeskServerContext* context, if ((error = remdesk_prepare_ctl_header(&(pdu.ctlHeader), REMDESK_CTL_RESULT, 4))) { - WLog_ERR(TAG, "remdesk_prepare_ctl_header failed with error %lu!", error); + WLog_ERR(TAG, "remdesk_prepare_ctl_header failed with error %u!", error); return error; } @@ -187,7 +187,7 @@ static UINT remdesk_send_ctl_result_pdu(RemdeskServerContext* context, if ((error = remdesk_write_ctl_header(s, &(pdu.ctlHeader)))) { - WLog_ERR(TAG, "remdesk_write_ctl_header failed with error %lu!", error); + WLog_ERR(TAG, "remdesk_write_ctl_header failed with error %u!", error); goto out; } @@ -195,7 +195,7 @@ static UINT remdesk_send_ctl_result_pdu(RemdeskServerContext* context, Stream_SealLength(s); if ((error = remdesk_virtual_channel_write(context, s))) - WLog_ERR(TAG, "remdesk_virtual_channel_write failed with error %lu!", error); + WLog_ERR(TAG, "remdesk_virtual_channel_write failed with error %u!", error); out: Stream_Free(s, TRUE); @@ -216,7 +216,7 @@ static UINT remdesk_send_ctl_version_info_pdu(RemdeskServerContext* context) if ((error = remdesk_prepare_ctl_header(&(pdu.ctlHeader), REMDESK_CTL_VERSIONINFO, 8))) { - WLog_ERR(TAG, "remdesk_prepare_ctl_header failed with error %lu!", error); + WLog_ERR(TAG, "remdesk_prepare_ctl_header failed with error %u!", error); return error; } @@ -232,7 +232,7 @@ static UINT remdesk_send_ctl_version_info_pdu(RemdeskServerContext* context) if ((error = remdesk_write_ctl_header(s, &(pdu.ctlHeader)))) { - WLog_ERR(TAG, "remdesk_write_ctl_header failed with error %lu!", error); + WLog_ERR(TAG, "remdesk_write_ctl_header failed with error %u!", error); goto out; } @@ -241,7 +241,7 @@ static UINT remdesk_send_ctl_version_info_pdu(RemdeskServerContext* context) Stream_SealLength(s); if ((error = remdesk_virtual_channel_write(context, s))) - WLog_ERR(TAG, "remdesk_virtual_channel_write failed with error %lu!", error); + WLog_ERR(TAG, "remdesk_virtual_channel_write failed with error %u!", error); out: Stream_Free(s, TRUE); @@ -317,7 +317,7 @@ static UINT remdesk_recv_ctl_remote_control_desktop_pdu( free(pdu.raConnectionString); if ((error = remdesk_send_ctl_result_pdu(context, 0))) - WLog_ERR(TAG, "remdesk_send_ctl_result_pdu failed with error %lu!", error); + WLog_ERR(TAG, "remdesk_send_ctl_result_pdu failed with error %u!", error); return error; } @@ -433,7 +433,7 @@ static UINT remdesk_recv_ctl_verify_password_pdu(RemdeskServerContext* context, WLog_INFO(TAG, "ExpertBlob: %s", pdu.expertBlob); if ((error = remdesk_send_ctl_result_pdu(context, 0))) - WLog_ERR(TAG, "remdesk_send_ctl_result_pdu failed with error %lu!", error); + WLog_ERR(TAG, "remdesk_send_ctl_result_pdu failed with error %u!", error); return error; } @@ -464,7 +464,7 @@ static UINT remdesk_recv_ctl_pdu(RemdeskServerContext* context, wStream* s, if ((error = remdesk_recv_ctl_remote_control_desktop_pdu(context, s, header))) { WLog_ERR(TAG, - "remdesk_recv_ctl_remote_control_desktop_pdu failed with error %lu!", error); + "remdesk_recv_ctl_remote_control_desktop_pdu failed with error %u!", error); return error; } @@ -473,7 +473,7 @@ static UINT remdesk_recv_ctl_pdu(RemdeskServerContext* context, wStream* s, case REMDESK_CTL_AUTHENTICATE: if ((error = remdesk_recv_ctl_authenticate_pdu(context, s, header))) { - WLog_ERR(TAG, "remdesk_recv_ctl_authenticate_pdu failed with error %lu!", + WLog_ERR(TAG, "remdesk_recv_ctl_authenticate_pdu failed with error %u!", error); return error; } @@ -486,7 +486,7 @@ static UINT remdesk_recv_ctl_pdu(RemdeskServerContext* context, wStream* s, case REMDESK_CTL_VERSIONINFO: if ((error = remdesk_recv_ctl_version_info_pdu(context, s, header))) { - WLog_ERR(TAG, "remdesk_recv_ctl_version_info_pdu failed with error %lu!", + WLog_ERR(TAG, "remdesk_recv_ctl_version_info_pdu failed with error %u!", error); return error; } @@ -499,7 +499,7 @@ static UINT remdesk_recv_ctl_pdu(RemdeskServerContext* context, wStream* s, case REMDESK_CTL_VERIFY_PASSWORD: if ((error = remdesk_recv_ctl_verify_password_pdu(context, s, header))) { - WLog_ERR(TAG, "remdesk_recv_ctl_verify_password_pdu failed with error %lu!", + WLog_ERR(TAG, "remdesk_recv_ctl_verify_password_pdu failed with error %u!", error); return error; } @@ -544,7 +544,7 @@ static UINT remdesk_server_receive_pdu(RemdeskServerContext* context, if ((error = remdesk_read_channel_header(s, &header))) { - WLog_ERR(TAG, "remdesk_read_channel_header failed with error %lu!", error); + WLog_ERR(TAG, "remdesk_read_channel_header failed with error %u!", error); return error; } @@ -552,7 +552,7 @@ static UINT remdesk_server_receive_pdu(RemdeskServerContext* context, { if ((error = remdesk_recv_ctl_pdu(context, s, &header))) { - WLog_ERR(TAG, "remdesk_recv_ctl_pdu failed with error %lu!", error); + WLog_ERR(TAG, "remdesk_recv_ctl_pdu failed with error %u!", error); return error; } } @@ -626,7 +626,7 @@ static void* remdesk_server_thread(void* arg) if ((error = remdesk_send_ctl_version_info_pdu(context))) { - WLog_ERR(TAG, "remdesk_send_ctl_version_info_pdu failed with error %lu!", + WLog_ERR(TAG, "remdesk_send_ctl_version_info_pdu failed with error %u!", error); goto out; } @@ -638,7 +638,7 @@ static void* remdesk_server_thread(void* arg) if (status == WAIT_FAILED) { error = GetLastError(); - WLog_ERR(TAG, "WaitForMultipleObjects failed with error %lu", error); + WLog_ERR(TAG, "WaitForMultipleObjects failed with error %u", error); break; } @@ -647,7 +647,7 @@ static void* remdesk_server_thread(void* arg) if (status == WAIT_FAILED) { error = GetLastError(); - WLog_ERR(TAG, "WaitForSingleObject failed with error %lu", error); + WLog_ERR(TAG, "WaitForSingleObject failed with error %u", error); break; } @@ -684,7 +684,7 @@ static void* remdesk_server_thread(void* arg) if ((error = remdesk_server_receive_pdu(context, s))) { - WLog_ERR(TAG, "remdesk_server_receive_pdu failed with error %lu!", error); + WLog_ERR(TAG, "remdesk_server_receive_pdu failed with error %u!", error); break; } @@ -751,7 +751,7 @@ static UINT remdesk_server_stop(RemdeskServerContext* context) if (WaitForSingleObject(context->priv->Thread, INFINITE) == WAIT_FAILED) { error = GetLastError(); - WLog_ERR(TAG, "WaitForSingleObject failed with error %lu!", error); + WLog_ERR(TAG, "WaitForSingleObject failed with error %u!", error); return error; } diff --git a/channels/serial/client/serial_main.c b/channels/serial/client/serial_main.c index 6d04df1..af5ad8d 100644 --- a/channels/serial/client/serial_main.c +++ b/channels/serial/client/serial_main.c @@ -314,7 +314,7 @@ static void serial_process_irp_write(SERIAL_DEVICE* serial, IRP* irp) irp->IoStatus = _GetLastErrorToIoStatus(serial); } - WLog_Print(serial->log, WLOG_DEBUG, "%lu bytes written to %s", nbWritten, + WLog_Print(serial->log, WLOG_DEBUG, "%lu bytes written to %s", (unsigned long) nbWritten, serial->device.name); Stream_Write_UINT32(irp->output, nbWritten); /* Length (4 bytes) */ Stream_Write_UINT8(irp->output, 0); /* Padding (1 byte) */ @@ -434,7 +434,7 @@ static UINT serial_process_irp(SERIAL_DEVICE* serial, IRP* irp) case IRP_MJ_READ: if ((error = serial_process_irp_read(serial, irp))) - WLog_ERR(TAG, "serial_process_irp_read failed with error %lu!", error); + WLog_ERR(TAG, "serial_process_irp_read failed with error %u!", error); break; @@ -444,7 +444,7 @@ static UINT serial_process_irp(SERIAL_DEVICE* serial, IRP* irp) case IRP_MJ_DEVICE_CONTROL: if ((error = serial_process_irp_device_control(serial, irp))) - WLog_ERR(TAG, "serial_process_irp_device_control failed with error %lu!", + WLog_ERR(TAG, "serial_process_irp_device_control failed with error %u!", error); break; @@ -466,7 +466,7 @@ static void* irp_thread_func(void* arg) /* blocks until the end of the request */ if ((error = serial_process_irp(data->serial, data->irp))) { - WLog_ERR(TAG, "serial_process_irp failed with error %lu", error); + WLog_ERR(TAG, "serial_process_irp failed with error %u", error); goto error_out; } @@ -760,7 +760,7 @@ static UINT serial_free(DEVICE* device) if (WaitForSingleObject(serial->MainThread, INFINITE) == WAIT_FAILED) { error = GetLastError(); - WLog_ERR(TAG, "WaitForSingleObject failed with error %lu!", error); + WLog_ERR(TAG, "WaitForSingleObject failed with error %u!", error); return error; } @@ -922,7 +922,7 @@ UINT DeviceServiceEntry(PDEVICE_SERVICE_ENTRY_POINTS pEntryPoints) if ((error = pEntryPoints->RegisterDevice(pEntryPoints->devman, (DEVICE*) serial))) { - WLog_ERR(TAG, "EntryPoints->RegisterDevice failed with error %lu!", error); + WLog_ERR(TAG, "EntryPoints->RegisterDevice failed with error %u!", error); goto error_out; } diff --git a/channels/smartcard/client/smartcard_main.c b/channels/smartcard/client/smartcard_main.c index 0d2e315..0fcdd43 100644 --- a/channels/smartcard/client/smartcard_main.c +++ b/channels/smartcard/client/smartcard_main.c @@ -56,7 +56,7 @@ void* smartcard_context_thread(SMARTCARD_CONTEXT* pContext) if (waitStatus == WAIT_FAILED) { error = GetLastError(); - WLog_ERR(TAG, "WaitForMultipleObjects failed with error %lu!", error); + WLog_ERR(TAG, "WaitForMultipleObjects failed with error %u!", error); break; } @@ -65,7 +65,7 @@ void* smartcard_context_thread(SMARTCARD_CONTEXT* pContext) if (waitStatus == WAIT_FAILED) { error = GetLastError(); - WLog_ERR(TAG, "WaitForSingleObject failed with error %lu!", error); + WLog_ERR(TAG, "WaitForSingleObject failed with error %u!", error); break; } @@ -87,7 +87,7 @@ void* smartcard_context_thread(SMARTCARD_CONTEXT* pContext) { if ((status = smartcard_irp_device_control_call(smartcard, operation))) { - WLog_ERR(TAG, "smartcard_irp_device_control_call failed with error %lu", + WLog_ERR(TAG, "smartcard_irp_device_control_call failed with error %u", status); break; } @@ -162,7 +162,7 @@ void smartcard_context_free(SMARTCARD_CONTEXT* pContext) if (MessageQueue_PostQuit(pContext->IrpQueue, 0) && (WaitForSingleObject(pContext->thread, INFINITE) == WAIT_FAILED)) - WLog_ERR(TAG, "WaitForSingleObject failed with error %lu!", GetLastError()); + WLog_ERR(TAG, "WaitForSingleObject failed with error %lu!", (unsigned long) GetLastError()); CloseHandle(pContext->thread); MessageQueue_Free(pContext->IrpQueue); @@ -237,7 +237,7 @@ static void smartcard_release_all_contexts(SMARTCARD_DEVICE* smartcard) if (MessageQueue_PostQuit(pContext->IrpQueue, 0) && (WaitForSingleObject(pContext->thread, INFINITE) == WAIT_FAILED)) - WLog_ERR(TAG, "WaitForSingleObject failed with error %lu!", GetLastError()); + WLog_ERR(TAG, "WaitForSingleObject failed with error %lu!", (unsigned long) GetLastError()); CloseHandle(pContext->thread); MessageQueue_Free(pContext->IrpQueue); @@ -273,7 +273,7 @@ static UINT smartcard_free(DEVICE* device) && (WaitForSingleObject(smartcard->thread, INFINITE) == WAIT_FAILED)) { error = GetLastError(); - WLog_ERR(TAG, "WaitForSingleObject failed with error %lu!", error); + WLog_ERR(TAG, "WaitForSingleObject failed with error %u!", error); return error; } @@ -465,7 +465,7 @@ UINT smartcard_process_irp(SMARTCARD_DEVICE* smartcard, IRP* irp) { if ((status = smartcard_irp_device_control_call(smartcard, operation))) { - WLog_ERR(TAG, "smartcard_irp_device_control_call failed with error %lu!", + WLog_ERR(TAG, "smartcard_irp_device_control_call failed with error %ld!", status); return (UINT32)status; } @@ -528,7 +528,7 @@ static void* smartcard_thread_func(void* arg) if (status == WAIT_FAILED) { error = GetLastError(); - WLog_ERR(TAG, "WaitForMultipleObjects failed with error %lu!", error); + WLog_ERR(TAG, "WaitForMultipleObjects failed with error %u!", error); break; } @@ -537,7 +537,7 @@ static void* smartcard_thread_func(void* arg) if (status == WAIT_FAILED) { error = GetLastError(); - WLog_ERR(TAG, "WaitForSingleObject failed with error %lu!", error); + WLog_ERR(TAG, "WaitForSingleObject failed with error %u!", error); break; } @@ -559,7 +559,7 @@ static void* smartcard_thread_func(void* arg) if (status == WAIT_FAILED) { error = GetLastError(); - WLog_ERR(TAG, "WaitForSingleObject failed with error %lu!", error); + WLog_ERR(TAG, "WaitForSingleObject failed with error %u!", error); goto out; } @@ -577,7 +577,7 @@ static void* smartcard_thread_func(void* arg) if (status == WAIT_FAILED) { error = GetLastError(); - WLog_ERR(TAG, "WaitForSingleObject failed with error %lu!", error); + WLog_ERR(TAG, "WaitForSingleObject failed with error %u!", error); goto out; } @@ -587,7 +587,7 @@ static void* smartcard_thread_func(void* arg) if ((error = smartcard_complete_irp(smartcard, irp))) { - WLog_ERR(TAG, "smartcard_complete_irp failed with error %lu!", error); + WLog_ERR(TAG, "smartcard_complete_irp failed with error %u!", error); goto out; } } @@ -602,7 +602,7 @@ static void* smartcard_thread_func(void* arg) { if ((error = smartcard_process_irp(smartcard, irp))) { - WLog_ERR(TAG, "smartcard_process_irp failed with error %lu!", error); + WLog_ERR(TAG, "smartcard_process_irp failed with error %u!", error); goto out; } } @@ -613,7 +613,7 @@ static void* smartcard_thread_func(void* arg) if (status == WAIT_FAILED) { error = GetLastError(); - WLog_ERR(TAG, "WaitForSingleObject failed with error %lu!", error); + WLog_ERR(TAG, "WaitForSingleObject failed with error %u!", error); break; } @@ -630,7 +630,7 @@ static void* smartcard_thread_func(void* arg) if (status == WAIT_FAILED) { error = GetLastError(); - WLog_ERR(TAG, "WaitForSingleObject failed with error %lu!", error); + WLog_ERR(TAG, "WaitForSingleObject failed with error %u!", error); break; } @@ -646,7 +646,7 @@ static void* smartcard_thread_func(void* arg) goto out; } - WLog_ERR(TAG, "smartcard_complete_irp failed with error %lu!", error); + WLog_ERR(TAG, "smartcard_complete_irp failed with error %u!", error); goto out; } } diff --git a/channels/smartcard/client/smartcard_operations.c b/channels/smartcard/client/smartcard_operations.c index 3a37add..790314e 100644 --- a/channels/smartcard/client/smartcard_operations.c +++ b/channels/smartcard/client/smartcard_operations.c @@ -202,7 +202,7 @@ static LONG smartcard_EstablishContext_Decode(SMARTCARD_DEVICE* smartcard, SMART if ((status = smartcard_unpack_establish_context_call(smartcard, irp->input, call))) { - WLog_ERR(TAG, "smartcard_unpack_establish_context_call failed with error %lu", status); + WLog_ERR(TAG, "smartcard_unpack_establish_context_call failed with error %ld", status); return status; } smartcard_trace_establish_context_call(smartcard, call); @@ -236,7 +236,7 @@ static LONG smartcard_EstablishContext_Call(SMARTCARD_DEVICE* smartcard, SMARTCA } else { - WLog_ERR(TAG, "SCardEstablishContext failed with error %lu", status); + WLog_ERR(TAG, "SCardEstablishContext failed with error %ld", status); return status; } @@ -244,7 +244,7 @@ static LONG smartcard_EstablishContext_Call(SMARTCARD_DEVICE* smartcard, SMARTCA smartcard_trace_establish_context_return(smartcard, &ret); if ((status = smartcard_pack_establish_context_return(smartcard, irp->output, &ret))) { - WLog_ERR(TAG, "smartcard_pack_establish_context_return failed with error %lu", status); + WLog_ERR(TAG, "smartcard_pack_establish_context_return failed with error %ld", status); return status; } @@ -260,7 +260,7 @@ static LONG smartcard_ReleaseContext_Decode(SMARTCARD_DEVICE* smartcard, SMARTCA return STATUS_NO_MEMORY; if ((status = smartcard_unpack_context_call(smartcard, irp->input, call))) - WLog_ERR(TAG, "smartcard_unpack_context_call failed with error %lu", status); + WLog_ERR(TAG, "smartcard_unpack_context_call failed with error %ld", status); smartcard_trace_context_call(smartcard, call, "ReleaseContext"); operation->hContext = smartcard_scard_context_native_from_redir(smartcard, &(call->hContext)); return status; @@ -282,7 +282,7 @@ static LONG smartcard_ReleaseContext_Call(SMARTCARD_DEVICE* smartcard, SMARTCARD } else { - WLog_ERR(TAG, "SCardReleaseContext failed with error %lu", status); + WLog_ERR(TAG, "SCardReleaseContext failed with error %ld", status); return status; } @@ -299,7 +299,7 @@ static LONG smartcard_IsValidContext_Decode(SMARTCARD_DEVICE* smartcard, SMARTCA return STATUS_NO_MEMORY; if ((status = smartcard_unpack_context_call(smartcard, irp->input, call))) - WLog_ERR(TAG, "smartcard_unpack_context_call failed with error %lu", status); + WLog_ERR(TAG, "smartcard_unpack_context_call failed with error %ld", status); smartcard_trace_context_call(smartcard, call, "IsValidContext"); operation->hContext = smartcard_scard_context_native_from_redir(smartcard, &(call->hContext)); return status; @@ -311,7 +311,7 @@ static LONG smartcard_IsValidContext_Call(SMARTCARD_DEVICE* smartcard, SMARTCARD Long_Return ret; if ((status = ret.ReturnCode = SCardIsValidContext(operation->hContext))) { - WLog_ERR(TAG, "SCardIsValidContext failed with error %lu", status); + WLog_ERR(TAG, "SCardIsValidContext failed with error %ld", status); return status; } smartcard_trace_long_return(smartcard, &ret, "IsValidContext"); @@ -327,7 +327,7 @@ static LONG smartcard_ListReadersA_Decode(SMARTCARD_DEVICE* smartcard, SMARTCARD return STATUS_NO_MEMORY; if ((status = smartcard_unpack_list_readers_call(smartcard, irp->input, call))) - WLog_ERR(TAG, "smartcard_unpack_list_readers_call failed with error %lu", status); + WLog_ERR(TAG, "smartcard_unpack_list_readers_call failed with error %ld", status); smartcard_trace_list_readers_call(smartcard, call, FALSE); operation->hContext = smartcard_scard_context_native_from_redir(smartcard, &(call->hContext)); return status; @@ -356,14 +356,14 @@ static LONG smartcard_ListReadersA_Call(SMARTCARD_DEVICE* smartcard, SMARTCARD_O if (status) { - WLog_ERR(TAG, "SCardListReadersA failed with error %lu", status); + WLog_ERR(TAG, "SCardListReadersA failed with error %ld", status); return status; } smartcard_trace_list_readers_return(smartcard, &ret, FALSE); if ((status = smartcard_pack_list_readers_return(smartcard, irp->output, &ret))) { - WLog_ERR(TAG, "smartcard_pack_list_readers_return failed with error %lu", status); + WLog_ERR(TAG, "smartcard_pack_list_readers_return failed with error %ld", status); return status; } @@ -385,7 +385,7 @@ static LONG smartcard_ListReadersW_Decode(SMARTCARD_DEVICE* smartcard, SMARTCARD return STATUS_NO_MEMORY; if ((status = smartcard_unpack_list_readers_call(smartcard, irp->input, call))) - WLog_ERR(TAG, "smartcard_unpack_list_readers_call failed with error %lu", status); + WLog_ERR(TAG, "smartcard_unpack_list_readers_call failed with error %ld", status); smartcard_trace_list_readers_call(smartcard, call, TRUE); operation->hContext = smartcard_scard_context_native_from_redir(smartcard, &(call->hContext)); @@ -417,7 +417,7 @@ static LONG smartcard_ListReadersW_Call(SMARTCARD_DEVICE* smartcard, SMARTCARD_O if (status) { - WLog_ERR(TAG, "SCardListReadersW failed with error %lu", status); + WLog_ERR(TAG, "SCardListReadersW failed with error %ld", status); return status; } @@ -425,7 +425,7 @@ static LONG smartcard_ListReadersW_Call(SMARTCARD_DEVICE* smartcard, SMARTCARD_O if ((status = smartcard_pack_list_readers_return(smartcard, irp->output, &ret))) { - WLog_ERR(TAG, "smartcard_pack_list_readers_return failed with error %lu", status); + WLog_ERR(TAG, "smartcard_pack_list_readers_return failed with error %ld", status); return status; } @@ -448,7 +448,7 @@ static LONG smartcard_GetStatusChangeA_Decode(SMARTCARD_DEVICE* smartcard, SMART if ((status = smartcard_unpack_get_status_change_a_call(smartcard, irp->input, call))) { - WLog_ERR(TAG, "smartcard_unpack_get_status_change_a_call failed with error %lu", status); + WLog_ERR(TAG, "smartcard_unpack_get_status_change_a_call failed with error %ld", status); return status; } @@ -492,7 +492,7 @@ static LONG smartcard_GetStatusChangeA_Call(SMARTCARD_DEVICE* smartcard, SMARTCA smartcard_trace_get_status_change_return(smartcard, &ret, FALSE); if ((status = smartcard_pack_get_status_change_return(smartcard, irp->output, &ret))) { - WLog_ERR(TAG, "smartcard_pack_get_status_change_return failed with error %lu", status); + WLog_ERR(TAG, "smartcard_pack_get_status_change_return failed with error %ld", status); return status; } @@ -520,7 +520,7 @@ static LONG smartcard_GetStatusChangeW_Decode(SMARTCARD_DEVICE* smartcard, SMART return STATUS_NO_MEMORY; if ((status = smartcard_unpack_get_status_change_w_call(smartcard, irp->input, call))) - WLog_ERR(TAG, "smartcard_unpack_get_status_change_w_call failed with error %lu", status); + WLog_ERR(TAG, "smartcard_unpack_get_status_change_w_call failed with error %ld", status); smartcard_trace_get_status_change_w_call(smartcard, call); operation->hContext = smartcard_scard_context_native_from_redir(smartcard, &(call->hContext)); return status; @@ -559,7 +559,7 @@ static LONG smartcard_GetStatusChangeW_Call(SMARTCARD_DEVICE* smartcard, SMARTCA smartcard_trace_get_status_change_return(smartcard, &ret, TRUE); if ((status = smartcard_pack_get_status_change_return(smartcard, irp->output, &ret))) { - WLog_ERR(TAG, "smartcard_pack_get_status_change_return failed with error %lu", status); + WLog_ERR(TAG, "smartcard_pack_get_status_change_return failed with error %ld", status); return status; } @@ -587,7 +587,7 @@ static LONG smartcard_Cancel_Decode(SMARTCARD_DEVICE* smartcard, SMARTCARD_OPERA return STATUS_NO_MEMORY; if ((status = smartcard_unpack_context_call(smartcard, irp->input, call))) - WLog_ERR(TAG, "smartcard_unpack_context_call failed with error %lu", status); + WLog_ERR(TAG, "smartcard_unpack_context_call failed with error %ld", status); smartcard_trace_context_call(smartcard, call, "Cancel"); operation->hContext = smartcard_scard_context_native_from_redir(smartcard, &(call->hContext)); return status; @@ -600,7 +600,7 @@ static LONG smartcard_Cancel_Call(SMARTCARD_DEVICE* smartcard, SMARTCARD_OPERATI if ((status = ret.ReturnCode = SCardCancel(operation->hContext))) { - WLog_ERR(TAG, "SCardCancel failed with error %lu", status); + WLog_ERR(TAG, "SCardCancel failed with error %ld", status); return status; } smartcard_trace_long_return(smartcard, &ret, "Cancel"); @@ -616,7 +616,7 @@ static LONG smartcard_ConnectA_Decode(SMARTCARD_DEVICE* smartcard, SMARTCARD_OPE return STATUS_NO_MEMORY; if ((status = smartcard_unpack_connect_a_call(smartcard, irp->input, call))) - WLog_ERR(TAG, "smartcard_unpack_connect_a_call failed with error %lu", status); + WLog_ERR(TAG, "smartcard_unpack_connect_a_call failed with error %ld", status); smartcard_trace_connect_a_call(smartcard, call); operation->hContext = smartcard_scard_context_native_from_redir(smartcard, &(call->Common.hContext)); return status; @@ -644,14 +644,14 @@ static LONG smartcard_ConnectA_Call(SMARTCARD_DEVICE* smartcard, SMARTCARD_OPERA if (status) { - WLog_ERR(TAG, "SCardConnectA failed with error %lu", status); + WLog_ERR(TAG, "SCardConnectA failed with error %ld", status); return status; } if ((status = smartcard_pack_connect_return(smartcard, irp->output, &ret))) { - WLog_ERR(TAG, "smartcard_pack_connect_return failed with error %lu", status); + WLog_ERR(TAG, "smartcard_pack_connect_return failed with error %ld", status); return status; } @@ -669,7 +669,7 @@ static LONG smartcard_ConnectW_Decode(SMARTCARD_DEVICE* smartcard, SMARTCARD_OPE return STATUS_NO_MEMORY; if ((status = smartcard_unpack_connect_w_call(smartcard, irp->input, call))) - WLog_ERR(TAG, "smartcard_unpack_connect_w_call failed with error %lu", status); + WLog_ERR(TAG, "smartcard_unpack_connect_w_call failed with error %ld", status); smartcard_trace_connect_w_call(smartcard, call); operation->hContext = smartcard_scard_context_native_from_redir(smartcard, &(call->Common.hContext)); @@ -699,13 +699,13 @@ static LONG smartcard_ConnectW_Call(SMARTCARD_DEVICE* smartcard, SMARTCARD_OPERA if (status) { - WLog_ERR(TAG, "SCardConnectW failed with error %lu", status); + WLog_ERR(TAG, "SCardConnectW failed with error %ld", status); return status; } if ((status = smartcard_pack_connect_return(smartcard, irp->output, &ret))) { - WLog_ERR(TAG, "smartcard_pack_connect_return failed with error %lu", status); + WLog_ERR(TAG, "smartcard_pack_connect_return failed with error %ld", status); return status; } @@ -723,7 +723,7 @@ static LONG smartcard_Reconnect_Decode(SMARTCARD_DEVICE* smartcard, SMARTCARD_OP return STATUS_NO_MEMORY; if ((status = smartcard_unpack_reconnect_call(smartcard, irp->input, call))) - WLog_ERR(TAG, "smartcard_unpack_reconnect_call failed with error %lu", status); + WLog_ERR(TAG, "smartcard_unpack_reconnect_call failed with error %ld", status); smartcard_trace_reconnect_call(smartcard, call); operation->hContext = smartcard_scard_context_native_from_redir(smartcard, &(call->hContext)); operation->hCard = smartcard_scard_handle_native_from_redir(smartcard, &(call->hCard)); @@ -740,7 +740,7 @@ static LONG smartcard_Reconnect_Call(SMARTCARD_DEVICE* smartcard, SMARTCARD_OPER smartcard_trace_reconnect_return(smartcard, &ret); if ((status = smartcard_pack_reconnect_return(smartcard, irp->output, &ret))) { - WLog_ERR(TAG, "smartcard_pack_reconnect_return failed with error %lu", status); + WLog_ERR(TAG, "smartcard_pack_reconnect_return failed with error %ld", status); return status; } @@ -756,7 +756,7 @@ static LONG smartcard_Disconnect_Decode(SMARTCARD_DEVICE* smartcard, SMARTCARD_O return STATUS_NO_MEMORY; if ((status = smartcard_unpack_hcard_and_disposition_call(smartcard, irp->input, call))) - WLog_ERR(TAG, "smartcard_unpack_hcard_and_disposition_call failed with error %lu", status); + WLog_ERR(TAG, "smartcard_unpack_hcard_and_disposition_call failed with error %ld", status); smartcard_trace_hcard_and_disposition_call(smartcard, call, "Disconnect"); operation->hContext = smartcard_scard_context_native_from_redir(smartcard, &(call->hContext)); operation->hCard = smartcard_scard_handle_native_from_redir(smartcard, &(call->hCard)); @@ -769,7 +769,7 @@ static LONG smartcard_Disconnect_Call(SMARTCARD_DEVICE* smartcard, SMARTCARD_OPE Long_Return ret; if ((status = ret.ReturnCode = SCardDisconnect(operation->hCard, call->dwDisposition))) { - WLog_ERR(TAG, "SCardDisconnect failed with error %lu", status); + WLog_ERR(TAG, "SCardDisconnect failed with error %ld", status); return status; } smartcard_trace_long_return(smartcard, &ret, "Disconnect"); @@ -786,7 +786,7 @@ static LONG smartcard_BeginTransaction_Decode(SMARTCARD_DEVICE* smartcard, SMART return STATUS_NO_MEMORY; if ((status = smartcard_unpack_hcard_and_disposition_call(smartcard, irp->input, call))) - WLog_ERR(TAG, "smartcard_unpack_hcard_and_disposition_call failed with error %lu", status); + WLog_ERR(TAG, "smartcard_unpack_hcard_and_disposition_call failed with error %ld", status); smartcard_trace_hcard_and_disposition_call(smartcard, call, "BeginTransaction"); operation->hContext = smartcard_scard_context_native_from_redir(smartcard, &(call->hContext)); operation->hCard = smartcard_scard_handle_native_from_redir(smartcard, &(call->hCard)); @@ -798,7 +798,7 @@ static LONG smartcard_BeginTransaction_Call(SMARTCARD_DEVICE* smartcard, SMARTCA Long_Return ret; if ((ret.ReturnCode = SCardBeginTransaction(operation->hCard))) { - WLog_ERR(TAG, "SCardBeginTransaction failed with error %lu", ret.ReturnCode); + WLog_ERR(TAG, "SCardBeginTransaction failed with error %ld", ret.ReturnCode); return ret.ReturnCode; } smartcard_trace_long_return(smartcard, &ret, "BeginTransaction"); @@ -814,7 +814,7 @@ static LONG smartcard_EndTransaction_Decode(SMARTCARD_DEVICE* smartcard, SMARTCA return STATUS_NO_MEMORY; if ((status = smartcard_unpack_hcard_and_disposition_call(smartcard, irp->input, call))) - WLog_ERR(TAG, "smartcard_unpack_hcard_and_disposition_call failed with error %lu", status); + WLog_ERR(TAG, "smartcard_unpack_hcard_and_disposition_call failed with error %ld", status); smartcard_trace_hcard_and_disposition_call(smartcard, call, "EndTransaction"); operation->hContext = smartcard_scard_context_native_from_redir(smartcard, &(call->hContext)); operation->hCard = smartcard_scard_handle_native_from_redir(smartcard, &(call->hCard)); @@ -826,7 +826,7 @@ static LONG smartcard_EndTransaction_Call(SMARTCARD_DEVICE* smartcard, SMARTCARD Long_Return ret; if ((ret.ReturnCode = SCardEndTransaction(operation->hCard, call->dwDisposition))) { - WLog_ERR(TAG, "SCardEndTransaction failed with error %lu", ret.ReturnCode); + WLog_ERR(TAG, "SCardEndTransaction failed with error %ld", ret.ReturnCode); return ret.ReturnCode; } smartcard_trace_long_return(smartcard, &ret, "EndTransaction"); @@ -842,7 +842,7 @@ static LONG smartcard_State_Decode(SMARTCARD_DEVICE* smartcard, SMARTCARD_OPERAT return STATUS_NO_MEMORY; if ((status = smartcard_unpack_state_call(smartcard, irp->input, call))) - WLog_ERR(TAG, "smartcard_unpack_state_call failed with error %lu", status); + WLog_ERR(TAG, "smartcard_unpack_state_call failed with error %ld", status); operation->hContext = smartcard_scard_context_native_from_redir(smartcard, &(call->hContext)); operation->hCard = smartcard_scard_handle_native_from_redir(smartcard, &(call->hCard)); return status; @@ -857,7 +857,7 @@ static LONG smartcard_State_Call(SMARTCARD_DEVICE* smartcard, SMARTCARD_OPERATIO ret.ReturnCode = SCardState(operation->hCard, &ret.dwState, &ret.dwProtocol, (BYTE*) &ret.rgAtr, &ret.cbAtrLen); if ((status = smartcard_pack_state_return(smartcard, irp->output, &ret))) { - WLog_ERR(TAG, "smartcard_pack_state_return failed with error %lu", status); + WLog_ERR(TAG, "smartcard_pack_state_return failed with error %ld", status); return status; } @@ -873,7 +873,7 @@ static LONG smartcard_StatusA_Decode(SMARTCARD_DEVICE* smartcard, SMARTCARD_OPER return STATUS_NO_MEMORY; if ((status = smartcard_unpack_status_call(smartcard, irp->input, call))) - WLog_ERR(TAG, "smartcard_unpack_status_call failed with error %lu", status); + WLog_ERR(TAG, "smartcard_unpack_status_call failed with error %ld", status); smartcard_trace_status_call(smartcard, call, FALSE); operation->hContext = smartcard_scard_context_native_from_redir(smartcard, &(call->hContext)); operation->hCard = smartcard_scard_handle_native_from_redir(smartcard, &(call->hCard)); @@ -904,7 +904,7 @@ static LONG smartcard_StatusA_Call(SMARTCARD_DEVICE* smartcard, SMARTCARD_OPERAT smartcard_trace_status_return(smartcard, &ret, FALSE); if ((status = smartcard_pack_status_return(smartcard, irp->output, &ret))) { - WLog_ERR(TAG, "smartcard_pack_status_return failed with error %lu", status); + WLog_ERR(TAG, "smartcard_pack_status_return failed with error %ld", status); return status; } @@ -923,7 +923,7 @@ static LONG smartcard_StatusW_Decode(SMARTCARD_DEVICE* smartcard, SMARTCARD_OPER return STATUS_NO_MEMORY; if ((status = smartcard_unpack_status_call(smartcard, irp->input, call))) - WLog_ERR(TAG, "smartcard_unpack_status_call failed with error %lu", status); + WLog_ERR(TAG, "smartcard_unpack_status_call failed with error %ld", status); smartcard_trace_status_call(smartcard, call, TRUE); operation->hContext = smartcard_scard_context_native_from_redir(smartcard, &(call->hContext)); operation->hCard = smartcard_scard_handle_native_from_redir(smartcard, &(call->hCard)); @@ -950,7 +950,7 @@ static LONG smartcard_StatusW_Call(SMARTCARD_DEVICE* smartcard, SMARTCARD_OPERAT smartcard_trace_status_return(smartcard, &ret, TRUE); if ((status = smartcard_pack_status_return(smartcard, irp->output, &ret))) { - WLog_ERR(TAG, "smartcard_pack_status_return failed with error %lu", status); + WLog_ERR(TAG, "smartcard_pack_status_return failed with error %ld", status); return status; } @@ -969,7 +969,7 @@ static LONG smartcard_Transmit_Decode(SMARTCARD_DEVICE* smartcard, SMARTCARD_OPE return STATUS_NO_MEMORY; if ((status = smartcard_unpack_transmit_call(smartcard, irp->input, call))) - WLog_ERR(TAG, "smartcard_unpack_transmit_call failed with error %lu", status); + WLog_ERR(TAG, "smartcard_unpack_transmit_call failed with error %ld", status); smartcard_trace_transmit_call(smartcard, call); @@ -1007,7 +1007,7 @@ static LONG smartcard_Transmit_Call(SMARTCARD_DEVICE* smartcard, SMARTCARD_OPERA smartcard_trace_transmit_return(smartcard, &ret); if ((status = smartcard_pack_transmit_return(smartcard, irp->output, &ret))) { - WLog_ERR(TAG, "smartcard_pack_transmit_return failed with error %lu", status); + WLog_ERR(TAG, "smartcard_pack_transmit_return failed with error %ld", status); return status; } @@ -1028,7 +1028,7 @@ static LONG smartcard_Control_Decode(SMARTCARD_DEVICE* smartcard, SMARTCARD_OPER return STATUS_NO_MEMORY; if ((status = smartcard_unpack_control_call(smartcard, irp->input, call))) - WLog_ERR(TAG, "smartcard_unpack_control_call failed with error %lu", status); + WLog_ERR(TAG, "smartcard_unpack_control_call failed with error %ld", status); smartcard_trace_control_call(smartcard, call); operation->hContext = smartcard_scard_context_native_from_redir(smartcard, &(call->hContext)); operation->hCard = smartcard_scard_handle_native_from_redir(smartcard, &(call->hCard)); @@ -1053,7 +1053,7 @@ static LONG smartcard_Control_Call(SMARTCARD_DEVICE* smartcard, SMARTCARD_OPERAT smartcard_trace_control_return(smartcard, &ret); if ((status = smartcard_pack_control_return(smartcard, irp->output, &ret))) { - WLog_ERR(TAG, "smartcard_pack_control_return failed with error %lu", status); + WLog_ERR(TAG, "smartcard_pack_control_return failed with error %ld", status); return status; } @@ -1072,7 +1072,7 @@ static LONG smartcard_GetAttrib_Decode(SMARTCARD_DEVICE* smartcard, SMARTCARD_OP return STATUS_NO_MEMORY; if ((status = smartcard_unpack_get_attrib_call(smartcard, irp->input, call))) - WLog_ERR(TAG, "smartcard_unpack_get_attrib_call failed with error %lu", status); + WLog_ERR(TAG, "smartcard_unpack_get_attrib_call failed with error %ld", status); smartcard_trace_get_attrib_call(smartcard, call); operation->hContext = smartcard_scard_context_native_from_redir(smartcard, &(call->hContext)); operation->hCard = smartcard_scard_handle_native_from_redir(smartcard, &(call->hCard)); @@ -1123,7 +1123,7 @@ static LONG smartcard_GetAttrib_Call(SMARTCARD_DEVICE* smartcard, SMARTCARD_OPER if ((status = smartcard_pack_get_attrib_return(smartcard, irp->output, &ret))) { - WLog_ERR(TAG, "smartcard_pack_get_attrib_return failed with error %lu", status); + WLog_ERR(TAG, "smartcard_pack_get_attrib_return failed with error %ld", status); return status; } @@ -1169,7 +1169,7 @@ static LONG smartcard_LocateCardsByATRA_Decode(SMARTCARD_DEVICE* smartcard, SMAR return STATUS_NO_MEMORY; if ((status = smartcard_unpack_locate_cards_by_atr_a_call(smartcard, irp->input, call))) - WLog_ERR(TAG, "smartcard_unpack_locate_cards_by_atr_a_call failed with error %lu", status); + WLog_ERR(TAG, "smartcard_unpack_locate_cards_by_atr_a_call failed with error %ld", status); smartcard_trace_locate_cards_by_atr_a_call(smartcard, call); operation->hContext = smartcard_scard_context_native_from_redir(smartcard, &(call->hContext)); return status; @@ -1249,7 +1249,7 @@ static LONG smartcard_LocateCardsByATRA_Call(SMARTCARD_DEVICE* smartcard, SMARTC smartcard_trace_get_status_change_return(smartcard, &ret, FALSE); if ((status = smartcard_pack_get_status_change_return(smartcard, irp->output, &ret))) { - WLog_ERR(TAG, "smartcard_pack_get_status_change_return failed with error %lu", status); + WLog_ERR(TAG, "smartcard_pack_get_status_change_return failed with error %ld", status); return status; } @@ -1287,8 +1287,8 @@ LONG smartcard_irp_device_control_decode(SMARTCARD_DEVICE* smartcard, SMARTCARD_ if (Stream_GetRemainingLength(irp->input) < 32) { - WLog_WARN(TAG, "Device Control Request is too short: %d", - (int) Stream_GetRemainingLength(irp->input)); + WLog_WARN(TAG, "Device Control Request is too short: %lu", + (unsigned long) Stream_GetRemainingLength(irp->input)); return SCARD_F_INTERNAL_ERROR; } @@ -1300,8 +1300,9 @@ LONG smartcard_irp_device_control_decode(SMARTCARD_DEVICE* smartcard, SMARTCARD_ if (Stream_Length(irp->input) != (Stream_GetPosition(irp->input) + inputBufferLength)) { - WLog_WARN(TAG, "InputBufferLength mismatch: Actual: %d Expected: %d", - Stream_Length(irp->input), Stream_GetPosition(irp->input) + inputBufferLength); + WLog_WARN(TAG, "InputBufferLength mismatch: Actual: %lu Expected: %lu", + (unsigned long) Stream_Length(irp->input), + (unsigned long) (Stream_GetPosition(irp->input) + inputBufferLength)); return SCARD_F_INTERNAL_ERROR; } @@ -1314,13 +1315,13 @@ LONG smartcard_irp_device_control_decode(SMARTCARD_DEVICE* smartcard, SMARTCARD_ { if ((status = smartcard_unpack_common_type_header(smartcard, irp->input))) { - WLog_ERR(TAG, "smartcard_unpack_common_type_header failed with error %lu", status); + WLog_ERR(TAG, "smartcard_unpack_common_type_header failed with error %ld", status); return SCARD_F_INTERNAL_ERROR; } if ((status = smartcard_unpack_private_type_header(smartcard, irp->input))) { - WLog_ERR(TAG, "smartcard_unpack_common_type_header failed with error %lu", status); + WLog_ERR(TAG, "smartcard_unpack_common_type_header failed with error %ld", status); return SCARD_F_INTERNAL_ERROR; } } @@ -1945,12 +1946,12 @@ LONG smartcard_irp_device_control_call(SMARTCARD_DEVICE* smartcard, SMARTCARD_OP Stream_Write_UINT32(irp->output, outputBufferLength); /* OutputBufferLength (4 bytes) */ if ((result = smartcard_pack_common_type_header(smartcard, irp->output))) /* CommonTypeHeader (8 bytes) */ { - WLog_ERR(TAG, "smartcard_pack_common_type_header failed with error %lu", result); + WLog_ERR(TAG, "smartcard_pack_common_type_header failed with error %ld", result); return result; } if ((result = smartcard_pack_private_type_header(smartcard, irp->output, objectBufferLength))) /* PrivateTypeHeader (8 bytes) */ { - WLog_ERR(TAG, "smartcard_pack_private_type_header failed with error %lu", result); + WLog_ERR(TAG, "smartcard_pack_private_type_header failed with error %ld", result); return result; } diff --git a/channels/smartcard/client/smartcard_pack.c b/channels/smartcard/client/smartcard_pack.c index 766648b..7e968ea 100644 --- a/channels/smartcard/client/smartcard_pack.c +++ b/channels/smartcard/client/smartcard_pack.c @@ -109,8 +109,8 @@ LONG smartcard_unpack_private_type_header(SMARTCARD_DEVICE* smartcard, wStream* if (objectBufferLength != Stream_GetRemainingLength(s)) { - WLog_WARN(TAG, "PrivateTypeHeader ObjectBufferLength mismatch: Actual: %d, Expected: %d", - (int) objectBufferLength, Stream_GetRemainingLength(s)); + WLog_WARN(TAG, "PrivateTypeHeader ObjectBufferLength mismatch: Actual: %lu, Expected: %lu", + (unsigned long) objectBufferLength, (unsigned long)Stream_GetRemainingLength(s)); return STATUS_INVALID_PARAMETER; } @@ -166,8 +166,8 @@ SCARDCONTEXT smartcard_scard_context_native_from_redir(SMARTCARD_DEVICE* smartca if ((context->cbContext != sizeof(ULONG_PTR)) && (context->cbContext != 0)) { - WLog_WARN(TAG, "REDIR_SCARDCONTEXT does not match native size: Actual: %d, Expected: %d", - context->cbContext, sizeof(ULONG_PTR)); + WLog_WARN(TAG, "REDIR_SCARDCONTEXT does not match native size: Actual: %lu, Expected: %lu", + (unsigned long) context->cbContext, (unsigned long) sizeof(ULONG_PTR)); return 0; } @@ -192,8 +192,8 @@ SCARDHANDLE smartcard_scard_handle_native_from_redir(SMARTCARD_DEVICE* smartcard if (handle->cbHandle != sizeof(ULONG_PTR)) { - WLog_WARN(TAG, "REDIR_SCARDHANDLE does not match native size: Actual: %d, Expected: %d", - handle->cbHandle, sizeof(ULONG_PTR)); + WLog_WARN(TAG, "REDIR_SCARDHANDLE does not match native size: Actual: %lu, Expected: %lu", + (unsigned long) handle->cbHandle, (unsigned long) sizeof(ULONG_PTR)); return 0; } @@ -446,12 +446,12 @@ LONG smartcard_pack_establish_context_return(SMARTCARD_DEVICE* smartcard, wStrea if ((status = smartcard_pack_redir_scard_context(smartcard, s, &(ret->hContext)))) { - WLog_ERR(TAG, "smartcard_pack_redir_scard_context failed with error %lu", status); + WLog_ERR(TAG, "smartcard_pack_redir_scard_context failed with error %ld", status); return status; } if ((status = smartcard_pack_redir_scard_context_ref(smartcard, s, &(ret->hContext)))) - WLog_ERR(TAG, "smartcard_pack_redir_scard_context_ref failed with error %lu", status); + WLog_ERR(TAG, "smartcard_pack_redir_scard_context_ref failed with error %ld", status); return status; } @@ -490,12 +490,12 @@ LONG smartcard_unpack_context_call(SMARTCARD_DEVICE* smartcard, wStream* s, Cont if ((status = smartcard_unpack_redir_scard_context(smartcard, s, &(call->hContext)))) { - WLog_ERR(TAG, "smartcard_unpack_redir_scard_context failed with error %lu", status); + WLog_ERR(TAG, "smartcard_unpack_redir_scard_context failed with error %ld", status); return status; } if ((status = smartcard_unpack_redir_scard_context_ref(smartcard, s, &(call->hContext)))) - WLog_ERR(TAG, "smartcard_unpack_redir_scard_context_ref failed with error %lu", status); + WLog_ERR(TAG, "smartcard_unpack_redir_scard_context_ref failed with error %ld", status); return status; } @@ -548,7 +548,7 @@ LONG smartcard_unpack_list_readers_call(SMARTCARD_DEVICE* smartcard, wStream* s, if ((status = smartcard_unpack_redir_scard_context(smartcard, s, &(call->hContext)))) { - WLog_ERR(TAG, "smartcard_unpack_redir_scard_context failed with error %lu", status); + WLog_ERR(TAG, "smartcard_unpack_redir_scard_context failed with error %ld", status); return status; } @@ -566,7 +566,7 @@ LONG smartcard_unpack_list_readers_call(SMARTCARD_DEVICE* smartcard, wStream* s, if ((status = smartcard_unpack_redir_scard_context_ref(smartcard, s, &(call->hContext)))) { - WLog_ERR(TAG, "smartcard_unpack_redir_scard_context_ref failed with error %lu", status); + WLog_ERR(TAG, "smartcard_unpack_redir_scard_context_ref failed with error %ld", status); return status; } @@ -622,7 +622,7 @@ void smartcard_trace_list_readers_call(SMARTCARD_DEVICE* smartcard, ListReaders_ if (unicode) ConvertFromUnicode(CP_UTF8, 0, (WCHAR*) call->mszGroups, call->cBytes / 2, &mszGroupsA, 0, NULL, NULL); - WLog_DBG(TAG, "ListReaders%S_Call {", unicode ? "W" : "A"); + WLog_DBG(TAG, "ListReaders%s_Call {", unicode ? "W" : "A"); pb = (BYTE*) &(call->hContext.pbContext); @@ -676,7 +676,7 @@ LONG smartcard_pack_list_readers_return(SMARTCARD_DEVICE* smartcard, wStream* s, if ((error = smartcard_pack_write_size_align(smartcard, s, ret->cBytes, 4))) { - WLog_ERR(TAG, "smartcard_pack_write_size_align failed with error %lu", error); + WLog_ERR(TAG, "smartcard_pack_write_size_align failed with error %ld", error); return error; } } @@ -752,7 +752,7 @@ LONG smartcard_unpack_connect_common(SMARTCARD_DEVICE* smartcard, wStream* s, Co if ((status = smartcard_unpack_redir_scard_context(smartcard, s, &(common->hContext)))) { - WLog_ERR(TAG, "smartcard_unpack_redir_scard_context failed with error %lu", status); + WLog_ERR(TAG, "smartcard_unpack_redir_scard_context failed with error %ld", status); return status; } @@ -780,7 +780,7 @@ LONG smartcard_unpack_connect_a_call(SMARTCARD_DEVICE* smartcard, wStream* s, Co if ((status = smartcard_unpack_connect_common(smartcard, s, &(call->Common)))) { - WLog_ERR(TAG, "smartcard_unpack_connect_common failed with error %lu", status); + WLog_ERR(TAG, "smartcard_unpack_connect_common failed with error %ld", status); return status; } @@ -803,7 +803,7 @@ LONG smartcard_unpack_connect_a_call(SMARTCARD_DEVICE* smartcard, wStream* s, Co call->szReader[count] = '\0'; if ((status = smartcard_unpack_redir_scard_context_ref(smartcard, s, &(call->Common.hContext)))) - WLog_ERR(TAG, "smartcard_unpack_redir_scard_context_ref failed with error %lu", status); + WLog_ERR(TAG, "smartcard_unpack_redir_scard_context_ref failed with error %ld", status); return status; } @@ -855,7 +855,7 @@ LONG smartcard_unpack_connect_w_call(SMARTCARD_DEVICE* smartcard, wStream* s, Co if ((status = smartcard_unpack_connect_common(smartcard, s, &(call->Common)))) { - WLog_ERR(TAG, "smartcard_unpack_connect_common failed with error %lu", status); + WLog_ERR(TAG, "smartcard_unpack_connect_common failed with error %ld", status); return status; } @@ -878,7 +878,7 @@ LONG smartcard_unpack_connect_w_call(SMARTCARD_DEVICE* smartcard, wStream* s, Co call->szReader[count] = '\0'; if ((status = smartcard_unpack_redir_scard_context_ref(smartcard, s, &(call->Common.hContext)))) - WLog_ERR(TAG, "smartcard_unpack_redir_scard_context_ref failed with error %lu", status); + WLog_ERR(TAG, "smartcard_unpack_redir_scard_context_ref failed with error %ld", status); return status; } @@ -923,13 +923,13 @@ LONG smartcard_pack_connect_return(SMARTCARD_DEVICE* smartcard, wStream* s, Conn if ((status = smartcard_pack_redir_scard_context(smartcard, s, &(ret->hContext)))) { - WLog_ERR(TAG, "smartcard_pack_redir_scard_context failed with error %lu", status); + WLog_ERR(TAG, "smartcard_pack_redir_scard_context failed with error %ld", status); return status; } if ((status = smartcard_pack_redir_scard_handle(smartcard, s, &(ret->hCard)))) { - WLog_ERR(TAG, "smartcard_pack_redir_scard_handle failed with error %lu", status); + WLog_ERR(TAG, "smartcard_pack_redir_scard_handle failed with error %ld", status); return status; } @@ -937,12 +937,12 @@ LONG smartcard_pack_connect_return(SMARTCARD_DEVICE* smartcard, wStream* s, Conn if ((status = smartcard_pack_redir_scard_context_ref(smartcard, s, &(ret->hContext)))) { - WLog_ERR(TAG, "smartcard_pack_redir_scard_context_ref failed with error %lu", status); + WLog_ERR(TAG, "smartcard_pack_redir_scard_context_ref failed with error %ld", status); return status; } if ((status = smartcard_pack_redir_scard_handle_ref(smartcard, s, &(ret->hCard)))) - WLog_ERR(TAG, "smartcard_pack_redir_scard_handle_ref failed with error %lu", status); + WLog_ERR(TAG, "smartcard_pack_redir_scard_handle_ref failed with error %ld", status); return status; } @@ -997,13 +997,13 @@ LONG smartcard_unpack_reconnect_call(SMARTCARD_DEVICE* smartcard, wStream* s, Re if ((status = smartcard_unpack_redir_scard_context(smartcard, s, &(call->hContext)))) { - WLog_ERR(TAG, "smartcard_unpack_redir_scard_context failed with error %lu", status); + WLog_ERR(TAG, "smartcard_unpack_redir_scard_context failed with error %ld", status); return status; } if ((status = smartcard_unpack_redir_scard_handle(smartcard, s, &(call->hCard)))) { - WLog_ERR(TAG, "smartcard_unpack_redir_scard_handle failed with error %lu", status); + WLog_ERR(TAG, "smartcard_unpack_redir_scard_handle failed with error %ld", status); return status; } @@ -1021,12 +1021,12 @@ LONG smartcard_unpack_reconnect_call(SMARTCARD_DEVICE* smartcard, wStream* s, Re if ((status = smartcard_unpack_redir_scard_context_ref(smartcard, s, &(call->hContext)))) { - WLog_ERR(TAG, "smartcard_unpack_redir_scard_context_ref failed with error %lu", status); + WLog_ERR(TAG, "smartcard_unpack_redir_scard_context_ref failed with error %ld", status); return status; } if ((status = smartcard_unpack_redir_scard_handle_ref(smartcard, s, &(call->hCard)))) - WLog_ERR(TAG, "smartcard_unpack_redir_scard_handle_ref failed with error %lu", status); + WLog_ERR(TAG, "smartcard_unpack_redir_scard_handle_ref failed with error %ld", status); return status; } @@ -1103,13 +1103,13 @@ LONG smartcard_unpack_hcard_and_disposition_call(SMARTCARD_DEVICE* smartcard, wS if ((status = smartcard_unpack_redir_scard_context(smartcard, s, &(call->hContext)))) { - WLog_ERR(TAG, "smartcard_unpack_redir_scard_context failed with error %lu", status); + WLog_ERR(TAG, "smartcard_unpack_redir_scard_context failed with error %ld", status); return status; } if ((status = smartcard_unpack_redir_scard_handle(smartcard, s, &(call->hCard)))) { - WLog_ERR(TAG, "smartcard_unpack_redir_scard_handle failed with error %lu", status); + WLog_ERR(TAG, "smartcard_unpack_redir_scard_handle failed with error %ld", status); return status; } @@ -1124,12 +1124,12 @@ LONG smartcard_unpack_hcard_and_disposition_call(SMARTCARD_DEVICE* smartcard, wS if ((status = smartcard_unpack_redir_scard_context_ref(smartcard, s, &(call->hContext)))) { - WLog_ERR(TAG, "smartcard_unpack_redir_scard_context_ref failed with error %lu", status); + WLog_ERR(TAG, "smartcard_unpack_redir_scard_context_ref failed with error %ld", status); return status; } if ((status = smartcard_unpack_redir_scard_handle_ref(smartcard, s, &(call->hCard)))) - WLog_ERR(TAG, "smartcard_unpack_redir_scard_handle_ref failed with error %lu", status); + WLog_ERR(TAG, "smartcard_unpack_redir_scard_handle_ref failed with error %ld", status); return status; } @@ -1190,7 +1190,7 @@ LONG smartcard_unpack_get_status_change_a_call(SMARTCARD_DEVICE* smartcard, wStr if ((status = smartcard_unpack_redir_scard_context(smartcard, s, &(call->hContext)))) { - WLog_ERR(TAG, "smartcard_unpack_redir_scard_context failed with error %lu", status); + WLog_ERR(TAG, "smartcard_unpack_redir_scard_context failed with error %ld", status); return status; } @@ -1207,7 +1207,7 @@ LONG smartcard_unpack_get_status_change_a_call(SMARTCARD_DEVICE* smartcard, wStr if ((status = smartcard_unpack_redir_scard_context_ref(smartcard, s, &(call->hContext)))) { - WLog_ERR(TAG, "smartcard_unpack_redir_scard_context_ref failed with error %lu", status); + WLog_ERR(TAG, "smartcard_unpack_redir_scard_context_ref failed with error %ld", status); return status; } @@ -1368,7 +1368,7 @@ LONG smartcard_unpack_get_status_change_w_call(SMARTCARD_DEVICE* smartcard, wStr if ((status = smartcard_unpack_redir_scard_context(smartcard, s, &(call->hContext)))) { - WLog_ERR(TAG, "smartcard_unpack_redir_scard_context failed with error %lu", status); + WLog_ERR(TAG, "smartcard_unpack_redir_scard_context failed with error %ld", status); return status; } @@ -1385,7 +1385,7 @@ LONG smartcard_unpack_get_status_change_w_call(SMARTCARD_DEVICE* smartcard, wStr if ((status = smartcard_unpack_redir_scard_context_ref(smartcard, s, &(call->hContext)))) { - WLog_ERR(TAG, "smartcard_unpack_redir_scard_context_ref failed with error %lu", status); + WLog_ERR(TAG, "smartcard_unpack_redir_scard_context_ref failed with error %ld", status); return status; } @@ -1601,13 +1601,13 @@ LONG smartcard_unpack_state_call(SMARTCARD_DEVICE* smartcard, wStream* s, State_ if ((status = smartcard_unpack_redir_scard_context(smartcard, s, &(call->hContext)))) { - WLog_ERR(TAG, "smartcard_unpack_redir_scard_context failed with error %lu", status); + WLog_ERR(TAG, "smartcard_unpack_redir_scard_context failed with error %ld", status); return status; } if ((status = smartcard_unpack_redir_scard_handle(smartcard, s, &(call->hCard)))) { - WLog_ERR(TAG, "smartcard_unpack_redir_scard_handle failed with error %lu", status); + WLog_ERR(TAG, "smartcard_unpack_redir_scard_handle failed with error %ld", status); return status; } @@ -1623,12 +1623,12 @@ LONG smartcard_unpack_state_call(SMARTCARD_DEVICE* smartcard, wStream* s, State_ if ((status = smartcard_unpack_redir_scard_context_ref(smartcard, s, &(call->hContext)))) { - WLog_ERR(TAG, "smartcard_unpack_redir_scard_context_ref failed with error %lu", status); + WLog_ERR(TAG, "smartcard_unpack_redir_scard_context_ref failed with error %ld", status); return status; } if ((status = smartcard_unpack_redir_scard_handle_ref(smartcard, s, &(call->hCard)))) - WLog_ERR(TAG, "smartcard_unpack_redir_scard_handle_ref failed with error %lu", status); + WLog_ERR(TAG, "smartcard_unpack_redir_scard_handle_ref failed with error %ld", status); return status; } @@ -1645,7 +1645,7 @@ LONG smartcard_pack_state_return(SMARTCARD_DEVICE* smartcard, wStream* s, State_ Stream_Write(s, ret->rgAtr, ret->cbAtrLen); /* rgAtr */ if ((status = smartcard_pack_write_size_align(smartcard, s, ret->cbAtrLen, 4))) - WLog_ERR(TAG, "smartcard_pack_write_size_align failed with error %lu", status); + WLog_ERR(TAG, "smartcard_pack_write_size_align failed with error %ld", status); return status; } @@ -1656,13 +1656,13 @@ LONG smartcard_unpack_status_call(SMARTCARD_DEVICE* smartcard, wStream* s, Statu if ((status = smartcard_unpack_redir_scard_context(smartcard, s, &(call->hContext)))) { - WLog_ERR(TAG, "smartcard_unpack_redir_scard_context failed with error %lu", status); + WLog_ERR(TAG, "smartcard_unpack_redir_scard_context failed with error %ld", status); return status; } if ((status = smartcard_unpack_redir_scard_handle(smartcard, s, &(call->hCard)))) { - WLog_ERR(TAG, "smartcard_unpack_redir_scard_handle failed with error %lu", status); + WLog_ERR(TAG, "smartcard_unpack_redir_scard_handle failed with error %ld", status); return status; } @@ -1679,12 +1679,12 @@ LONG smartcard_unpack_status_call(SMARTCARD_DEVICE* smartcard, wStream* s, Statu if ((status = smartcard_unpack_redir_scard_context_ref(smartcard, s, &(call->hContext)))) { - WLog_ERR(TAG, "smartcard_unpack_redir_scard_context_ref failed with error %lu", status); + WLog_ERR(TAG, "smartcard_unpack_redir_scard_context_ref failed with error %ld", status); return status; } if ((status = smartcard_unpack_redir_scard_handle_ref(smartcard, s, &(call->hCard)))) - WLog_ERR(TAG, "smartcard_unpack_redir_scard_handle_ref failed with error %lu", status); + WLog_ERR(TAG, "smartcard_unpack_redir_scard_handle_ref failed with error %ld", status); return status; } @@ -1754,7 +1754,7 @@ LONG smartcard_pack_status_return(SMARTCARD_DEVICE* smartcard, wStream* s, Statu Stream_Zero(s, ret->cBytes); if ((status = smartcard_pack_write_size_align(smartcard, s, ret->cBytes, 4))) - WLog_ERR(TAG, "smartcard_pack_write_size_align failed with error %lu", status); + WLog_ERR(TAG, "smartcard_pack_write_size_align failed with error %ld", status); return status; } @@ -1834,13 +1834,13 @@ LONG smartcard_unpack_get_attrib_call(SMARTCARD_DEVICE* smartcard, wStream* s, G if ((status = smartcard_unpack_redir_scard_context(smartcard, s, &(call->hContext)))) { - WLog_ERR(TAG, "smartcard_unpack_redir_scard_context failed with error %lu", status); + WLog_ERR(TAG, "smartcard_unpack_redir_scard_context failed with error %ld", status); return status; } if ((status = smartcard_unpack_redir_scard_handle(smartcard, s, &(call->hCard)))) { - WLog_ERR(TAG, "smartcard_unpack_redir_scard_handle failed with error %lu", status); + WLog_ERR(TAG, "smartcard_unpack_redir_scard_handle failed with error %ld", status); return status; } @@ -1857,12 +1857,12 @@ LONG smartcard_unpack_get_attrib_call(SMARTCARD_DEVICE* smartcard, wStream* s, G if ((status = smartcard_unpack_redir_scard_context_ref(smartcard, s, &(call->hContext)))) { - WLog_ERR(TAG, "smartcard_unpack_redir_scard_context_ref failed with error %lu", status); + WLog_ERR(TAG, "smartcard_unpack_redir_scard_context_ref failed with error %ld", status); return status; } if ((status = smartcard_unpack_redir_scard_handle_ref(smartcard, s, &(call->hCard)))) - WLog_ERR(TAG, "smartcard_unpack_redir_scard_handle_ref failed with error %lu", status); + WLog_ERR(TAG, "smartcard_unpack_redir_scard_handle_ref failed with error %ld", status); return status; } @@ -1927,7 +1927,7 @@ LONG smartcard_pack_get_attrib_return(SMARTCARD_DEVICE* smartcard, wStream* s, G Stream_Write(s, ret->pbAttr, ret->cbAttrLen); /* pbAttr */ if ((status = smartcard_pack_write_size_align(smartcard, s, ret->cbAttrLen, 4))) - WLog_ERR(TAG, "smartcard_pack_write_size_align failed with error %lu", status); + WLog_ERR(TAG, "smartcard_pack_write_size_align failed with error %ld", status); return status; } @@ -1968,13 +1968,13 @@ LONG smartcard_unpack_control_call(SMARTCARD_DEVICE* smartcard, wStream* s, Cont if ((status = smartcard_unpack_redir_scard_context(smartcard, s, &(call->hContext)))) { - WLog_ERR(TAG, "smartcard_unpack_redir_scard_context failed with error %lu", status); + WLog_ERR(TAG, "smartcard_unpack_redir_scard_context failed with error %ld", status); return status; } if ((status = smartcard_unpack_redir_scard_handle(smartcard, s, &(call->hCard)))) { - WLog_ERR(TAG, "smartcard_unpack_redir_scard_handle failed with error %lu", status); + WLog_ERR(TAG, "smartcard_unpack_redir_scard_handle failed with error %ld", status); return status; } @@ -1993,13 +1993,13 @@ LONG smartcard_unpack_control_call(SMARTCARD_DEVICE* smartcard, wStream* s, Cont if ((status = smartcard_unpack_redir_scard_context_ref(smartcard, s, &(call->hContext)))) { - WLog_ERR(TAG, "smartcard_unpack_redir_scard_context_ref failed with error %lu", status); + WLog_ERR(TAG, "smartcard_unpack_redir_scard_context_ref failed with error %ld", status); return status; } if ((status = smartcard_unpack_redir_scard_handle_ref(smartcard, s, &(call->hCard)))) { - WLog_ERR(TAG, "smartcard_unpack_redir_scard_context_ref failed with error %lu", status); + WLog_ERR(TAG, "smartcard_unpack_redir_scard_context_ref failed with error %ld", status); return status; } @@ -2107,7 +2107,7 @@ LONG smartcard_pack_control_return(SMARTCARD_DEVICE* smartcard, wStream* s, Cont Stream_Write(s, ret->pvOutBuffer, ret->cbOutBufferSize); /* pvOutBuffer */ if ((error = smartcard_pack_write_size_align(smartcard, s, ret->cbOutBufferSize, 4))) { - WLog_ERR(TAG, "smartcard_pack_write_size_align failed with error %lu", error); + WLog_ERR(TAG, "smartcard_pack_write_size_align failed with error %ld", error); return error; } } @@ -2158,13 +2158,13 @@ LONG smartcard_unpack_transmit_call(SMARTCARD_DEVICE* smartcard, wStream* s, Tra if ((status = smartcard_unpack_redir_scard_context(smartcard, s, &(call->hContext)))) { - WLog_ERR(TAG, "smartcard_unpack_redir_scard_context failed with error %lu", status); + WLog_ERR(TAG, "smartcard_unpack_redir_scard_context failed with error %ld", status); return status; } if ((status = smartcard_unpack_redir_scard_handle(smartcard, s, &(call->hCard)))) { - WLog_ERR(TAG, "smartcard_unpack_redir_scard_handle failed with error %lu", status); + WLog_ERR(TAG, "smartcard_unpack_redir_scard_handle failed with error %ld", status); return status; } @@ -2200,13 +2200,13 @@ LONG smartcard_unpack_transmit_call(SMARTCARD_DEVICE* smartcard, wStream* s, Tra if ((status = smartcard_unpack_redir_scard_context_ref(smartcard, s, &(call->hContext)))) { - WLog_ERR(TAG, "smartcard_unpack_redir_scard_context_ref failed with error %lu", status); + WLog_ERR(TAG, "smartcard_unpack_redir_scard_context_ref failed with error %ld", status); return status; } if ((status = smartcard_unpack_redir_scard_handle_ref(smartcard, s, &(call->hCard)))) { - WLog_ERR(TAG, "smartcard_unpack_redir_scard_handle_ref failed with error %lu", status); + WLog_ERR(TAG, "smartcard_unpack_redir_scard_handle_ref failed with error %ld", status); return status; } @@ -2528,7 +2528,7 @@ LONG smartcard_pack_transmit_return(SMARTCARD_DEVICE* smartcard, wStream* s, Tra Stream_Write(s, pbExtraBytes, cbExtraBytes); if ((error = smartcard_pack_write_size_align(smartcard, s, cbExtraBytes, 4))) { - WLog_ERR(TAG, "smartcard_pack_write_size_align failed with error %lu!", error); + WLog_ERR(TAG, "smartcard_pack_write_size_align failed with error %ld!", error); return error; } } @@ -2546,7 +2546,7 @@ LONG smartcard_pack_transmit_return(SMARTCARD_DEVICE* smartcard, wStream* s, Tra Stream_Write(s, ret->pbRecvBuffer, ret->cbRecvLength); if ((error = smartcard_pack_write_size_align(smartcard, s, ret->cbRecvLength, 4))) { - WLog_ERR(TAG, "smartcard_pack_write_size_align failed with error %lu!", error); + WLog_ERR(TAG, "smartcard_pack_write_size_align failed with error %ld!", error); return error; } } @@ -2619,7 +2619,7 @@ LONG smartcard_unpack_locate_cards_by_atr_a_call(SMARTCARD_DEVICE* smartcard, wS if ((status = smartcard_unpack_redir_scard_context(smartcard, s, &(call->hContext)))) { - WLog_ERR(TAG, "smartcard_unpack_redir_scard_context failed with error %lu", status); + WLog_ERR(TAG, "smartcard_unpack_redir_scard_context failed with error %ld", status); return status; } @@ -2637,7 +2637,7 @@ LONG smartcard_unpack_locate_cards_by_atr_a_call(SMARTCARD_DEVICE* smartcard, wS if ((status = smartcard_unpack_redir_scard_context_ref(smartcard, s, &(call->hContext)))) { - WLog_ERR(TAG, "smartcard_unpack_redir_scard_context_ref failed with error %lu", status); + WLog_ERR(TAG, "smartcard_unpack_redir_scard_context_ref failed with error %ld", status); return status; } diff --git a/channels/tsmf/client/tsmf_ifman.c b/channels/tsmf/client/tsmf_ifman.c index 4c9da74..c118e3f 100644 --- a/channels/tsmf/client/tsmf_ifman.c +++ b/channels/tsmf/client/tsmf_ifman.c @@ -580,7 +580,7 @@ UINT tsmf_ifman_on_sample(TSMF_IFMAN* ifman) UINT64 ThrottleDuration; UINT32 SampleExtensions; UINT32 cbData; - UINT error; + UINT error; if (Stream_GetRemainingLength(ifman->input) < 60) return ERROR_INVALID_DATA; @@ -628,7 +628,7 @@ UINT tsmf_ifman_on_sample(TSMF_IFMAN* ifman) if ((error = tsmf_presentation_sync(presentation))) { - WLog_ERR(TAG, "tsmf_presentation_sync failed with error %lu", error); + WLog_ERR(TAG, "tsmf_presentation_sync failed with error %u", error); return error; } ifman->output_pending = TRUE; diff --git a/channels/tsmf/client/tsmf_media.c b/channels/tsmf/client/tsmf_media.c index c4c6c29..7c53def 100644 --- a/channels/tsmf/client/tsmf_media.c +++ b/channels/tsmf/client/tsmf_media.c @@ -729,7 +729,7 @@ static void* tsmf_stream_ack_func(void* arg) if (ev == WAIT_FAILED) { error = GetLastError(); - WLog_ERR(TAG, "WaitForMultipleObjects failed with error %lu!", error); + WLog_ERR(TAG, "WaitForMultipleObjects failed with error %u!", error); break; } @@ -839,7 +839,7 @@ static void* tsmf_stream_playback_func(void* arg) if (status == WAIT_FAILED) { error = GetLastError(); - WLog_ERR(TAG, "WaitForMultipleObjects failed with error %lu!", error); + WLog_ERR(TAG, "WaitForMultipleObjects failed with error %u!", error); break; } @@ -848,7 +848,7 @@ static void* tsmf_stream_playback_func(void* arg) if (status == WAIT_FAILED) { error = GetLastError(); - WLog_ERR(TAG, "WaitForSingleObject failed with error %lu!", error); + WLog_ERR(TAG, "WaitForSingleObject failed with error %u!", error); break; } @@ -1056,7 +1056,7 @@ UINT tsmf_presentation_sync(TSMF_PRESENTATION* presentation) if (WaitForSingleObject(stream->ready, 500) == WAIT_FAILED) { error = GetLastError(); - WLog_ERR(TAG, "WaitForSingleObject failed with error %lu!", error); + WLog_ERR(TAG, "WaitForSingleObject failed with error %u!", error); return error; } } @@ -1252,13 +1252,13 @@ error_add: SetEvent(stream->stopEvent); if (WaitForSingleObject(stream->ack_thread, INFINITE) == WAIT_FAILED) - WLog_ERR(TAG, "WaitForSingleObject failed with error %lu!", GetLastError()); + WLog_ERR(TAG, "WaitForSingleObject failed with error %lu!", (unsigned long) GetLastError()); error_ack_thread: SetEvent(stream->stopEvent); if (WaitForSingleObject(stream->play_thread, INFINITE) == WAIT_FAILED) - WLog_ERR(TAG, "WaitForSingleObject failed with error %lu!", GetLastError()); + WLog_ERR(TAG, "WaitForSingleObject failed with error %lu!", (unsigned long) GetLastError()); error_play_thread: Queue_Free(stream->sample_ack_list); @@ -1392,7 +1392,7 @@ void _tsmf_stream_free(TSMF_STREAM* stream) { if (WaitForSingleObject(stream->play_thread, INFINITE) == WAIT_FAILED) { - WLog_ERR(TAG, "WaitForSingleObject failed with error %lu!", GetLastError()); + WLog_ERR(TAG, "WaitForSingleObject failed with error %lu!", (unsigned long) GetLastError()); return; } @@ -1404,7 +1404,7 @@ void _tsmf_stream_free(TSMF_STREAM* stream) { if (WaitForSingleObject(stream->ack_thread, INFINITE) == WAIT_FAILED) { - WLog_ERR(TAG, "WaitForSingleObject failed with error %lu!", GetLastError()); + WLog_ERR(TAG, "WaitForSingleObject failed with error %lu!", (unsigned long) GetLastError()); return; } diff --git a/channels/urbdrc/client/urbdrc_main.c b/channels/urbdrc/client/urbdrc_main.c index 42699bd..41f1720 100644 --- a/channels/urbdrc/client/urbdrc_main.c +++ b/channels/urbdrc/client/urbdrc_main.c @@ -568,7 +568,7 @@ static void *urbdrc_search_usb_device(void *arg) { if (status == WAIT_FAILED) { error = GetLastError(); - WLog_ERR(TAG, "WaitForSingleObject failed with error %lu!", error); + WLog_ERR(TAG, "WaitForSingleObject failed with error %lu!", (unsigned long) error); return 0; } @@ -815,7 +815,7 @@ static void* urbdrc_search_usb_device(void* arg) if (status == WAIT_FAILED) { error = GetLastError(); - WLog_ERR(TAG, "WaitForMultipleObjects failed with error %lu!", error); + WLog_ERR(TAG, "WaitForMultipleObjects failed with error %lu!", (unsigned long) error); goto out; } @@ -824,7 +824,7 @@ static void* urbdrc_search_usb_device(void* arg) if (status == WAIT_FAILED) { error = GetLastError(); - WLog_ERR(TAG, "WaitForSingleObject failed with error %lu!", error); + WLog_ERR(TAG, "WaitForSingleObject failed with error %lu!", (unsigned long) error); goto out; } @@ -839,7 +839,7 @@ static void* urbdrc_search_usb_device(void* arg) if (status == WAIT_FAILED) { error = GetLastError(); - WLog_ERR(TAG, "WaitForSingleObject failed with error %lu!", error); + WLog_ERR(TAG, "WaitForSingleObject failed with error %lu!", (unsigned long) error); goto out; } @@ -923,7 +923,7 @@ static void* urbdrc_search_usb_device(void* arg) if (status == WAIT_FAILED) { error = GetLastError(); - WLog_ERR(TAG, "WaitForMultipleObjects failed with error %lu!", error); + WLog_ERR(TAG, "WaitForMultipleObjects failed with error %lu!", (unsigned long) error); goto out; } @@ -932,7 +932,7 @@ static void* urbdrc_search_usb_device(void* arg) if (status == WAIT_FAILED) { error = GetLastError(); - WLog_ERR(TAG, "WaitForMultipleObjects failed with error %lu!", error); + WLog_ERR(TAG, "WaitForMultipleObjects failed with error %lu!", (unsigned long) error); goto out; } @@ -995,7 +995,7 @@ static void* urbdrc_search_usb_device(void* arg) if (status == WAIT_FAILED) { error = GetLastError(); - WLog_ERR(TAG, "WaitForMultipleObjects failed with error %lu!", error); + WLog_ERR(TAG, "WaitForMultipleObjects failed with error %lu!", (unsigned long) error); goto out; } @@ -1004,7 +1004,7 @@ static void* urbdrc_search_usb_device(void* arg) if (status == WAIT_FAILED) { error = GetLastError(); - WLog_ERR(TAG, "WaitForSingleObject failed with error %lu!", error); + WLog_ERR(TAG, "WaitForSingleObject failed with error %lu!", (unsigned long) error); goto out; } diff --git a/client/Android/android_freerdp.c b/client/Android/android_freerdp.c index fccdc00..bb37f18 100644 --- a/client/Android/android_freerdp.c +++ b/client/Android/android_freerdp.c @@ -588,8 +588,8 @@ static int android_freerdp_run(freerdp* instance) if ((status == WAIT_FAILED)) { - WLog_ERR(TAG, "WaitForMultipleObjects failed with %lu [%08lX]", - status, GetLastError()); + WLog_ERR(TAG, "WaitForMultipleObjects failed with %u [%08lX]", + (unsigned)status, GetLastError()); break; } diff --git a/client/Sample/freerdp.c b/client/Sample/freerdp.c index 3c5bc38..2c5f006 100644 --- a/client/Sample/freerdp.c +++ b/client/Sample/freerdp.c @@ -139,7 +139,7 @@ static void* tf_client_thread_proc(freerdp* instance) if (status == WAIT_FAILED) { WLog_ERR(TAG, "%s: WaitForMultipleObjects failed with %lu", __FUNCTION__, - status); + (unsigned long) status); break; } diff --git a/client/X11/xf_cliprdr.c b/client/X11/xf_cliprdr.c index 80b54c5..d62ddd4 100644 --- a/client/X11/xf_cliprdr.c +++ b/client/X11/xf_cliprdr.c @@ -427,8 +427,8 @@ static CLIPRDR_FORMAT* xf_cliprdr_get_raw_server_formats(xfClipboard* clipboard, else { WLog_ERR(TAG, - "failed to retrieve raw format list: data=%p, length=%lu, format=%d, type=%d (expected=%d)", - data, length, format, type, clipboard->raw_format_list_atom); + "failed to retrieve raw format list: data=%p, length=%lu, format=%d, type=%lu (expected=%lu)", + data, length, format, (unsigned long) type, (unsigned long) clipboard->raw_format_list_atom); } if (data) @@ -457,13 +457,13 @@ static CLIPRDR_FORMAT* xf_cliprdr_get_formats_from_targets( { if (!data) { - WLog_ERR(TAG, "XGetWindowProperty set length = %d but data is NULL", length); + WLog_ERR(TAG, "XGetWindowProperty set length = %lu but data is NULL", length); goto out; } if (!(formats = (CLIPRDR_FORMAT*) calloc(length, sizeof(CLIPRDR_FORMAT)))) { - WLog_ERR(TAG, "failed to allocate %d CLIPRDR_FORMAT structs", length); + WLog_ERR(TAG, "failed to allocate %lu CLIPRDR_FORMAT structs", length); goto out; } } diff --git a/client/X11/xf_window.c b/client/X11/xf_window.c index 2a73244..1c7a51a 100644 --- a/client/X11/xf_window.c +++ b/client/X11/xf_window.c @@ -238,7 +238,7 @@ BOOL xf_GetWindowProperty(xfContext* xfc, Window window, Atom property, if (actual_type == None) { - WLog_INFO(TAG, "Property %lu does not exist", property); + WLog_INFO(TAG, "Property %lu does not exist", (unsigned long) property); return FALSE; } diff --git a/client/common/cmdline.c b/client/common/cmdline.c index 3490d37..59359c8 100644 --- a/client/common/cmdline.c +++ b/client/common/cmdline.c @@ -2309,13 +2309,13 @@ int freerdp_client_settings_parse_command_line_arguments(rdpSettings* settings, CommandLineSwitchCase(arg, "max-loop-time") { settings->MaxTimeInCheckLoop = atoi(arg->Value); - if (settings->MaxTimeInCheckLoop < 0) + if ((long) settings->MaxTimeInCheckLoop < 0) { WLog_ERR(TAG, "invalid max loop time: %s", arg->Value); return COMMAND_LINE_ERROR; } - if (settings->MaxTimeInCheckLoop == 0) + if ((long) settings->MaxTimeInCheckLoop <= 0) { settings->MaxTimeInCheckLoop = 10 * 60 * 60 * 1000; /* 10 hours can be considered as infinite */ } diff --git a/libfreerdp/codec/h264.c b/libfreerdp/codec/h264.c index d439ff5..26b592d 100644 --- a/libfreerdp/codec/h264.c +++ b/libfreerdp/codec/h264.c @@ -952,7 +952,7 @@ static int openh264_compress(H264_CONTEXT* h264, BYTE** ppDstData, if (status < 0) { - WLog_ERR(TAG, "Failed to get OpenH264 default parameters (status=%ld)", status); + WLog_ERR(TAG, "Failed to get OpenH264 default parameters (status=%d)", status); return status; } @@ -998,7 +998,7 @@ static int openh264_compress(H264_CONTEXT* h264, BYTE** ppDstData, if (status < 0) { - WLog_ERR(TAG, "Failed to initialize OpenH264 encoder (status=%ld)", status); + WLog_ERR(TAG, "Failed to initialize OpenH264 encoder (status=%d)", status); return status; } @@ -1008,7 +1008,7 @@ static int openh264_compress(H264_CONTEXT* h264, BYTE** ppDstData, if (status < 0) { - WLog_ERR(TAG, "Failed to get initial OpenH264 encoder parameters (status=%ld)", + WLog_ERR(TAG, "Failed to get initial OpenH264 encoder parameters (status=%d)", status); return status; } @@ -1028,7 +1028,7 @@ static int openh264_compress(H264_CONTEXT* h264, BYTE** ppDstData, if (status < 0) { - WLog_ERR(TAG, "Failed to set encoder bitrate (status=%ld)", status); + WLog_ERR(TAG, "Failed to set encoder bitrate (status=%d)", status); return status; } } @@ -1041,7 +1041,7 @@ static int openh264_compress(H264_CONTEXT* h264, BYTE** ppDstData, if (status < 0) { - WLog_ERR(TAG, "Failed to set encoder framerate (status=%ld)", status); + WLog_ERR(TAG, "Failed to set encoder framerate (status=%d)", status); return status; } } @@ -1058,7 +1058,7 @@ static int openh264_compress(H264_CONTEXT* h264, BYTE** ppDstData, if (status < 0) { - WLog_ERR(TAG, "Failed to set encoder parameters (status=%ld)", status); + WLog_ERR(TAG, "Failed to set encoder parameters (status=%d)", status); return status; } } @@ -1082,7 +1082,7 @@ static int openh264_compress(H264_CONTEXT* h264, BYTE** ppDstData, if (status < 0) { - WLog_ERR(TAG, "Failed to encode frame (status=%ld)", status); + WLog_ERR(TAG, "Failed to encode frame (status=%d)", status); return status; } diff --git a/libfreerdp/codec/test/TestFreeRDPCodecClear.c b/libfreerdp/codec/test/TestFreeRDPCodecClear.c index 7ac97e9..ad16033 100644 --- a/libfreerdp/codec/test/TestFreeRDPCodecClear.c +++ b/libfreerdp/codec/test/TestFreeRDPCodecClear.c @@ -51,7 +51,7 @@ static BOOL test_ClearDecompressExample(UINT32 nr, const BYTE* pSrcData, status = clear_decompress(clear, pSrcData, SrcSize, 128, 128, pDstData, PIXEL_FORMAT_XRGB32, 0, 1, 1, 128, 128, NULL); - printf("clear_decompress example %lu status: %d\n", nr, status); + printf("clear_decompress example %lu status: %d\n", (unsigned long) nr, status); fflush(stdout); clear_context_free(clear); #if 0 @@ -60,7 +60,7 @@ static BOOL test_ClearDecompressExample(UINT32 nr, const BYTE* pSrcData, return FALSE; #else - fprintf(stderr, "%s: TODO Test %lu not working!!!\n", __FUNCTION__, nr); + fprintf(stderr, "%s: TODO Test %lu not working!!!\n", __FUNCTION__, (unsigned long) nr); #endif return TRUE; } diff --git a/libfreerdp/core/autodetect.c b/libfreerdp/core/autodetect.c index 178e989..009e615 100644 --- a/libfreerdp/core/autodetect.c +++ b/libfreerdp/core/autodetect.c @@ -377,7 +377,7 @@ static BOOL autodetect_recv_bandwidth_measure_start(rdpRdp* rdp, wStream* s, AUT if (autodetectReqPdu->headerLength != 0x06) return FALSE; - WLog_VRB(AUTODETECT_TAG, "received Bandwidth Measure Start PDU - time=%lu", GetTickCountPrecise()); + WLog_VRB(AUTODETECT_TAG, "received Bandwidth Measure Start PDU - time=%lu", (unsigned long) GetTickCountPrecise()); /* Initialize bandwidth measurement parameters */ rdp->autodetect->bandwidthMeasureStartTime = GetTickCountPrecise(); diff --git a/libfreerdp/core/freerdp.c b/libfreerdp/core/freerdp.c index ee974ac..7ac18ea 100644 --- a/libfreerdp/core/freerdp.c +++ b/libfreerdp/core/freerdp.c @@ -902,7 +902,7 @@ BOOL checkChannelErrorEvent(rdpContext* context) { if (WaitForSingleObject(context->channelErrorEvent, 0) == WAIT_OBJECT_0) { - WLog_ERR(TAG, "%s. Error was %lu", context->errorDescription, + WLog_ERR(TAG, "%s. Error was %u", context->errorDescription, context->channelErrorNum); return FALSE; } diff --git a/libfreerdp/core/info.c b/libfreerdp/core/info.c index ee5f65f..88e3c2b 100644 --- a/libfreerdp/core/info.c +++ b/libfreerdp/core/info.c @@ -861,7 +861,7 @@ BOOL rdp_recv_logon_info_v1(rdpRdp* rdp, wStream* s, logon_info *info) { if ((cbDomain % 2) || cbDomain > 52) { - WLog_ERR(TAG, "protocol error: invalid cbDomain value: %lu", cbDomain); + WLog_ERR(TAG, "protocol error: invalid cbDomain value: %lu", (unsigned long) cbDomain); goto fail; } wstr = (WCHAR*) Stream_Pointer(s); @@ -888,7 +888,7 @@ BOOL rdp_recv_logon_info_v1(rdpRdp* rdp, wStream* s, logon_info *info) { if ((cbUserName % 2) || cbUserName > 512) { - WLog_ERR(TAG, "protocol error: invalid cbUserName value: %lu", cbUserName); + WLog_ERR(TAG, "protocol error: invalid cbUserName value: %lu", (unsigned long) cbUserName); goto fail; } wstr = (WCHAR*) Stream_Pointer(s); @@ -951,7 +951,7 @@ BOOL rdp_recv_logon_info_v2(rdpRdp* rdp, wStream* s, logon_info *info) { if ((cbDomain % 2) || cbDomain > 52) { - WLog_ERR(TAG, "protocol error: invalid cbDomain value: %lu", cbDomain); + WLog_ERR(TAG, "protocol error: invalid cbDomain value: %lu", (unsigned long) cbDomain); goto fail; } if (Stream_GetRemainingLength(s) < (size_t) cbDomain) @@ -983,7 +983,7 @@ BOOL rdp_recv_logon_info_v2(rdpRdp* rdp, wStream* s, logon_info *info) { if ((cbUserName % 2) || cbUserName < 2 || cbUserName > 512) { - WLog_ERR(TAG, "protocol error: invalid cbUserName value: %lu", cbUserName); + WLog_ERR(TAG, "protocol error: invalid cbUserName value: %lu", (unsigned long) cbUserName); goto fail; } if (Stream_GetRemainingLength(s) < (size_t) cbUserName) diff --git a/libfreerdp/core/redirection.c b/libfreerdp/core/redirection.c index 0922902..d0ab3bd 100644 --- a/libfreerdp/core/redirection.c +++ b/libfreerdp/core/redirection.c @@ -91,13 +91,13 @@ static BOOL rdp_redirection_read_unicode_string(wStream* s, char** str, size_t m if ((length % 2) || length < 2 || length > maxLength) { - WLog_ERR(TAG, "rdp_redirection_read_string failure: invalid unicode string length: %lu", length); + WLog_ERR(TAG, "rdp_redirection_read_string failure: invalid unicode string length: %lu", (unsigned long) length); return FALSE; } if (Stream_GetRemainingLength(s) < length) { - WLog_ERR(TAG, "rdp_redirection_read_string failure: insufficient stream length (%lu bytes required)", length); + WLog_ERR(TAG, "rdp_redirection_read_string failure: insufficient stream length (%lu bytes required)", (unsigned long) length); return FALSE; } diff --git a/libfreerdp/core/tcp.c b/libfreerdp/core/tcp.c index 12a33cf..a6feb56 100644 --- a/libfreerdp/core/tcp.c +++ b/libfreerdp/core/tcp.c @@ -770,7 +770,7 @@ static BOOL freerdp_tcp_connect_timeout(rdpContext* context, int sockfd, status = WSAEventSelect(sockfd, handles[count++], FD_READ | FD_WRITE | FD_CONNECT | FD_CLOSE); if (status < 0) { - WLog_ERR(TAG, "WSAEventSelect failed with %lX", WSAGetLastError()); + WLog_ERR(TAG, "WSAEventSelect failed with %d", WSAGetLastError()); return FALSE; } @@ -811,7 +811,7 @@ static BOOL freerdp_tcp_connect_timeout(rdpContext* context, int sockfd, if (status < 0) { - WLog_ERR(TAG, "WSAEventSelect failed with %lX", WSAGetLastError()); + WLog_ERR(TAG, "WSAEventSelect failed with %d", WSAGetLastError()); return FALSE; } diff --git a/libfreerdp/crypto/tls.c b/libfreerdp/crypto/tls.c index d833109..8929ef5 100644 --- a/libfreerdp/crypto/tls.c +++ b/libfreerdp/crypto/tls.c @@ -1354,7 +1354,7 @@ int tls_verify_certificate(rdpTls* tls, CryptoCert cert, char* hostname, if (!certificate_get_stored_data(tls->certificate_store, certificate_data, &old_subject, &old_issuer, &old_fingerprint)) - WLog_WARN(TAG, "Failed to get certificate entry for %s:hu", + WLog_WARN(TAG, "Failed to get certificate entry for %s:%d", hostname, port); if (instance->VerifyChangedCertificate) diff --git a/libfreerdp/primitives/test/TestPrimitivesAndOr.c b/libfreerdp/primitives/test/TestPrimitivesAndOr.c index 5e51c57..52a1e9d 100644 --- a/libfreerdp/primitives/test/TestPrimitivesAndOr.c +++ b/libfreerdp/primitives/test/TestPrimitivesAndOr.c @@ -37,8 +37,15 @@ static BOOL test_and_32u_impl(const char* name, __andC_32u_t fkt, { if (dst[i] != (src[i] & val)) { - printf("AND %s FAIL[%d] 0x%08x&0x%08x=0x%08x, got 0x%08x\n", - name, i, src[i], val, src[i] & val, dst[i]); + + printf("AND %s FAIL[%lu] 0x%08lx&0x%08lx=0x%08lx, got 0x%08lx\n", + name, + (unsigned long) i, + (unsigned long) src[i], + (unsigned long) val, + (unsigned long) (src[i] & val), + (unsigned long) dst[i]); + return FALSE; } } diff --git a/libfreerdp/primitives/test/TestPrimitivesYUV.c b/libfreerdp/primitives/test/TestPrimitivesYUV.c index c7af894..1cd3571 100644 --- a/libfreerdp/primitives/test/TestPrimitivesYUV.c +++ b/libfreerdp/primitives/test/TestPrimitivesYUV.c @@ -19,13 +19,11 @@ static BOOL similar(const BYTE* src, const BYTE* dst, size_t size) for (x = 0; x < size; x++) { - volatile double val1 = (double)src[x]; - volatile double val2 = (double)dst[x]; - volatile double diff = val1 - val2; + int diff = src[x] - dst[x]; if (abs(diff) > 2) { - fprintf(stderr, "%lu %02X : %02X diff=%lf\n", (unsigned long)x, val1, val2, diff); + fprintf(stderr, "%lu %02X : %02X diff=%d\n", (unsigned long)x, src[x], dst[x], abs(diff)); return FALSE; } } @@ -145,7 +143,8 @@ static BOOL TestPrimitiveYUVCombine(void) awidth = roi.width + 16 - roi.width % 16; aheight = roi.height + 16 - roi.height % 16; fprintf(stderr, "Running YUVCombine on frame size %lux%lu [%lux%lu]\n", - roi.width, roi.height, awidth, aheight); + (unsigned long) roi.width, (unsigned long) roi.height, + (unsigned long) awidth, (unsigned long) aheight); if (!prims || !prims->YUV420CombineToYUV444) goto fail; @@ -333,7 +332,7 @@ static BOOL TestPrimitiveYUV(BOOL use444) } fprintf(stderr, "Running AVC%s on frame size %lux%lu\n", use444 ? "444" : "420", - roi.width, roi.height); + (unsigned long) roi.width, (unsigned long) roi.height); /* Test RGB to YUV444 conversion and vice versa */ if (!(rgb = set_padding(size * sizeof(UINT32), padding))) diff --git a/server/Sample/sfreerdp.c b/server/Sample/sfreerdp.c index ccad376..0ddd666 100644 --- a/server/Sample/sfreerdp.c +++ b/server/Sample/sfreerdp.c @@ -510,7 +510,7 @@ static void* tf_debug_channel_thread_func(void* arg) } Stream_SetPosition(s, BytesReturned); - WLog_DBG(TAG, "got %lu bytes", BytesReturned); + WLog_DBG(TAG, "got %lu bytes", (unsigned long) BytesReturned); } Stream_Free(s, TRUE); diff --git a/server/shadow/shadow_client.c b/server/shadow/shadow_client.c index 2a330f7..0133f21 100644 --- a/server/shadow/shadow_client.c +++ b/server/shadow/shadow_client.c @@ -60,7 +60,7 @@ static INLINE BOOL shadow_client_rdpgfx_new_surface(rdpShadowClient* client) if (error) { - WLog_ERR(TAG, "CreateSurface failed with error %lu", error); + WLog_ERR(TAG, "CreateSurface failed with error %u", error); return FALSE; } @@ -68,7 +68,7 @@ static INLINE BOOL shadow_client_rdpgfx_new_surface(rdpShadowClient* client) if (error) { - WLog_ERR(TAG, "MapSurfaceToOutput failed with error %lu", error); + WLog_ERR(TAG, "MapSurfaceToOutput failed with error %u", error); return FALSE; } @@ -85,7 +85,7 @@ static INLINE BOOL shadow_client_rdpgfx_release_surface(rdpShadowClient* client) if (error) { - WLog_ERR(TAG, "DeleteSurface failed with error %lu", error); + WLog_ERR(TAG, "DeleteSurface failed with error %u", error); return FALSE; } @@ -106,7 +106,7 @@ static INLINE BOOL shadow_client_rdpgfx_reset_graphic(rdpShadowClient* client) if (error) { - WLog_ERR(TAG, "ResetGraphics failed with error %lu", error); + WLog_ERR(TAG, "ResetGraphics failed with error %u", error); return FALSE; } @@ -766,7 +766,7 @@ static BOOL shadow_client_send_surface_gfx(rdpShadowClient* client, if (error) { - WLog_ERR(TAG, "SurfaceFrameCommand failed with error %lu", error); + WLog_ERR(TAG, "SurfaceFrameCommand failed with error %u", error); return FALSE; } } diff --git a/winpr/libwinpr/interlocked/test/TestInterlockedAccess.c b/winpr/libwinpr/interlocked/test/TestInterlockedAccess.c index 1641b14..17e72ab 100644 --- a/winpr/libwinpr/interlocked/test/TestInterlockedAccess.c +++ b/winpr/libwinpr/interlocked/test/TestInterlockedAccess.c @@ -30,7 +30,7 @@ int TestInterlockedAccess(int argc, char* argv[]) if (*Addend != 10) { - printf("InterlockedIncrement failure: Actual: %d, Expected: %d\n", (int) *Addend, 10); + printf("InterlockedIncrement failure: Actual: %ld, Expected: 10\n", (long) *Addend); return -1; } @@ -41,7 +41,7 @@ int TestInterlockedAccess(int argc, char* argv[]) if (*Addend != 0) { - printf("InterlockedDecrement failure: Actual: %d, Expected: %d\n", (int) *Addend, 0); + printf("InterlockedDecrement failure: Actual: %ld, Expected: 0\n", (long) *Addend); return -1; } @@ -61,13 +61,13 @@ int TestInterlockedAccess(int argc, char* argv[]) if (oldValue != 0xAA) { - printf("InterlockedExchange failure: Actual: 0x%08X, Expected: 0x%08X\n", (int) oldValue, 0xAA); + printf("InterlockedExchange failure: Actual: 0x%08lX, Expected: 0xAA\n", (long) oldValue); return -1; } if (*Target != 0xFF) { - printf("InterlockedExchange failure: Actual: 0x%08X, Expected: 0x%08X\n", (int) *Target, 0xFF); + printf("InterlockedExchange failure: Actual: 0x%08lX, Expected: 0xFF\n", (long) *Target); return -1; } @@ -79,13 +79,13 @@ int TestInterlockedAccess(int argc, char* argv[]) if (oldValue != 25) { - printf("InterlockedExchangeAdd failure: Actual: %d, Expected: %d\n", (int) oldValue, 25); + printf("InterlockedExchangeAdd failure: Actual: %ld, Expected: 25\n", (long) oldValue); return -1; } if (*Addend != 125) { - printf("InterlockedExchangeAdd failure: Actual: %d, Expected: %d\n", (int) *Addend, 125); + printf("InterlockedExchangeAdd failure: Actual: %ld, Expected: 125\n", (long) *Addend); return -1; } @@ -104,13 +104,13 @@ int TestInterlockedAccess(int argc, char* argv[]) if (oldValue != 0xAABBCCDD) { - printf("InterlockedCompareExchange failure: Actual: 0x%08X, Expected: 0x%08X\n", (int) oldValue, 0xAABBCCDD); + printf("InterlockedCompareExchange failure: Actual: 0x%08lX, Expected: 0xAABBCCDD\n", (long) oldValue); return -1; } if (*Destination != 0xCCDDEEFF) { - printf("InterlockedCompareExchange failure: Actual: 0x%08X, Expected: 0x%08X\n", (int) *Destination, 0xCCDDEEFF); + printf("InterlockedCompareExchange failure: Actual: 0x%08lX, Expected: 0xCCDDEEFF\n", (long) *Destination); return -1; } @@ -122,13 +122,13 @@ int TestInterlockedAccess(int argc, char* argv[]) if (oldValue != 0xAABBCCDD) { - printf("InterlockedCompareExchange failure: Actual: 0x%08X, Expected: 0x%08X\n", (int) oldValue, 0xAABBCCDD); + printf("InterlockedCompareExchange failure: Actual: 0x%08lX, Expected: 0xAABBCCDD\n", (long) oldValue); return -1; } if (*Destination != 0xAABBCCDD) { - printf("InterlockedCompareExchange failure: Actual: 0x%08X, Expected: 0x%08X\n", (int) *Destination, 0xAABBCCDD); + printf("InterlockedCompareExchange failure: Actual: 0x%08lX, Expected: 0xAABBCCDD\n", (long) *Destination); return -1; } @@ -147,13 +147,13 @@ int TestInterlockedAccess(int argc, char* argv[]) if (oldValue64 != 0x66778899AABBCCDD) { - printf("InterlockedCompareExchange failure: Actual: %lld, Expected: %lld\n", oldValue64, (LONGLONG) 0x66778899AABBCCDD); + printf("InterlockedCompareExchange failure: Actual: 0x%016llX, Expected: 0x66778899AABBCCDD\n", (long long) oldValue64); return -1; } if (*Destination64 != 0x8899AABBCCDDEEFF) { - printf("InterlockedCompareExchange failure: Actual: %lld, Expected: %lld\n", *Destination64, (LONGLONG) 0x8899AABBCCDDEEFF); + printf("InterlockedCompareExchange failure: Actual: 0x%016llX, Expected: 0x8899AABBCCDDEEFF\n", (long long) *Destination64); return -1; } @@ -165,13 +165,13 @@ int TestInterlockedAccess(int argc, char* argv[]) if (oldValue64 != 0x66778899AABBCCDD) { - printf("InterlockedCompareExchange failure: Actual: %lld, Expected: %lld\n", oldValue64, (LONGLONG) 0x66778899AABBCCDD); + printf("InterlockedCompareExchange failure: Actual: 0x%016llX, Expected: 0x66778899AABBCCDD\n", (long long) oldValue64); return -1; } if (*Destination64 != 0x66778899AABBCCDD) { - printf("InterlockedCompareExchange failure: Actual: %lld, Expected: %lld\n", *Destination64, (LONGLONG) 0x66778899AABBCCDD); + printf("InterlockedCompareExchange failure: Actual: 0x%016llX, Expected: 0x66778899AABBCCDD\n", (long long) *Destination64); return -1; } diff --git a/winpr/libwinpr/synch/semaphore.c b/winpr/libwinpr/synch/semaphore.c index ba7bb27..78398c4 100644 --- a/winpr/libwinpr/synch/semaphore.c +++ b/winpr/libwinpr/synch/semaphore.c @@ -236,7 +236,7 @@ BOOL ReleaseSemaphore(HANDLE hSemaphore, LONG lReleaseCount, LPLONG lpPreviousCo return TRUE; } - WLog_ERR(TAG, "calling %s on a handle that is not a semaphore"); + WLog_ERR(TAG, "calling %s on a handle that is not a semaphore", __FUNCTION__); return FALSE; } diff --git a/winpr/libwinpr/utils/debug.c b/winpr/libwinpr/utils/debug.c index 91f1843..847e533 100644 --- a/winpr/libwinpr/utils/debug.c +++ b/winpr/libwinpr/utils/debug.c @@ -424,7 +424,7 @@ char** winpr_backtrace_symbols(void* buffer, size_t* used) if (SymGetLineFromAddr64(process, address, &displacement, line)) { - sprintf_s(vlines[i], line_len, "%08lX: %s in %s:%lu", symbol->Address, symbol->Name, line->FileName, line->LineNumber); + sprintf_s(vlines[i], line_len, "%08lX: %s in %s:%lu", symbol->Address, symbol->Name, line->FileName, (unsigned long) line->LineNumber); } else sprintf_s(vlines[i], line_len, "%08lX: %s", symbol->Address, symbol->Name); diff --git a/winpr/libwinpr/utils/test/TestWLog.c b/winpr/libwinpr/utils/test/TestWLog.c index 54b2ce4..2757bb1 100644 --- a/winpr/libwinpr/utils/test/TestWLog.c +++ b/winpr/libwinpr/utils/test/TestWLog.c @@ -12,13 +12,14 @@ int TestWLog(int argc, char* argv[]) wLog* logB; wLogLayout* layout; wLogAppender* appender; - char* tmp_path; - char* wlog_file; + char* tmp_path = NULL; + char* wlog_file = NULL; + int result = 1; if (!(tmp_path = GetKnownPath(KNOWN_PATH_TEMP))) { fprintf(stderr, "Failed to get temporary directory!\n"); - return -1; + goto out; } WLog_Init(); @@ -29,9 +30,9 @@ int TestWLog(int argc, char* argv[]) appender = WLog_GetLogAppender(root); if(!WLog_ConfigureAppender(appender, "outputfilename", "test_w.log")) - return 1; + goto out; if(!WLog_ConfigureAppender(appender, "outputfilepath", tmp_path)) - return 1; + goto out; layout = WLog_GetLogLayout(root); WLog_Layout_SetPrefixFormat(root, layout, "[%lv:%mn] [%fl|%fn|%ln] - "); @@ -59,10 +60,12 @@ int TestWLog(int argc, char* argv[]) WLog_Uninit(); if ((wlog_file = GetCombinedPath(tmp_path, "test_w.log"))) - { DeleteFileA(wlog_file); - free(wlog_file); - } - return 0; + result = 0; +out: + free(wlog_file); + free(tmp_path); + + return result; } -- 2.7.4