On 16 November 2017 at 15:10, Gert Wollny <gw.foss...@gmail.com> wrote: > * Use a designated initializer to silence the warning. > * fix one intention that was using tabs instead of spaces > Sigh, -Wmissing-field-initalizers warnings - it's perhaps the most annoying and inconsistent warning I've seen :-(
Originally the whole struct is initialised while now only a single component. Hence these changes are likely to introduce subtle bugs - today or X days down the line. > @@ -93,7 +93,7 @@ util_set_blend_normal(struct cso_context *cso) > static void > util_set_dsa_disable(struct cso_context *cso) > { > - struct pipe_depth_stencil_alpha_state dsa = {{0}}; > + struct pipe_depth_stencil_alpha_state dsa = {.depth = {0}}; > > cso_set_depth_stencil_alpha(cso, &dsa); In this case - cso_set_depth_stencil_alpha() treats dsa as const ... So if further down the function anything other than .depth is read things are will end badly. -Emil _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev