mirror of
https://github.com/morgan9e/FreeRDP
synced 2026-04-15 00:44:19 +09:00
[warnings,api] fix -Wunused-result
With marking publid API [[nodiscard]] some problematic error checks in the core library were uncovered. This commit addresses these shortcomings.
This commit is contained in:
@@ -233,7 +233,7 @@ bool SDLConnectionDialog::handle(const SDL_Event& event)
|
||||
case SDLK_KP_ENTER:
|
||||
if (event.type == SDL_KEYUP)
|
||||
{
|
||||
freerdp_abort_event(_context);
|
||||
freerdp_abort_connect_context(_context);
|
||||
sdl_push_quit();
|
||||
}
|
||||
break;
|
||||
@@ -269,7 +269,7 @@ bool SDLConnectionDialog::handle(const SDL_Event& event)
|
||||
{
|
||||
if (event.type == SDL_MOUSEBUTTONUP)
|
||||
{
|
||||
freerdp_abort_event(_context);
|
||||
freerdp_abort_connect_context(_context);
|
||||
sdl_push_quit();
|
||||
}
|
||||
}
|
||||
@@ -306,7 +306,7 @@ bool SDLConnectionDialog::handle(const SDL_Event& event)
|
||||
case SDL_WINDOWEVENT_CLOSE:
|
||||
if (windowID == ev.windowID)
|
||||
{
|
||||
freerdp_abort_event(_context);
|
||||
freerdp_abort_connect_context(_context);
|
||||
sdl_push_quit();
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -354,15 +354,13 @@ BOOL sdlDispContext::handle_window_event(const SDL_WindowEvent* ev)
|
||||
{
|
||||
case SDL_WINDOWEVENT_HIDDEN:
|
||||
case SDL_WINDOWEVENT_MINIMIZED:
|
||||
gdi_send_suppress_output(_sdl->context()->gdi, TRUE);
|
||||
return TRUE;
|
||||
return gdi_send_suppress_output(_sdl->context()->gdi, TRUE);
|
||||
|
||||
case SDL_WINDOWEVENT_EXPOSED:
|
||||
case SDL_WINDOWEVENT_SHOWN:
|
||||
case SDL_WINDOWEVENT_MAXIMIZED:
|
||||
case SDL_WINDOWEVENT_RESTORED:
|
||||
gdi_send_suppress_output(_sdl->context()->gdi, FALSE);
|
||||
return TRUE;
|
||||
return gdi_send_suppress_output(_sdl->context()->gdi, FALSE);
|
||||
|
||||
case SDL_WINDOWEVENT_RESIZED:
|
||||
case SDL_WINDOWEVENT_SIZE_CHANGED:
|
||||
|
||||
@@ -846,7 +846,8 @@ static int sdl_run(SdlContext* sdl)
|
||||
SDL_SetHint(SDL_HINT_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR, "0");
|
||||
#endif
|
||||
|
||||
freerdp_add_signal_cleanup_handler(sdl->context(), sdl_term_handler);
|
||||
if (!freerdp_add_signal_cleanup_handler(sdl->context(), sdl_term_handler))
|
||||
return -1;
|
||||
|
||||
sdl->initialized.set();
|
||||
|
||||
|
||||
@@ -206,7 +206,7 @@ bool SDLConnectionDialog::handle(const SDL_Event& event)
|
||||
case SDLK_KP_ENTER:
|
||||
if (event.type == SDL_EVENT_KEY_UP)
|
||||
{
|
||||
freerdp_abort_event(_context);
|
||||
freerdp_abort_connect_context(_context);
|
||||
std::ignore = sdl_push_quit();
|
||||
}
|
||||
break;
|
||||
@@ -245,7 +245,7 @@ bool SDLConnectionDialog::handle(const SDL_Event& event)
|
||||
{
|
||||
if (event.type == SDL_EVENT_MOUSE_BUTTON_UP)
|
||||
{
|
||||
freerdp_abort_event(_context);
|
||||
freerdp_abort_connect_context(_context);
|
||||
std::ignore = sdl_push_quit();
|
||||
}
|
||||
}
|
||||
@@ -281,7 +281,7 @@ bool SDLConnectionDialog::handle(const SDL_Event& event)
|
||||
case SDL_EVENT_WINDOW_CLOSE_REQUESTED:
|
||||
if (windowID == ev.windowID)
|
||||
{
|
||||
freerdp_abort_event(_context);
|
||||
freerdp_abort_connect_context(_context);
|
||||
std::ignore = sdl_push_quit();
|
||||
}
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user