diff --git a/channels/ainput/server/ainput_main.c b/channels/ainput/server/ainput_main.c index 81a9b5113..7cbbdb29e 100644 --- a/channels/ainput/server/ainput_main.c +++ b/channels/ainput/server/ainput_main.c @@ -351,7 +351,7 @@ static UINT ainput_server_close(ainput_server_context* context) if (!ainput->externalThread && ainput->thread) { - SetEvent(ainput->stopEvent); + (void)SetEvent(ainput->stopEvent); if (WaitForSingleObject(ainput->thread, INFINITE) == WAIT_FAILED) { diff --git a/channels/audin/client/alsa/audin_alsa.c b/channels/audin/client/alsa/audin_alsa.c index adf3ddbc8..e82662451 100644 --- a/channels/audin/client/alsa/audin_alsa.c +++ b/channels/audin/client/alsa/audin_alsa.c @@ -322,7 +322,7 @@ static UINT audin_alsa_close(IAudinDevice* device) if (alsa->stopEvent) { - SetEvent(alsa->stopEvent); + (void)SetEvent(alsa->stopEvent); if (WaitForSingleObject(alsa->thread, INFINITE) == WAIT_FAILED) { diff --git a/channels/audin/client/oss/audin_oss.c b/channels/audin/client/oss/audin_oss.c index ca14dd593..b9db46a88 100644 --- a/channels/audin/client/oss/audin_oss.c +++ b/channels/audin/client/oss/audin_oss.c @@ -332,7 +332,7 @@ static UINT audin_oss_close(IAudinDevice* device) if (oss->stopEvent != NULL) { - SetEvent(oss->stopEvent); + (void)SetEvent(oss->stopEvent); if (WaitForSingleObject(oss->thread, INFINITE) == WAIT_FAILED) { diff --git a/channels/audin/client/sndio/audin_sndio.c b/channels/audin/client/sndio/audin_sndio.c index f7c6a8a39..291b16d20 100644 --- a/channels/audin/client/sndio/audin_sndio.c +++ b/channels/audin/client/sndio/audin_sndio.c @@ -227,7 +227,7 @@ static UINT audin_sndio_close(IAudinDevice* device) if (sndio->stopEvent != NULL) { - SetEvent(sndio->stopEvent); + (void)SetEvent(sndio->stopEvent); if (WaitForSingleObject(sndio->thread, INFINITE) == WAIT_FAILED) { diff --git a/channels/audin/client/winmm/audin_winmm.c b/channels/audin/client/winmm/audin_winmm.c index aefef8433..c94e41a34 100644 --- a/channels/audin/client/winmm/audin_winmm.c +++ b/channels/audin/client/winmm/audin_winmm.c @@ -293,7 +293,7 @@ static UINT audin_winmm_close(IAudinDevice* device) if (!winmm) return ERROR_INVALID_PARAMETER; - SetEvent(winmm->stopEvent); + (void)SetEvent(winmm->stopEvent); status = WaitForSingleObject(winmm->thread, INFINITE); if (status == WAIT_FAILED) diff --git a/channels/audin/server/audin.c b/channels/audin/server/audin.c index ac1e53626..a898fff1c 100644 --- a/channels/audin/server/audin.c +++ b/channels/audin/server/audin.c @@ -516,7 +516,7 @@ static BOOL audin_server_close(audin_server_context* context) if (audin->thread) { - SetEvent(audin->stopEvent); + (void)SetEvent(audin->stopEvent); if (WaitForSingleObject(audin->thread, INFINITE) == WAIT_FAILED) { diff --git a/channels/cliprdr/server/cliprdr_main.c b/channels/cliprdr/server/cliprdr_main.c index c8f961d52..a14b5a45f 100644 --- a/channels/cliprdr/server/cliprdr_main.c +++ b/channels/cliprdr/server/cliprdr_main.c @@ -1420,7 +1420,7 @@ static UINT cliprdr_server_stop(CliprdrServerContext* context) if (cliprdr->StopEvent) { - SetEvent(cliprdr->StopEvent); + (void)SetEvent(cliprdr->StopEvent); if (WaitForSingleObject(cliprdr->Thread, INFINITE) == WAIT_FAILED) { diff --git a/channels/disp/server/disp_main.c b/channels/disp/server/disp_main.c index b7bbde684..49920e682 100644 --- a/channels/disp/server/disp_main.c +++ b/channels/disp/server/disp_main.c @@ -550,7 +550,7 @@ static UINT disp_server_close(DispServerContext* context) if (priv->thread) { - SetEvent(priv->stopEvent); + (void)SetEvent(priv->stopEvent); if (WaitForSingleObject(priv->thread, INFINITE) == WAIT_FAILED) { diff --git a/channels/drdynvc/server/drdynvc_main.c b/channels/drdynvc/server/drdynvc_main.c index d8cbf2462..e6c951549 100644 --- a/channels/drdynvc/server/drdynvc_main.c +++ b/channels/drdynvc/server/drdynvc_main.c @@ -154,7 +154,7 @@ static UINT drdynvc_server_start(DrdynvcServerContext* context) static UINT drdynvc_server_stop(DrdynvcServerContext* context) { UINT error = 0; - SetEvent(context->priv->StopEvent); + (void)SetEvent(context->priv->StopEvent); if (WaitForSingleObject(context->priv->Thread, INFINITE) == WAIT_FAILED) { diff --git a/channels/echo/server/echo_main.c b/channels/echo/server/echo_main.c index c31c55eae..1eb416cda 100644 --- a/channels/echo/server/echo_main.c +++ b/channels/echo/server/echo_main.c @@ -328,7 +328,7 @@ static UINT echo_server_close(echo_server_context* context) if (echo->thread) { - SetEvent(echo->stopEvent); + (void)SetEvent(echo->stopEvent); if (WaitForSingleObject(echo->thread, INFINITE) == WAIT_FAILED) { diff --git a/channels/encomsp/server/encomsp_main.c b/channels/encomsp/server/encomsp_main.c index a7bf075b4..009e2d9e0 100644 --- a/channels/encomsp/server/encomsp_main.c +++ b/channels/encomsp/server/encomsp_main.c @@ -327,7 +327,7 @@ static UINT encomsp_server_start(EncomspServerContext* context) static UINT encomsp_server_stop(EncomspServerContext* context) { UINT error = CHANNEL_RC_OK; - SetEvent(context->priv->StopEvent); + (void)SetEvent(context->priv->StopEvent); if (WaitForSingleObject(context->priv->Thread, INFINITE) == WAIT_FAILED) { diff --git a/channels/gfxredir/server/gfxredir_main.c b/channels/gfxredir/server/gfxredir_main.c index f661a9c12..3b398a167 100644 --- a/channels/gfxredir/server/gfxredir_main.c +++ b/channels/gfxredir/server/gfxredir_main.c @@ -705,7 +705,7 @@ static UINT gfxredir_server_close(GfxRedirServerContext* context) if (priv->thread) { - SetEvent(priv->stopEvent); + (void)SetEvent(priv->stopEvent); if (WaitForSingleObject(priv->thread, INFINITE) == WAIT_FAILED) { diff --git a/channels/location/server/location_main.c b/channels/location/server/location_main.c index 549cfc019..3f2e06d26 100644 --- a/channels/location/server/location_main.c +++ b/channels/location/server/location_main.c @@ -475,7 +475,7 @@ static UINT location_server_close(LocationServerContext* context) if (!location->externalThread && location->thread) { - SetEvent(location->stopEvent); + (void)SetEvent(location->stopEvent); if (WaitForSingleObject(location->thread, INFINITE) == WAIT_FAILED) { diff --git a/channels/printer/client/printer_main.c b/channels/printer/client/printer_main.c index f53a085b4..ec32a3176 100644 --- a/channels/printer/client/printer_main.c +++ b/channels/printer/client/printer_main.c @@ -690,7 +690,7 @@ static UINT printer_irp_request(DEVICE* device, IRP* irp) if (printer_dev->async) { InterlockedPushEntrySList(printer_dev->pIrpList, &(irp->ItemEntry)); - SetEvent(printer_dev->event); + (void)SetEvent(printer_dev->event); } else { @@ -908,7 +908,7 @@ static UINT printer_free(DEVICE* device) if (printer_dev->async) { - SetEvent(printer_dev->stopEvent); + (void)SetEvent(printer_dev->stopEvent); if (WaitForSingleObject(printer_dev->thread, INFINITE) == WAIT_FAILED) { diff --git a/channels/rail/server/rail_main.c b/channels/rail/server/rail_main.c index bc569bba7..fb76e5f44 100644 --- a/channels/rail/server/rail_main.c +++ b/channels/rail/server/rail_main.c @@ -1473,7 +1473,7 @@ static BOOL rail_server_stop(RailServerContext* context) if (priv->thread) { - SetEvent(priv->stopEvent); + (void)SetEvent(priv->stopEvent); if (WaitForSingleObject(priv->thread, INFINITE) == WAIT_FAILED) { diff --git a/channels/rdp2tcp/client/rdp2tcp_main.c b/channels/rdp2tcp/client/rdp2tcp_main.c index ae2314636..2a7e724ed 100644 --- a/channels/rdp2tcp/client/rdp2tcp_main.c +++ b/channels/rdp2tcp/client/rdp2tcp_main.c @@ -246,7 +246,7 @@ static void VCAPITYPE VirtualChannelOpenEventEx(LPVOID lpUserParam, DWORD openHa free(pData); break; case CHANNEL_EVENT_WRITE_COMPLETE: - SetEvent(plugin->writeComplete); + (void)SetEvent(plugin->writeComplete); free(pData); break; } diff --git a/channels/rdpdr/client/rdpdr_main.c b/channels/rdpdr/client/rdpdr_main.c index 8acfbf2de..dbfebc343 100644 --- a/channels/rdpdr/client/rdpdr_main.c +++ b/channels/rdpdr/client/rdpdr_main.c @@ -1109,7 +1109,7 @@ static UINT drive_hotplug_thread_terminate(rdpdrPlugin* rdpdr) { #if !defined(_WIN32) if (rdpdr->stopEvent) - SetEvent(rdpdr->stopEvent); + (void)SetEvent(rdpdr->stopEvent); #endif #ifdef __MACOSX__ CFRunLoopStop(rdpdr->runLoop); diff --git a/channels/rdpdr/server/rdpdr_main.c b/channels/rdpdr/server/rdpdr_main.c index 70c13fb1c..6d1c690ba 100644 --- a/channels/rdpdr/server/rdpdr_main.c +++ b/channels/rdpdr/server/rdpdr_main.c @@ -2168,7 +2168,7 @@ static UINT rdpdr_server_stop(RdpdrServerContext* context) if (context->priv->StopEvent) { - SetEvent(context->priv->StopEvent); + (void)SetEvent(context->priv->StopEvent); if (WaitForSingleObject(context->priv->Thread, INFINITE) == WAIT_FAILED) { diff --git a/channels/rdpecam/server/camera_device_enumerator_main.c b/channels/rdpecam/server/camera_device_enumerator_main.c index 195ec8454..89fb75782 100644 --- a/channels/rdpecam/server/camera_device_enumerator_main.c +++ b/channels/rdpecam/server/camera_device_enumerator_main.c @@ -468,7 +468,7 @@ static UINT enumerator_server_close(CamDevEnumServerContext* context) if (!enumerator->externalThread && enumerator->thread) { - SetEvent(enumerator->stopEvent); + (void)SetEvent(enumerator->stopEvent); if (WaitForSingleObject(enumerator->thread, INFINITE) == WAIT_FAILED) { diff --git a/channels/rdpecam/server/camera_device_main.c b/channels/rdpecam/server/camera_device_main.c index 0d3acdd2e..1b1915f97 100644 --- a/channels/rdpecam/server/camera_device_main.c +++ b/channels/rdpecam/server/camera_device_main.c @@ -620,7 +620,7 @@ static UINT device_server_close(CameraDeviceServerContext* context) if (!device->externalThread && device->thread) { - SetEvent(device->stopEvent); + (void)SetEvent(device->stopEvent); if (WaitForSingleObject(device->thread, INFINITE) == WAIT_FAILED) { diff --git a/channels/rdpei/client/rdpei_main.c b/channels/rdpei/client/rdpei_main.c index 78ed5e7fd..c374ce64d 100644 --- a/channels/rdpei/client/rdpei_main.c +++ b/channels/rdpei/client/rdpei_main.c @@ -963,7 +963,7 @@ static UINT rdpei_add_contact(RdpeiClientContext* context, const RDPINPUT_CONTAC contactPoint = &rdpei->contactPoints[contact->contactId]; contactPoint->data = *contact; contactPoint->dirty = TRUE; - SetEvent(rdpei->event); + (void)SetEvent(rdpei->event); LeaveCriticalSection(&rdpei->lock); return CHANNEL_RC_OK; @@ -1175,7 +1175,7 @@ static UINT rdpei_add_pen(RdpeiClientContext* context, INT32 externalId, { contactPoint->data = *contact; contactPoint->dirty = TRUE; - SetEvent(rdpei->event); + (void)SetEvent(rdpei->event); } LeaveCriticalSection(&rdpei->lock); @@ -1442,7 +1442,7 @@ static void terminate_plugin_cb(GENERIC_DYNVC_PLUGIN* base) rdpei->running = FALSE; if (rdpei->event) - SetEvent(rdpei->event); + (void)SetEvent(rdpei->event); if (rdpei->thread) { diff --git a/channels/rdpemsc/server/mouse_cursor_main.c b/channels/rdpemsc/server/mouse_cursor_main.c index 1e5225dfb..8e8aa899a 100644 --- a/channels/rdpemsc/server/mouse_cursor_main.c +++ b/channels/rdpemsc/server/mouse_cursor_main.c @@ -425,7 +425,7 @@ static UINT mouse_cursor_server_close(MouseCursorServerContext* context) if (!mouse_cursor->externalThread && mouse_cursor->thread) { - SetEvent(mouse_cursor->stopEvent); + (void)SetEvent(mouse_cursor->stopEvent); if (WaitForSingleObject(mouse_cursor->thread, INFINITE) == WAIT_FAILED) { diff --git a/channels/rdpgfx/server/rdpgfx_main.c b/channels/rdpgfx/server/rdpgfx_main.c index 3b21d03cb..d9a92499b 100644 --- a/channels/rdpgfx/server/rdpgfx_main.c +++ b/channels/rdpgfx/server/rdpgfx_main.c @@ -1630,7 +1630,7 @@ BOOL rdpgfx_server_close(RdpgfxServerContext* context) if (priv->ownThread && priv->thread) { - SetEvent(priv->stopEvent); + (void)SetEvent(priv->stopEvent); if (WaitForSingleObject(priv->thread, INFINITE) == WAIT_FAILED) { diff --git a/channels/rdpsnd/server/rdpsnd_main.c b/channels/rdpsnd/server/rdpsnd_main.c index 9d3e3e616..d7b498ddd 100644 --- a/channels/rdpsnd/server/rdpsnd_main.c +++ b/channels/rdpsnd/server/rdpsnd_main.c @@ -989,7 +989,7 @@ static UINT rdpsnd_server_stop(RdpsndServerContext* context) { if (context->priv->StopEvent) { - SetEvent(context->priv->StopEvent); + (void)SetEvent(context->priv->StopEvent); if (WaitForSingleObject(context->priv->Thread, INFINITE) == WAIT_FAILED) { diff --git a/channels/remdesk/server/remdesk_main.c b/channels/remdesk/server/remdesk_main.c index 90f7e97ec..a1b24b87a 100644 --- a/channels/remdesk/server/remdesk_main.c +++ b/channels/remdesk/server/remdesk_main.c @@ -685,7 +685,7 @@ static UINT remdesk_server_start(RemdeskServerContext* context) static UINT remdesk_server_stop(RemdeskServerContext* context) { UINT error = 0; - SetEvent(context->priv->StopEvent); + (void)SetEvent(context->priv->StopEvent); if (WaitForSingleObject(context->priv->Thread, INFINITE) == WAIT_FAILED) { diff --git a/channels/telemetry/server/telemetry_main.c b/channels/telemetry/server/telemetry_main.c index 329fd7b55..cf7a2d982 100644 --- a/channels/telemetry/server/telemetry_main.c +++ b/channels/telemetry/server/telemetry_main.c @@ -344,7 +344,7 @@ static UINT telemetry_server_close(TelemetryServerContext* context) if (!telemetry->externalThread && telemetry->thread) { - SetEvent(telemetry->stopEvent); + (void)SetEvent(telemetry->stopEvent); if (WaitForSingleObject(telemetry->thread, INFINITE) == WAIT_FAILED) { diff --git a/channels/tsmf/client/tsmf_media.c b/channels/tsmf/client/tsmf_media.c index 6b4afeaa5..63d409fe5 100644 --- a/channels/tsmf/client/tsmf_media.c +++ b/channels/tsmf/client/tsmf_media.c @@ -1261,13 +1261,13 @@ TSMF_STREAM* tsmf_stream_new(TSMF_PRESENTATION* presentation, UINT32 stream_id, stream->rdpcontext = rdpcontext; return stream; error_add: - SetEvent(stream->stopEvent); + (void)SetEvent(stream->stopEvent); if (WaitForSingleObject(stream->ack_thread, INFINITE) == WAIT_FAILED) WLog_ERR(TAG, "WaitForSingleObject failed with error %" PRIu32 "!", GetLastError()); error_ack_thread: - SetEvent(stream->stopEvent); + (void)SetEvent(stream->stopEvent); if (WaitForSingleObject(stream->play_thread, INFINITE) == WAIT_FAILED) WLog_ERR(TAG, "WaitForSingleObject failed with error %" PRIu32 "!", GetLastError()); @@ -1402,7 +1402,7 @@ void s_tsmf_stream_free(void* obj) return; tsmf_stream_stop(stream); - SetEvent(stream->stopEvent); + (void)SetEvent(stream->stopEvent); if (stream->play_thread) { @@ -1454,7 +1454,7 @@ BOOL tsmf_stream_push_sample(TSMF_STREAM* stream, IWTSVirtualChannelCallback* pC UINT32 extensions, UINT32 data_size, BYTE* data) { TSMF_SAMPLE* sample = NULL; - SetEvent(stream->ready); + (void)SetEvent(stream->ready); if (TERMINATING) return TRUE; diff --git a/client/Android/Studio/freeRDPCore/src/main/cpp/android_cliprdr.c b/client/Android/Studio/freeRDPCore/src/main/cpp/android_cliprdr.c index 9363431b9..0f777df67 100644 --- a/client/Android/Studio/freeRDPCore/src/main/cpp/android_cliprdr.c +++ b/client/Android/Studio/freeRDPCore/src/main/cpp/android_cliprdr.c @@ -397,7 +397,7 @@ android_cliprdr_server_format_data_response(CliprdrClientContext* cliprdr, if (!format) { - SetEvent(afc->clipboardRequestEvent); + (void)SetEvent(afc->clipboardRequestEvent); return ERROR_INTERNAL_ERROR; } @@ -411,7 +411,7 @@ android_cliprdr_server_format_data_response(CliprdrClientContext* cliprdr, if (!ClipboardSetData(afc->clipboard, formatId, formatDataResponse->requestedFormatData, size)) return ERROR_INTERNAL_ERROR; - SetEvent(afc->clipboardRequestEvent); + (void)SetEvent(afc->clipboardRequestEvent); if ((formatId == CF_TEXT) || (formatId == CF_UNICODETEXT)) { diff --git a/client/Mac/Clipboard.m b/client/Mac/Clipboard.m index c14d15cfc..dee7da518 100644 --- a/client/Mac/Clipboard.m +++ b/client/Mac/Clipboard.m @@ -330,7 +330,7 @@ mac_cliprdr_server_format_data_response(CliprdrClientContext *cliprdr, if (formatDataResponse->common.msgFlags & CB_RESPONSE_FAIL) { - SetEvent(mfc->clipboardRequestEvent); + (void)SetEvent(mfc->clipboardRequestEvent); return ERROR_INTERNAL_ERROR; } @@ -342,7 +342,7 @@ mac_cliprdr_server_format_data_response(CliprdrClientContext *cliprdr, if (!format) { - SetEvent(mfc->clipboardRequestEvent); + (void)SetEvent(mfc->clipboardRequestEvent); return ERROR_INTERNAL_ERROR; } @@ -355,7 +355,7 @@ mac_cliprdr_server_format_data_response(CliprdrClientContext *cliprdr, ClipboardSetData(mfc->clipboard, formatId, formatDataResponse->requestedFormatData, size); - SetEvent(mfc->clipboardRequestEvent); + (void)SetEvent(mfc->clipboardRequestEvent); if ((formatId == CF_TEXT) || (formatId == CF_OEMTEXT) || (formatId == CF_UNICODETEXT)) { diff --git a/client/SDL/SDL2/sdl_utils.cpp b/client/SDL/SDL2/sdl_utils.cpp index 65be03dc4..be8c363da 100644 --- a/client/SDL/SDL2/sdl_utils.cpp +++ b/client/SDL/SDL2/sdl_utils.cpp @@ -265,7 +265,7 @@ WinPREvent::~WinPREvent() void WinPREvent::set() { - SetEvent(_handle); + (void)SetEvent(_handle); } void WinPREvent::clear() diff --git a/client/SDL/SDL3/sdl_clip.cpp b/client/SDL/SDL3/sdl_clip.cpp index 5ee1f9150..a0f739a9e 100644 --- a/client/SDL/SDL3/sdl_clip.cpp +++ b/client/SDL/SDL3/sdl_clip.cpp @@ -638,7 +638,7 @@ UINT sdlClip::ReceiveFormatDataResponse(CliprdrClientContext* context, if (!sres) return ERROR_INTERNAL_ERROR; - SetEvent(clipboard->_event); + (void)SetEvent(clipboard->_event); return CHANNEL_RC_OK; } diff --git a/client/SDL/SDL3/sdl_utils.cpp b/client/SDL/SDL3/sdl_utils.cpp index 5aad402a7..f456b6258 100644 --- a/client/SDL/SDL3/sdl_utils.cpp +++ b/client/SDL/SDL3/sdl_utils.cpp @@ -311,7 +311,7 @@ WinPREvent::~WinPREvent() void WinPREvent::set() { - SetEvent(_handle); + (void)SetEvent(_handle); } void WinPREvent::clear() diff --git a/client/common/client_cliprdr_file.c b/client/common/client_cliprdr_file.c index 840694c25..84f3a292d 100644 --- a/client/common/client_cliprdr_file.c +++ b/client/common/client_cliprdr_file.c @@ -1144,7 +1144,7 @@ static DWORD WINAPI cliprdr_file_fuse_thread(LPVOID arg) fuse_opt_add_arg(&args, file->path); file->fuse_sess = fuse_session_new(&args, &cliprdr_file_fuse_oper, sizeof(cliprdr_file_fuse_oper), (void*)file); - SetEvent(file->fuse_start_sync); + (void)SetEvent(file->fuse_start_sync); if (file->fuse_sess != NULL) { @@ -2046,7 +2046,7 @@ void cliprdr_file_session_terminate(CliprdrFileContext* file, BOOL stop_thread) if (stop_thread) { WLog_Print(file->log, WLOG_DEBUG, "Setting FUSE stop event"); - SetEvent(file->fuse_stop_sync); + (void)SetEvent(file->fuse_stop_sync); } #endif /* not elegant but works for umounting FUSE @@ -2055,7 +2055,7 @@ void cliprdr_file_session_terminate(CliprdrFileContext* file, BOOL stop_thread) #if defined(WITH_FUSE) WLog_Print(file->log, WLOG_DEBUG, "Forcing FUSE to check exit flag"); #endif - winpr_PathFileExists(file->path); + (void)winpr_PathFileExists(file->path); } void cliprdr_file_context_free(CliprdrFileContext* file) diff --git a/client/iOS/FreeRDP/ios_cliprdr.m b/client/iOS/FreeRDP/ios_cliprdr.m index 5d666d3de..f79f4525c 100644 --- a/client/iOS/FreeRDP/ios_cliprdr.m +++ b/client/iOS/FreeRDP/ios_cliprdr.m @@ -391,7 +391,7 @@ ios_cliprdr_server_format_data_response(CliprdrClientContext *cliprdr, if (!format) { - SetEvent(afc->clipboardRequestEvent); + (void)SetEvent(afc->clipboardRequestEvent); return ERROR_INTERNAL_ERROR; } @@ -406,7 +406,7 @@ ios_cliprdr_server_format_data_response(CliprdrClientContext *cliprdr, if (!ClipboardSetData(afc->clipboard, formatId, formatDataResponse->requestedFormatData, size)) return ERROR_INTERNAL_ERROR; - SetEvent(afc->clipboardRequestEvent); + (void)SetEvent(afc->clipboardRequestEvent); if ((formatId == CF_TEXT) || (formatId == CF_UNICODETEXT)) { diff --git a/libfreerdp/core/freerdp.c b/libfreerdp/core/freerdp.c index e4b3a364a..18c58323e 100644 --- a/libfreerdp/core/freerdp.c +++ b/libfreerdp/core/freerdp.c @@ -1306,7 +1306,7 @@ void setChannelError(rdpContext* context, UINT errorNum, WINPR_FORMAT_ARG const context->channelErrorNum = errorNum; (void)vsnprintf(context->errorDescription, 499, format, ap); va_end(ap); - SetEvent(context->channelErrorEvent); + (void)SetEvent(context->channelErrorEvent); } const char* freerdp_nego_get_routing_token(rdpContext* context, DWORD* length) diff --git a/libfreerdp/core/gateway/rpc_client.c b/libfreerdp/core/gateway/rpc_client.c index 1ff2e1924..74ce882ec 100644 --- a/libfreerdp/core/gateway/rpc_client.c +++ b/libfreerdp/core/gateway/rpc_client.c @@ -137,7 +137,7 @@ static int rpc_client_receive_pipe_write(RpcClient* client, const BYTE* buffer, status += (int)length; if (ringbuffer_used(&(client->ReceivePipe)) > 0) - SetEvent(client->PipeEvent); + (void)SetEvent(client->PipeEvent); LeaveCriticalSection(&(client->PipeLock)); return status; diff --git a/libfreerdp/core/transport.c b/libfreerdp/core/transport.c index 120c369a3..e60b4ae6a 100644 --- a/libfreerdp/core/transport.c +++ b/libfreerdp/core/transport.c @@ -1462,7 +1462,7 @@ int transport_check_fds(rdpTransport* transport) if (!transport->haveMoreBytesToRead) { transport->haveMoreBytesToRead = TRUE; - SetEvent(transport->rereadEvent); + (void)SetEvent(transport->rereadEvent); } return recv_status; } diff --git a/server/Sample/sfreerdp.c b/server/Sample/sfreerdp.c index c873efcc5..b7d29c905 100644 --- a/server/Sample/sfreerdp.c +++ b/server/Sample/sfreerdp.c @@ -82,7 +82,7 @@ static void test_peer_context_free(freerdp_peer* client, rdpContext* ctx) if (context->debug_channel_thread) { WINPR_ASSERT(context->stopEvent); - SetEvent(context->stopEvent); + (void)SetEvent(context->stopEvent); WaitForSingleObject(context->debug_channel_thread, INFINITE); CloseHandle(context->debug_channel_thread); } diff --git a/server/Windows/wf_peer.c b/server/Windows/wf_peer.c index 4342a3b46..d213d23a1 100644 --- a/server/Windows/wf_peer.c +++ b/server/Windows/wf_peer.c @@ -217,7 +217,7 @@ static DWORD WINAPI wf_peer_socket_listener(LPVOID lpParam) break; } - SetEvent(context->socketEvent); + (void)SetEvent(context->socketEvent); WaitForSingleObject(context->socketSemaphore, INFINITE); if (context->socketClose) diff --git a/server/Windows/wf_update.c b/server/Windows/wf_update.c index 06d60c9b0..1a6b02d5b 100644 --- a/server/Windows/wf_update.c +++ b/server/Windows/wf_update.c @@ -70,7 +70,8 @@ DWORD WINAPI wf_update_thread(LPVOID lpParam) { // WLog_DBG(TAG, "Setting event for %d of %d", index + 1, // wfi->activePeerCount); - SetEvent(((wfPeerContext*)wfi->peers[index]->context)->updateEvent); + (void)SetEvent( + ((wfPeerContext*)wfi->peers[index]->context)->updateEvent); } } } diff --git a/server/proxy/pf_context.c b/server/proxy/pf_context.c index 0ee86a402..7b7e63416 100644 --- a/server/proxy/pf_context.c +++ b/server/proxy/pf_context.c @@ -409,7 +409,7 @@ void proxy_data_abort_connect(proxyData* pdata) { WINPR_ASSERT(pdata); WINPR_ASSERT(pdata->abort_event); - SetEvent(pdata->abort_event); + (void)SetEvent(pdata->abort_event); if (pdata->pc) freerdp_abort_connect_context(&pdata->pc->context); } diff --git a/server/proxy/pf_server.c b/server/proxy/pf_server.c index 1562bb123..6d34f0670 100644 --- a/server/proxy/pf_server.c +++ b/server/proxy/pf_server.c @@ -679,7 +679,7 @@ static DWORD WINAPI pf_server_handle_peer(LPVOID arg) case DRDYNVC_STATE_READY: if (WaitForSingleObject(ps->dynvcReady, 0) == WAIT_TIMEOUT) { - SetEvent(ps->dynvcReady); + (void)SetEvent(ps->dynvcReady); } break; @@ -1029,7 +1029,7 @@ void pf_server_stop(proxyServer* server) return; /* signal main thread to stop and wait for the thread to exit */ - SetEvent(server->stopEvent); + (void)SetEvent(server->stopEvent); } void pf_server_free(proxyServer* server) diff --git a/server/shadow/Win/win_rdp.c b/server/shadow/Win/win_rdp.c index 3db073da4..a28b9bf5b 100644 --- a/server/shadow/Win/win_rdp.c +++ b/server/shadow/Win/win_rdp.c @@ -79,7 +79,7 @@ static BOOL shw_end_paint(rdpContext* context) region16_union_rect(&(surface->invalidRegion), &(surface->invalidRegion), &invalidRect); } - SetEvent(subsystem->RdpUpdateEnterEvent); + (void)SetEvent(subsystem->RdpUpdateEnterEvent); WaitForSingleObject(subsystem->RdpUpdateLeaveEvent, INFINITE); ResetEvent(subsystem->RdpUpdateLeaveEvent); return TRUE; @@ -261,7 +261,7 @@ static int shw_freerdp_client_start(rdpContext* context) static int shw_freerdp_client_stop(rdpContext* context) { shwContext* shw = (shwContext*)context; - SetEvent(shw->StopEvent); + (void)SetEvent(shw->StopEvent); return 0; } diff --git a/server/shadow/Win/win_shadow.c b/server/shadow/Win/win_shadow.c index f05a55cf2..b55565b38 100644 --- a/server/shadow/Win/win_shadow.c +++ b/server/shadow/Win/win_shadow.c @@ -354,7 +354,7 @@ static DWORD WINAPI win_shadow_subsystem_thread(LPVOID arg) { win_shadow_surface_copy(subsystem); ResetEvent(subsystem->RdpUpdateEnterEvent); - SetEvent(subsystem->RdpUpdateLeaveEvent); + (void)SetEvent(subsystem->RdpUpdateLeaveEvent); } } diff --git a/server/shadow/shadow_mcevent.c b/server/shadow/shadow_mcevent.c index 5a4ad37c0..f94b66845 100644 --- a/server/shadow/shadow_mcevent.c +++ b/server/shadow/shadow_mcevent.c @@ -73,7 +73,7 @@ rdpShadowMultiClientEvent* shadow_multiclient_new(void) event->consuming = 0; event->waiting = 0; event->eventid = 0; - SetEvent(event->doneEvent); + (void)SetEvent(event->doneEvent); return event; out_free_subscribers: @@ -129,7 +129,7 @@ static void Publish(rdpShadowMultiClientEvent* event) event->eventid = (event->eventid & 0xff) + 1; WLog_VRB(TAG, "Server published event %d. %d clients.\n", event->eventid, event->consuming); ResetEvent(event->doneEvent); - SetEvent(event->event); + (void)SetEvent(event->event); } } @@ -200,12 +200,12 @@ static BOOL Consume(struct rdp_shadow_multiclient_subscriber* subscriber, BOOL w if (event->waiting > 0) { /* Notify other clients to continue */ - SetEvent(event->barrierEvent); + (void)SetEvent(event->barrierEvent); } else { /* Only one client. Notify server directly */ - SetEvent(event->doneEvent); + (void)SetEvent(event->doneEvent); } } else /* (event->consuming > 0) */ @@ -230,7 +230,7 @@ static BOOL Consume(struct rdp_shadow_multiclient_subscriber* subscriber, BOOL w * server to continue. */ ResetEvent(event->barrierEvent); - SetEvent(event->doneEvent); + (void)SetEvent(event->doneEvent); } } } diff --git a/server/shadow/shadow_server.c b/server/shadow/shadow_server.c index 28a690460..3962a8c70 100644 --- a/server/shadow/shadow_server.c +++ b/server/shadow/shadow_server.c @@ -742,7 +742,7 @@ int shadow_server_stop(rdpShadowServer* server) if (server->thread) { - SetEvent(server->StopEvent); + (void)SetEvent(server->StopEvent); WaitForSingleObject(server->thread, INFINITE); CloseHandle(server->thread); server->thread = NULL; diff --git a/winpr/libwinpr/pipe/pipe.c b/winpr/libwinpr/pipe/pipe.c index d95df5a3e..13522d935 100644 --- a/winpr/libwinpr/pipe/pipe.c +++ b/winpr/libwinpr/pipe/pipe.c @@ -331,7 +331,7 @@ BOOL NamedPipeRead(PVOID Object, LPVOID lpBuffer, DWORD nNumberOfBytesToRead, lpOverlapped->Internal = 0; lpOverlapped->InternalHigh = (ULONG_PTR)nNumberOfBytesToRead; lpOverlapped->Pointer = (PVOID)lpBuffer; - SetEvent(lpOverlapped->hEvent); + (void)SetEvent(lpOverlapped->hEvent); #endif } @@ -426,7 +426,7 @@ BOOL NamedPipeWrite(PVOID Object, LPCVOID lpBuffer, DWORD nNumberOfBytesToWrite, cnv.cpv = lpBuffer; lpOverlapped->Pointer = cnv.pv; } - SetEvent(lpOverlapped->hEvent); + (void)SetEvent(lpOverlapped->hEvent); #endif } @@ -781,7 +781,7 @@ BOOL ConnectNamedPipe(HANDLE hNamedPipe, LPOVERLAPPED lpOverlapped) lpOverlapped->Internal = 2; lpOverlapped->InternalHigh = (ULONG_PTR)0; lpOverlapped->Pointer = (PVOID)NULL; - SetEvent(lpOverlapped->hEvent); + (void)SetEvent(lpOverlapped->hEvent); } return TRUE; diff --git a/winpr/libwinpr/pipe/test/TestPipeCreateNamedPipe.c b/winpr/libwinpr/pipe/test/TestPipeCreateNamedPipe.c index c6c4abc03..b1849a8fd 100644 --- a/winpr/libwinpr/pipe/test/TestPipeCreateNamedPipe.c +++ b/winpr/libwinpr/pipe/test/TestPipeCreateNamedPipe.c @@ -120,7 +120,7 @@ static DWORD WINAPI named_pipe_server_thread(LPVOID arg) goto out; } - SetEvent(ReadyEvent); + (void)SetEvent(ReadyEvent); /** * Note: diff --git a/winpr/libwinpr/pipe/test/TestPipeCreateNamedPipeOverlapped.c b/winpr/libwinpr/pipe/test/TestPipeCreateNamedPipeOverlapped.c index f234a5fa7..a22b3ffdf 100644 --- a/winpr/libwinpr/pipe/test/TestPipeCreateNamedPipeOverlapped.c +++ b/winpr/libwinpr/pipe/test/TestPipeCreateNamedPipeOverlapped.c @@ -172,7 +172,7 @@ static DWORD WINAPI named_pipe_server_thread(LPVOID arg) if (!(hEvent = CreateEvent(NULL, TRUE, FALSE, NULL))) { printf("server: CreateEvent failure: %" PRIu32 "\n", GetLastError()); - SetEvent(serverReadyEvent); /* unblock client thread */ + (void)SetEvent(serverReadyEvent); /* unblock client thread */ goto finish; } overlapped.hEvent = hEvent; @@ -187,11 +187,11 @@ static DWORD WINAPI named_pipe_server_thread(LPVOID arg) if (hNamedPipe == INVALID_HANDLE_VALUE) { printf("server: CreateNamedPipe failure: %" PRIu32 "\n", GetLastError()); - SetEvent(serverReadyEvent); /* unblock client thread */ + (void)SetEvent(serverReadyEvent); /* unblock client thread */ goto finish; } - SetEvent(serverReadyEvent); + (void)SetEvent(serverReadyEvent); /* 3: connect named pipe */ diff --git a/winpr/libwinpr/pool/pool.c b/winpr/libwinpr/pool/pool.c index a4c285dee..f36dcdc47 100644 --- a/winpr/libwinpr/pool/pool.c +++ b/winpr/libwinpr/pool/pool.c @@ -185,7 +185,7 @@ VOID winpr_CloseThreadpool(PTP_POOL ptpp) return; } #endif - SetEvent(ptpp->TerminateEvent); + (void)SetEvent(ptpp->TerminateEvent); ArrayList_Free(ptpp->Threads); Queue_Free(ptpp->PendingQueue); @@ -247,7 +247,7 @@ VOID winpr_SetThreadpoolThreadMaximum(PTP_POOL ptpp, DWORD cthrdMost) ArrayList_Lock(ptpp->Threads); if (ArrayList_Count(ptpp->Threads) > ptpp->Maximum) { - SetEvent(ptpp->TerminateEvent); + (void)SetEvent(ptpp->TerminateEvent); ArrayList_Clear(ptpp->Threads); ResetEvent(ptpp->TerminateEvent); } diff --git a/winpr/libwinpr/synch/barrier.c b/winpr/libwinpr/synch/barrier.c index 2b61a5918..0bb07cf9a 100644 --- a/winpr/libwinpr/synch/barrier.c +++ b/winpr/libwinpr/synch/barrier.c @@ -224,7 +224,7 @@ BOOL WINAPI winpr_EnterSynchronizationBarrier(LPSYNCHRONIZATION_BARRIER lpBarrie lpBarrier->Reserved3[0] = (ULONG_PTR)hDormantEvent; /* signal the blocked threads */ - SetEvent(hCurrentEvent); + (void)SetEvent(hCurrentEvent); return TRUE; } diff --git a/winpr/libwinpr/synch/test/TestSynchInit.c b/winpr/libwinpr/synch/test/TestSynchInit.c index 2baee47a9..7e0ffd7c1 100644 --- a/winpr/libwinpr/synch/test/TestSynchInit.c +++ b/winpr/libwinpr/synch/test/TestSynchInit.c @@ -120,7 +120,7 @@ int TestSynchInit(int argc, char* argv[]) } Sleep(100); - SetEvent(hStartEvent); + (void)SetEvent(hStartEvent); for (DWORD i = 0; i < dwCreatedThreads; i++) { diff --git a/winpr/libwinpr/synch/test/TestSynchMutex.c b/winpr/libwinpr/synch/test/TestSynchMutex.c index 509d3b949..0d4d05126 100644 --- a/winpr/libwinpr/synch/test/TestSynchMutex.c +++ b/winpr/libwinpr/synch/test/TestSynchMutex.c @@ -192,7 +192,7 @@ static BOOL test_mutex_threading(void) goto fail; } - SetEvent(hStartEvent); + (void)SetEvent(hStartEvent); if (WaitForSingleObject(hThread, 2000) != WAIT_OBJECT_0) { diff --git a/winpr/libwinpr/synch/test/TestSynchTimerQueue.c b/winpr/libwinpr/synch/test/TestSynchTimerQueue.c index 08cc95738..51d7fcd6c 100644 --- a/winpr/libwinpr/synch/test/TestSynchTimerQueue.c +++ b/winpr/libwinpr/synch/test/TestSynchTimerQueue.c @@ -46,7 +46,7 @@ static VOID CALLBACK TimerRoutine(PVOID lpParam, BOOLEAN TimerOrWaitFired) if (apcData->FireCount == apcData->MaxFireCount) { - SetEvent(apcData->CompletionEvent); + (void)SetEvent(apcData->CompletionEvent); } } diff --git a/winpr/libwinpr/synch/test/TestSynchWaitableTimerAPC.c b/winpr/libwinpr/synch/test/TestSynchWaitableTimerAPC.c index cf1f677dd..bc289e97d 100644 --- a/winpr/libwinpr/synch/test/TestSynchWaitableTimerAPC.c +++ b/winpr/libwinpr/synch/test/TestSynchWaitableTimerAPC.c @@ -28,7 +28,7 @@ static VOID CALLBACK TimerAPCProc(LPVOID lpArg, DWORD dwTimerLowValue, DWORD dwT if (g_Count >= 5) { - SetEvent(g_Event); + (void)SetEvent(g_Event); } } diff --git a/winpr/libwinpr/synch/timer.c b/winpr/libwinpr/synch/timer.c index 120b933e0..5c1564ef7 100644 --- a/winpr/libwinpr/synch/timer.c +++ b/winpr/libwinpr/synch/timer.c @@ -980,7 +980,7 @@ BOOL DeleteTimerQueueEx(HANDLE TimerQueue, HANDLE CompletionEvent) free(timerQueue); if (CompletionEvent && (CompletionEvent != INVALID_HANDLE_VALUE)) - SetEvent(CompletionEvent); + (void)SetEvent(CompletionEvent); return TRUE; } @@ -1081,7 +1081,7 @@ BOOL DeleteTimerQueueTimer(HANDLE TimerQueue, HANDLE Timer, HANDLE CompletionEve free(timer); if (CompletionEvent && (CompletionEvent != INVALID_HANDLE_VALUE)) - SetEvent(CompletionEvent); + (void)SetEvent(CompletionEvent); return TRUE; } diff --git a/winpr/libwinpr/utils/collections/CountdownEvent.c b/winpr/libwinpr/utils/collections/CountdownEvent.c index 0e8c27df0..0bb11d7c7 100644 --- a/winpr/libwinpr/utils/collections/CountdownEvent.c +++ b/winpr/libwinpr/utils/collections/CountdownEvent.c @@ -142,7 +142,7 @@ BOOL CountdownEvent_Signal(wCountdownEvent* countdown, size_t signalCount) if (newStatus && (!oldStatus)) { - SetEvent(countdown->event); + (void)SetEvent(countdown->event); status = TRUE; } diff --git a/winpr/libwinpr/utils/collections/MessageQueue.c b/winpr/libwinpr/utils/collections/MessageQueue.c index 5481bd4ab..0a2e98444 100644 --- a/winpr/libwinpr/utils/collections/MessageQueue.c +++ b/winpr/libwinpr/utils/collections/MessageQueue.c @@ -146,7 +146,7 @@ BOOL MessageQueue_Dispatch(wMessageQueue* queue, const wMessage* message) queue->size++; if (queue->size > 0) - SetEvent(queue->event); + (void)SetEvent(queue->event); if (message->id == WMQ_QUIT) queue->closed = TRUE; diff --git a/winpr/libwinpr/utils/collections/Queue.c b/winpr/libwinpr/utils/collections/Queue.c index 8bbdea83a..76cb2fbfd 100644 --- a/winpr/libwinpr/utils/collections/Queue.c +++ b/winpr/libwinpr/utils/collections/Queue.c @@ -220,7 +220,7 @@ BOOL Queue_Enqueue(wQueue* queue, const void* obj) queue->size++; if (signalSet) - SetEvent(queue->event); + (void)SetEvent(queue->event); out: Queue_Unlock(queue); diff --git a/winpr/libwinpr/wtsapi/wtsapi_win32.c b/winpr/libwinpr/wtsapi/wtsapi_win32.c index 0be7d0bce..8481d3442 100644 --- a/winpr/libwinpr/wtsapi/wtsapi_win32.c +++ b/winpr/libwinpr/wtsapi/wtsapi_win32.c @@ -146,7 +146,7 @@ BOOL Win32_WTSVirtualChannelReadAsync(WTSAPI_CHANNEL* pChannel) pChannel->header->length = numBytes; pChannel->readDone = TRUE; - SetEvent(pChannel->hEvent); + (void)SetEvent(pChannel->hEvent); return TRUE; }