diff options
author | Kristian H. Kristensen <[email protected]> | 2020-05-22 14:47:30 -0700 |
---|---|---|
committer | Kristian H. Kristensen <[email protected]> | 2020-05-26 12:46:18 -0700 |
commit | c26317ebd6c42fcd70a63c2a95d04f11f3c15bd5 (patch) | |
tree | 46731e7ad033d90c5096ca06060d13d01c355b49 /src | |
parent | 12653beacba00146f5bf31816a7c1dc8e51735ff (diff) |
mesa/st: Use memset to zero out struct
This is a non-stop source of warnings and build breakage. memset works
everywhere.
src/mesa/state_tracker/st_tgsi_lower_depth_clamp.c:354:45: warning:
suggest braces around initialization of subobject [-Wmissing-braces]
Reviewed-by: Rob Clark <[email protected]>
Reviewed-by: Marek Olšák <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5174>
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/state_tracker/st_tgsi_lower_depth_clamp.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mesa/state_tracker/st_tgsi_lower_depth_clamp.c b/src/mesa/state_tracker/st_tgsi_lower_depth_clamp.c index 2b8ed079f81..14bb4b975db 100644 --- a/src/mesa/state_tracker/st_tgsi_lower_depth_clamp.c +++ b/src/mesa/state_tracker/st_tgsi_lower_depth_clamp.c @@ -351,10 +351,11 @@ st_tgsi_lower_depth_clamp(const struct tgsi_token *tokens, int depth_range_const, bool clip_negative_one_to_one) { - struct tgsi_depth_clamp_transform ctx = {0}; + struct tgsi_depth_clamp_transform ctx; struct tgsi_token *newtoks; int newlen; + memset(&ctx, 0, sizeof(ctx)); tgsi_scan_shader(tokens, &ctx.info); /* we only want to do this for the fragment shader, and the shader-stage |