tests: Fix a -Wmaybe-uninitialized warning
Since the `switch` didn’t have a default case, the `cull_front` and `cull_back` variables could technically be used uninitialised if the `cull_mode` was unrecognised. That seems unlikely to happen as presumably other code makes sure the `cull_mode` is valid, but it doesn’t hurt to add a `default:` case to squash the compiler warning. Signed-off-by: Philip Withnall <pwithnall@gnome.org> Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3770>
This commit is contained in:
parent
ca1434ff1e
commit
173332e928
@ -201,6 +201,9 @@ validate_result (CoglFramebuffer *framebuffer, int y_offset)
|
|||||||
cull_front = TRUE;
|
cull_front = TRUE;
|
||||||
cull_back = TRUE;
|
cull_back = TRUE;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
g_assert_not_reached ();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (FRONT_WINDING (draw_num) == COGL_WINDING_CLOCKWISE)
|
if (FRONT_WINDING (draw_num) == COGL_WINDING_CLOCKWISE)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user