Skip to content
Snippets Groups Projects
Commit 745d019d authored by Simon McVittie's avatar Simon McVittie
Browse files

runtime: Make some assertions static


Even better than an assertion that crashes at runtime if we were wrong -
an assertion that makes the build fail if we were wrong, so we can't
release code where this assertion would fail.

Signed-off-by: default avatarSimon McVittie <smcv@collabora.com>
parent 9b0029ff
No related branches found
No related tags found
No related merge requests found
...@@ -1918,8 +1918,8 @@ pv_runtime_use_host_graphics_stack (PvRuntime *self, ...@@ -1918,8 +1918,8 @@ pv_runtime_use_host_graphics_stack (PvRuntime *self,
{ {
IcdDetails *details = g_ptr_array_index (va_api_icd_details, i); IcdDetails *details = g_ptr_array_index (va_api_icd_details, i);
g_assert (G_N_ELEMENTS (details->kinds) > 1); G_STATIC_ASSERT (G_N_ELEMENTS (details->kinds) > 1);
g_assert (G_N_ELEMENTS (details->paths_in_container) > 1); G_STATIC_ASSERT (G_N_ELEMENTS (details->paths_in_container) > 1);
/* We add entries in va_api_icd_details only after a successful bind, /* We add entries in va_api_icd_details only after a successful bind,
* so we expect to always have ICD_KIND_ABSOLUTE. * so we expect to always have ICD_KIND_ABSOLUTE.
* Also we use IcdDetails for a single multiarch always added as the first element. * Also we use IcdDetails for a single multiarch always added as the first element.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment