[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:
Armin Novak
2026-02-16 10:57:57 +01:00
parent 20a24fe36e
commit df64d00a97
44 changed files with 479 additions and 291 deletions

View File

@@ -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;

View File

@@ -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:

View File

@@ -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();

View File

@@ -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;