[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

@@ -1568,7 +1568,7 @@ static void terminate_plugin_cb(GENERIC_DYNVC_PLUGIN* base)
}
if (rdpei->event && !rdpei->async)
(void)freerdp_client_channel_unregister(rdpei->rdpcontext->channels, rdpei->event);
freerdp_client_channel_unregister(rdpei->rdpcontext->channels, rdpei->event);
if (rdpei->event)
(void)CloseHandle(rdpei->event);

View File

@@ -682,7 +682,8 @@ static UINT rdpgfx_save_persistent_cache(RDPGFX_PLUGIN* gfx)
if (context->ExportCacheEntry(context, cacheSlot, &cacheEntry) != CHANNEL_RC_OK)
continue;
persistent_cache_write_entry(persistent, &cacheEntry);
if (persistent_cache_write_entry(persistent, &cacheEntry) < 0)
goto fail;
}
}

View File

@@ -414,7 +414,8 @@ static UINT rdpsnd_server_select_format(RdpsndServerContext* context, UINT16 cli
context->priv->out_buffer_size = out_buffer_size;
}
freerdp_dsp_context_reset(context->priv->dsp_context, format, 0u);
if (!freerdp_dsp_context_reset(context->priv->dsp_context, format, 0u))
error = ERROR_INTERNAL_ERROR;
out:
LeaveCriticalSection(&context->priv->lock);
return error;